Model API#

openmicron.forcefield.simulationsystem#

class openmicron.forcefield.simulationsystem.SimulationSystem[source]#
add_reporters(tot_simu_steps, report_period, output_traj_name='output', report_traj_format='dcd', report_traj=True, report_state_log=True)[source]#

Add reporters that produce trajectory in dcd or xtc format and state log for OpenMM simulation.

Parameters:
  • tot_sim_steps (int) – Total time steps of simulation.

  • report_period (int) – Report period for trajectory and state log files.

  • output_traj_name (str) – Output path and name for trajectory and state log files.

  • report_traj_format (str) – Trajectory file format, which one can choose dcd ro xtc format.

  • report_traj (bool) – Whether to output trajectory file.

  • report_state_log (bool) – Whether to output sate log file.

append_ff_params(ff_params, verbose=False)[source]#

The method can append new molecules by concatenating atoms and bonded interaction information saved in dataframes. Reference from ZhangGroup-MITChemistry/OpenABC

Parameters:
  • ff_params (force field parameters) – The object of a force field paramters including interaction information.

  • Verbose (bool) – Whether to report the appended attributes.

auto_get_charged_atom()[source]#

automatically get the index and charge of charged atom.

create_system(top, forcefield_template=None, use_pbc=True, box_a=100, box_b=100, box_c=100, nonbondedMethod=CutoffNonPeriodic, remove_cmmotion=False)[source]#

Create OpenMM system for simulation. Need to further add forces to this OpenMM system.

Parameters:
  • top (OpenMM Topology) – The OpenMM topology.

  • forcefield_template (string) – The path of OpenMM force fild xml file that define the atom types and residue templates of system.

  • use_pbc (bool) – Wheter to use periodic boundary condition (PBC).

  • box_a (float) – The length of the box along the x-axis is measured in angstroms.

  • box_b (float) – The length of the box along the y-axis is measured in angstroms.

  • box_c (float) – The length of the box along the z-axis is measured in angstroms.

  • nonbondedMethod (Openmm method) – Set the method used for handling long range nonbonded interactions. Allowed values are NoCutoff, CutoffNonPeriodic, CutoffPeriodic, Ewald, or PME.

  • remove_commotion (bool) – Whether to remove center fo mass motions

get_exclusion(res_idx_dis=2, exclude_nat_con=True)[source]#

To get the exclusion that exclude nonbonded interactions when the distance of residue index is less than or equal to threshold value(res_idx_dis).

Parameters:
  • res_idx_dis (int) – The threshold distance of residue index and default value is 2。

  • exclude_nat_con (bool, optional) – If set to True (default), those atom pairs involved in native contacts, such as those formed by Go or hydrogen bonds, will be excluded from other LJ-type nonbonded potential calculations.

move_COM_to_box_center(use_pbc=None)[source]#

Move center of mass (COM) to box center.

save_state(state_xml='state.xml')[source]#

Save state in a reabable XML format

Parameters:

state_xml (str) – Output path for state xml file

save_system(system_xml='system.xml')[source]#

Save sytem in a readabel XML format.

Parameters:

system_xml (str) – Output path for system xml file

set_simulation(integrator, platform_name='CPU', properties={'Precision': 'mixed'}, init_coord=None)[source]#

Set OpenMM simulation

Parameters:
  • integrator (Openmm Integrator) – OpenMM integrator.

  • platform_name (str) – OpenMM simulation platform name. The available platforms are Reference or CPU or CUDA or OpenCL.

  • properties (dict) – OpenMM simulation platform properties.

  • init_coord (None or array-like) – Initial coordinate of system.

openmicron.forcefield.aicgmodel#

class openmicron.forcefield.aicgmodel.AICG2Model[source]#

Bases: SimulationSystem

A class for AICG2+ model

Attributes:

bonded_attr_name: list

The categories of interactions within chains. Such as [‘protein_bonds’,’protein_harmonic_angles’,’protein_aicg13_angles’, ‘protein_native_dihd’,’protein_aicg_dihd’,’protein_intra_contact’]

nonbonded_attr_name: list

The categories of interactions between chains. [‘protein_inter_contact’]

flp_bond_ang_params: pd.DataFrame

The parameters of flexible local potential regarding bond angle.

flp_bond_dihd_params: pd.DataFrame

The parameters of flexible local potential regarding dihedral.

protein_bonds: pd.DataFrame

The parameters of harmonica bond interaction

protein_harmonic_angles: pd.DataFrame

The parameters of harmonica angle interaction

protein_aicg13_angles: pd.DataFrame

The parameters of aicg13 angles

protein_native_dihd: pd.DataFrame

The parameters of native dihedral

protein_aicg_dihd: pd.DataFrame

The parameters of aicg dihedral

protein_intra_contact: pd.DataFrame

The parameters of intra-contact

protein_inter_contact: pd.DataFrame

The parameters of inter-contact

add_all_default_ener_function(oriented_Hbond=False, cutoff_hbond=2.5, cutoff_go=2.5, cutoff_kh=2.5, cutoff_exv=2.0, kh_epsilon_scale=1.3, temperature=300)[source]#

Add all default energy function to create a aicg force field.

Parameters:
  • oriented_Hbond (bool) – Whether to add orientation-dependent hydrogen bond between CA atoms for force field. If False, the hydrogen would not apply to f rce field.

  • cutoff_hbond (float) – cutoff_hbond = truncated distance / rest length

  • cutoff_go (float) – cutoff_go = truncated distance / rest length

  • cutoff_kh (float) – cutoff_kh = truncated distance / rest length

  • cutoff_exv (float) – cutoff_exv= truncated distance / rest length

  • kh_epsilon_scale (float) – The parameter scale the size of kim-hummer epsilon.

add_debye_huckel(dieletric_constant=80, ion_strength=0.02, temperature=300, extra_charged_atom=None, cutoff=20, force_group=13)[source]#

Add electrical potential.

Parameters:
  • ion_strength (float) – Salt concentration.

  • temperature (float) – Temperature.

  • extra_charged_atom (list) – This represents the additional atoms requiring charge to be added. It consists of N*2 lists, where the first column represents the atom index, and the second column represents the atom’s charge.

  • cutoff (float) – cutoff = truncated distance / rest length

  • force_group (int) – Force group.

add_excluded(epsilon=0.2, sigma=3.8, cutoff=2.5, rad_scale=1, force_group=11)[source]#

Add excluded interaction between atoms.

Parameters:
  • cutoff (float) – cutoff = truncated distance / rest length

  • rad_scale (float) – scaling factor to radii(sigma) and default value is 0.85

  • force_group (int) – Force group.

add_flexible_loc_angle(force_group=6)[source]#

Add flexible local potential for angle are composed of CA atoms in backbone.

Parameters:

force_group (int) – Force group.

add_flexible_loc_dihedral(force_group=7)[source]#

Add flexible local potential for dihedral angle are composed CA atoms in backbone.

Parameters:

force_group (int) – Force group.

add_kim_hummer(path='/home/docs/checkouts/readthedocs.org/user_builds/openmicron/checkouts/latest/openmicron/forcefield/para/kh.para', kh_model_symbol='D', T=300, kh_epsilon_scale=1.3, cutoff=2.5, rad_scale=0.85, force_group=10)[source]#

Add kim hummer potential between CB and CB which there is no native contact

Parameters:
  • path (str) – The path of kim-hummer parameters file.

  • kh_model_symbol (str) – The parameters represent symbols of the Kim-Hummer parameters model. The model consists of six types: A, B, C, D, E, and F. Specific numerical values are referenced from “Journal of Molecular Biology, 2008, 375(5): 1416-1433.”

  • T (float) – Temperature

  • kh_epsilon_scale (float) – The parameter scale the size of kim-hummer epsilon.

  • cutoff (float) – cutoff = truncated distance / rest length

  • rad_scale (float) – scaling factor to radii(sigma) and default value is 0.85

  • force_group (int) – Force group.

add_protein_aicg13_angle(force_group=3)[source]#

Add protein aicg13 angles involved CA atom that describe the local structure in backbone chain

Parameters:

force_group (int) – Force group.

add_protein_aicg_dihedral(force_group=5)[source]#

add protein aicg dihedral angle for backbone chain.

Parameters:

force_group (int) – Force group.

add_protein_bond(force_group=1)[source]#

Add protein bonds.

Parameters:

force_group (int) – Force group.

add_protein_harmonic_angle(k_angle_scale=4, force_group=2)[source]#

Add protein harmonic angles.

Parameters:

force_group (int) – Force group.

add_protein_native_dihedral(force_group=4)[source]#

add native protein dihedrals for side bead.

Parameters:

force_group (int) – Force group.

add_protein_native_pair(cutoff=2.5, force_group=8)[source]#

Add native contact pair.

Parameters:

force_group (int) – Force group.