|Create a new Modeller object. More...|
|Get the Topology of the model. More...|
|Get the atomic positions. More...|
|Add chains, residues, atoms, and bonds to the model. More...|
|Delete chains, residues, atoms, and bonds from the model. More...|
|Delete all water molecules from the model. More...|
|Convert all water molecules to a different water model. More...|
|Add solvent (both water and ions) to the model to fill a rectangular box. More...|
|Add missing hydrogens to the model. More...|
|Add missing extra particles to the model that are required by a force field. More...|
|Load an XML file containing definitions of hydrogens that should be added by addHydrogens(). More...|
|The Topology describing the structure of the system. More...|
|The list of atom positions. More...|
Modeller provides tools for editing molecular models, such as adding water or missing hydrogens.
To use it, create a Modeller object, specifying the initial Topology and atom positions. You can then call various methods to change the model in different ways. Each time you do, a new Topology and list of coordinates is created to represent the changed model. Finally, call getTopology() and getPositions() to get the results.
Add chains, residues, atoms, and bonds to the model.
Specify what to add by providing a new Topology object and the corresponding atomic positions. All chains, residues, atoms, and bonds contained in the Topology are added to the model.
|addTopoology||(Topology) a Topology whose contents should be added to the model|
|addPositions||(list) the positions of the atoms to add|
Referenced by Modeller.addExtraParticles().
Add missing extra particles to the model that are required by a force field.
Some force fields use "extra particles" that do not represent actual atoms, but still need to be included in the System. Examples include lone pairs, Drude particles, and the virtual sites used in some water models to adjust the charge distribution. Extra particles can be recognized by the fact that their element is None.
This method is primarily used to add extra particles, but it can also remove them. It tries to match every residue in the Topology to a template in the force field. If there is no match, it will both add and remove extra particles as necessary to make it match.
|forcefield||(ForceField) the ForceField defining what extra particles should be present|
Add missing hydrogens to the model.
Some residues can exist in multiple forms depending on the pH and properties of the local environment. These variants differ in the presence or absence of particular hydrogens. In particular, the following variants are supported:
Aspartic acid: ASH: Neutral form with a hydrogen on one of the delta oxygens ASP: Negatively charged form without a hydrogen on either delta oxygen
Cysteine: CYS: Neutral form with a hydrogen on the sulfur CYX: No hydrogen on the sulfur (either negatively charged, or part of a disulfide bond)
Glutamic acid: GLH: Neutral form with a hydrogen on one of the epsilon oxygens GLU: Negatively charged form without a hydrogen on either epsilon oxygen
Histidine: HID: Neutral form with a hydrogen on the ND1 atom HIE: Neutral form with a hydrogen on the NE2 atom HIP: Positively charged form with hydrogens on both ND1 and NE2
Lysine: LYN: Neutral form with two hydrogens on the zeta nitrogen LYS: Positively charged form with three hydrogens on the zeta nitrogen
The variant to use for each residue is determined by the following rules:
You can override these rules by explicitly specifying a variant for any residue. Also keep in mind that this function will only add hydrogens. It will never remove ones that are already present in the model, regardless of the specified pH.
Definitions for standard amino acids and nucleotides are built in. You can call loadHydrogenDefinitions() to load additional definitions for other residue types.
|forcefield||(ForceField=None) the ForceField to use for determining the positions of hydrogens. If this is None, positions will be picked which are generally reasonable but not optimized for any particular ForceField.|
|pH||(float=7.0) the pH based on which to select variants|
|variants||(list=None) an optional list of variants to use. If this is specified, its length must equal the number of residues in the model. variants[i] is the name of the variant to use for residue i (indexed starting at 0). If an element is None, the standard rules will be followed to select a variant for that residue.|
|platform||(Platform=None) the Platform to use when computing the hydrogen atom positions. If this is None, the default Platform will be used.|
References Modeller.getPositions(), AmberInpcrdFile.positions, Modeller.positions, DesmondDMSFile.positions, GromacsGroFile.positions, Modeller.topology, AmberPrmtopFile.topology, and GromacsTopFile.topology.
Add solvent (both water and ions) to the model to fill a rectangular box.
The algorithm works as follows:
The box size can be specified in three ways. First, you can explicitly give a box size to use. Alternatively, you can give a padding distance. The largest dimension of the solute (along the x, y, or z axis) is determined, and a cubic box of size (largest dimension)+2*padding is used. Finally, if neither a box size nor a padding distance is specified, the existing Topology's unit cell dimensions are used.
|forcefield||(ForceField) the ForceField to use for determining van der Waals radii and atomic charges|
|model||(string='tip3p') the water model to use. Supported values are 'tip3p', 'spce', 'tip4pew', and 'tip5p'.|
|boxSize||(Vec3=None) the size of the box to fill with water|
|padding||(distance=None) the padding distance to use|
|positiveIon||(string='Na+') the type of positive ion to add. Allowed values are 'Cs+', 'K+', 'Li+', 'Na+', and 'Rb+'|
|negativeIon||(string='Cl-') the type of negative ion to add. Allowed values are 'Cl-', 'Br-', 'F-', and 'I-'. Be aware that not all force fields support all ion types.|
|ionicString||(concentration=0*molar) the total concentration of ions (both positive and negative) to add. This does not include ions that are added to neutralize the system.|
References Modeller.__init__(), Modeller._ResidueData.hydrogens, Modeller._Hydrogen.maxph, Element.name, Residue.name, ForceField._TemplateData.name, Atom.name, ForceField._TemplateAtomData.name, Modeller._ResidueData.name, Modeller._Hydrogen.name, Modeller._Hydrogen.parent, AmberInpcrdFile.positions, Modeller.positions, DesmondDMSFile.positions, GromacsGroFile.positions, Modeller._Hydrogen.terminal, Modeller.topology, AmberPrmtopFile.topology, GromacsTopFile.topology, Modeller._ResidueData.variants, and Modeller._Hydrogen.variants.
Convert all water molecules to a different water model.
|model||(string='tip3p') the water model to convert to. Supported values are 'tip3p', 'spce', 'tip4pew', and 'tip5p'.|
Delete chains, residues, atoms, and bonds from the model.
You can specify objects to delete at any granularity: atoms, residues, or chains. Passing in an Atom object causes that Atom to be deleted. Passing in a Residue object causes that Residue and all Atoms it contains to be deleted. Passing in a Chain object causes that Chain and all Residues and Atoms it contains to be deleted.
In all cases, when an Atom is deleted, any bonds it participates in are also deleted. You also can specify a bond (as a tuple of Atom objects) to delete just that bond without deleting the Atoms it connects.
|toDelete||(list) a list of Atoms, Residues, Chains, and bonds (specified as tuples of Atoms) to delete|
Referenced by Modeller.deleteWater().
Delete all water molecules from the model.
Load an XML file containing definitions of hydrogens that should be added by addHydrogens().
The built in hydrogens.xml file containing definitions for standard amino acids and nucleotides is loaded automatically. This method can be used to load additional definitions for other residue types. They will then be used in subsequent calls to addHydrogens().