parmed_converter¶
Conversion of a ParmEd structure into a PQForceFieldSetup.
ParmEd stores every force field in AMBER units and conventions; the conversion maps those onto the PQ energy expressions:
bonds and angles: PQ uses 1/2 k, AMBER k, so k is doubled;
proper and periodic improper torsions: PQ evaluates k (1 + cos(n phi + delta)) with the IUPAC sign of phi, AMBER k (1 + cos(n phi - delta)), so the phase changes sign;
Lennard-Jones: one c6/c12 pair per pair of global van der Waals types;
exclusions and scaled 1-4 pairs: the PQ intra non-bonded file inside a molecule, linker marks for pairs between molecules;
rigid three-site water (O-H, O-H and H-H bond, as tleap writes TIP3P): with SHAKE, one M-SHAKE reference geometry per moltype instead of three coupled SHAKE constraints.
Summary¶
Functions:
Raises if the structure contains a term PQ cannot evaluate. |
|
Converts a parametrized ParmEd structure into a PQ setup. |
|
Returns the factor between the 1-4 and the normal Lennard-Jones well depth of the atoms (CHARMM files store the scaled 1-4 values). |
Reference¶
- check_supported(structure: Any) None[source]¶
Raises if the structure contains a term PQ cannot evaluate.
- Parameters:
structure (parmed.Structure) – The structure to check.
- Raises:
UnsupportedForceFieldTermError – For CMAP, Urey-Bradley, harmonic impropers, AMOEBA terms, virtual sites or extra points, special 1-4 Lennard-Jones parameters and AMBER 10-12 hydrogen-bond terms.
- convert_structure(
- structure: Any,
- shake_h: bool = False,
- rcoulomb: Real = 12.0,
- source: str = '',
Converts a parametrized ParmEd structure into a PQ setup.
- Parameters:
structure (parmed.Structure) – The parametrized structure with coordinates.
shake_h (bool, optional) – Constrain bonds to hydrogen with SHAKE instead of a bond term, by default False. Rigid three-site water (with an H-H bond) is kept rigid with M-SHAKE instead.
rcoulomb (float, optional) – The Coulomb cutoff in Angstrom, used for the vacuum box of a structure without box, by default 12.0.
source (str, optional) – A description of the source for the file headers.
- Returns:
The PQ setup.
- Return type:
- Raises:
UnsupportedForceFieldTermError – If the force field contains a term PQ cannot evaluate.
Parm2PQError – If the structure has no coordinates or misses parameters.
- lj_14_factor(
- structure: Any,
Returns the factor between the 1-4 and the normal Lennard-Jones well depth of the atoms (CHARMM files store the scaled 1-4 values).
- Parameters:
structure (parmed.Structure) – The structure.
- Returns:
The common factor epsilon_14 / epsilon, 1.0 without 1-4 values.
- Return type:
float
- Raises:
UnsupportedForceFieldTermError – If the 1-4 radius differs or the factor is not the same for all atoms.