parmed.utils package¶
Subpackages¶
Submodules¶
Module contents¶
Various utilities used by ParmEd that don’t really fit elsewhere
-
parmed.utils.
canonical_improper_order
(atom1, atom2, atom3, atom4, center=1)[source]¶ Controls how improper torsion keys are generated from Structures. Different programs have different conventions as far as where the “central” atom is placed.
Note, different programs use different conventions for where the “central” atom comes in the overall torsion ordering. CHARMM puts the central atom first, whereas AMBER puts the central atom third. A central atom is defined as the one that is bonded to the other 3.
- Parameters
- atom1
parmed.topologyobjects.Atom
The first atom in the improper
- atom2
parmed.topologyobjects.Atom
The second atom in the improper
- atom3
parmed.topologyobjects.Atom
The third atom in the improper
- atom4
parmed.topologyobjects.Atom
The fourth atom in the improper
- centerint, optional
Which location represents the center atom. Default is 1 (first location).
- atom1
- Returns
- a1, a2, a3, a4tuple of
parmed.topologyobjects.Atom
The atoms in the necessary parameter order
- a1, a2, a3, a4tuple of
-
parmed.utils.
find_atom_pairs
(struct, dist, subset=None)[source]¶ Finds all pairs of atoms in a structure within a requested distance
- Parameters
- struct
parmed.structure.Structure
The structure for which to find all atom pairs
- distfloat
The maximum distance between identified pairs. No pairs separated by less than dist will be omitted, although some pairs greater than dist will be identified.
- subsetset of Atom, optional
If specified, the pairlist will be built only considering these atoms
- struct
- Returns
- pairslist of set of Atom
The list of set of atoms that may be pairs
- Raises
- ValueError if
struct
does not have any coordinates.
- ValueError if
Notes
This function does not do anything with periodic boundary conditions.
-
parmed.utils.
tag_molecules
(struct)[source]¶ Sets the
marked
attribute of every Atom in struct to the molecule number it is a part of. If no bonds are present, every atom is its own molecule.- Parameters
- struct
parmed.Structure
Input structure to tag the molecules for
- struct