From 62402fd732867bb4372f0dda2afb60be22ab5978 Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Thu, 30 Apr 2015 15:50:15 +0200 Subject: [PATCH] some updates on documentation --- modules/mol/mm/doc/forcefield.rst | 26 +++++++--- modules/mol/mm/doc/simulation.rst | 81 ++++++++++++++++++++++++++++++- modules/mol/mm/doc/topology.rst | 28 ++++++++++- 3 files changed, 123 insertions(+), 12 deletions(-) diff --git a/modules/mol/mm/doc/forcefield.rst b/modules/mol/mm/doc/forcefield.rst index 13cc06b5a..ffb80d522 100644 --- a/modules/mol/mm/doc/forcefield.rst +++ b/modules/mol/mm/doc/forcefield.rst @@ -40,7 +40,17 @@ gromacs format. The reader is capable of resolving the preprocessor statements as they are used in GROMACS. -.. class:: FFReader +.. class:: FFReader(base_dir) + + :param base_dir: :class:`str` defining the base_path of the reader. + All loaded files must be defined relative to this base + path. + + The :class:`FFReader` builds up a :class:`Forcefield`, that gets updated with + every call to the read functions. If the read files contain preprocessor + statements as they are used in Gromacs, they will be applied to all + subsequent lines read in. Parsed preprocessor statements are: + #include, #define, #ifdef, #ifndef, #else and #endif .. method:: ReadGromacsForcefield() @@ -67,7 +77,8 @@ as they are used in GROMACS. .. method:: SetForcefield(forcefield) - Resets reader internal forcefield. Everything read so far is lost. + Resets reader internal forcefield. Everything read so far is lost, + except the already read preprocessor statements. :param forcefield: :class:`Forcefield` @@ -238,8 +249,7 @@ as they are used in GROMACS. used otherwise. - .. method:: AddResidueRenamingRule(name, ff_main_name, ff_n_ter_name, - ff_c_ter_name, ff_two_ter_name) + .. method:: AddResidueRenamingRule(name, ff_main_name, ff_n_ter_name, ff_c_ter_name, ff_two_ter_name) :param name: :class:`str` original name or the residue (e.g. pdb/gromacs standard) @@ -319,7 +329,7 @@ as they are used in GROMACS. modifier for this residue - .. method:: AssignFFSpecificNames(ent, reverse = False) + .. method:: AssignFFSpecificNames(ent,[,reverse = False]) This function does the forcefield specific renaming magic. It takes the given :class:`EntityHandle` and applies the rules set in @@ -444,7 +454,7 @@ as they are used in GROMACS. matching given type can be found - .. method:: GetLJ(type1, type2, pair=False) + .. method:: GetLJ(type1, type2,[,pair=False]) :param type1: :class:`str` @@ -538,7 +548,7 @@ as they are used in GROMACS. be found - .. method:: GetNTerModifier(res_name, ter_name="") + .. method:: GetNTerModifier(res_name,[,ter_name=""]) :param res_name: :class:`str` @@ -549,7 +559,7 @@ as they are used in GROMACS. be found - .. method:: GetCTerModifier(name, ter_name="") + .. method:: GetCTerModifier(name,[,ter_name=""]) :param res_name: :class:`str` diff --git a/modules/mol/mm/doc/simulation.rst b/modules/mol/mm/doc/simulation.rst index 0a7176133..9073856de 100644 --- a/modules/mol/mm/doc/simulation.rst +++ b/modules/mol/mm/doc/simulation.rst @@ -42,6 +42,10 @@ mapped back to the attached structure at any time. :param settings: :class:`Settings` to control the parametrization of the :class:`Simulation` + :raises: :class:`RuntimeException` when number of atoms in + **entity** is not equal the number of particles + in **topology** + .. method:: Save(filename) @@ -154,95 +158,168 @@ mapped back to the attached structure at any time. .. method:: ResetHarmonicBond(index,bond_length, force_constant) + Update of the harmonic bond parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param bond_length: :class:`float` :param force_constant: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of harmonic bonds + .. method:: ResetHarmonicAngle() + Update of the harmonic angle parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param angle: :class:`float` :param force_constant: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of harmonic angles .. method:: ResetUreyBradleyAngle(index, angle, angle_force_constant, bond_length, bond_force_constant) + Update of the urey-bradley angle parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param angle: :class:`float` :param force_constant: :class:`float` :param bond_length: :class:`float` :param force_constant: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of urey-bradley angles .. method:: ResetPeriodicDihedral(index, multiplicity, phase, force_constant) + Update of the periodic dihedral parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param multiplicity: :class:`int` :param phase: :class:`float` :param force_constant: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of periodic dihedrals + .. method:: ResetPeriodicImproper(index, multiplicity, phase, force_constant) + Update of the periodic improper parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param multiplicity: :class:`int` :param phase: :class:`float` :param force_constant: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of periodic impropers .. method:: ResetHarmonicImproper(index, phase, force_constant) + Update of the harmonic improper parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param phase: :class:`float` :param force_constant: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of harmonic impropers .. method:: ResetLJPair(index,sigma,epsilon) + Update of the harmonic improper parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param sigma: :class:`float` :param epsilon: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of lj-pairs .. method:: ResetDistanceConstraint(index, constraint_length) + + Update of the distance constraint parameters in the simulation **and** + in the attached :class:`Topology` :param index: :class:`int` - :param constraint_length: :class:`float` + :param constraint_length: :class:`float` + + :raises: :class:`RuntimeError` when **index** exceeds + number of distance constraints .. method:: ResetHarmonicPositionRestraint(index,ref_position, force_constant,x_scale,y_scale,z_scale) + Update of the harmonic position restraint parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param ref_position: :class:`~ost.geom.Vec3` :param force_constant: :class:`float` :param x_scale: :class:`float` :param y_scale: :class:`float` :param z_scale: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of harmonic position restraints .. method:: ResetHarmonicDistanceRestraint(index,bond_length, force_constant) + Update of the harmonic distance restraint parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param bond_length: :class:`float` :param force_constant: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of harmonic distance restraints .. method:: ResetLJ(index,sigma,epsilon) + Update of the lj parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param sigma: :class:`float` :param epsilon: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of particles + .. method:: ResetGBSA(index,radius,scaling) + Update of the GBSA parameters in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param radius: :class:`float` :param scaling: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of particles .. method:: ResetCharge(index,charge) + Update of the charge in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param charge: :class:`float` + :raises: :class:`RuntimeError` when **index** exceeds + number of particles .. method:: ResetMass(index,mass) + Update of the mass in the simulation **and** + in the attached :class:`Topology` + :param index: :class:`int` :param mass: :class:`float` - + :raises: :class:`RuntimeError` when **index** exceeds + number of particles diff --git a/modules/mol/mm/doc/topology.rst b/modules/mol/mm/doc/topology.rst index 2a4f63604..6988f1e10 100644 --- a/modules/mol/mm/doc/topology.rst +++ b/modules/mol/mm/doc/topology.rst @@ -19,8 +19,32 @@ that should suffice most needs. Creates a topology given an :class:`EntityHandle` and a :class:`Settings` object. Note, that the :class:`EntityHandle` is passed by reference - and gets altered by adding hydrogens and modification of terminal residues - based on the information given by the :class:`Settings`/:class:`Forcefield`. + and gets altered by rebuilding bonds, adding hydrogens and modification of + terminal residues based on the information given by the + :class:`Settings`/:class:`Forcefield`. + The Topology Creation process consists of: + + #. Rename to the gromacs standard + + #. Kill all bonds + + #. Build difulfid bonds if flag is set in **settings** + + #. Rename to the standard defined in the forcefield + + #. Extract the building blocks from the forcefield for every residue + + #. Apply BlockModifiers on termini and reconstruct hydrogens with HydrogenConstructors + + #. Reconnect based on the connectivity definitions in the building blocks + + #. Check, whether the residues match with the building blocks + + #. Extract bonds/angles etc. based on the flags in the **settings** + + #. Add Parametrization from forcefield to the Topology + + #. Rename entity back to PDB naming if according flag is set in **settings** :param entity: :class:`EntityHandle` -- GitLab