Package schrodinger :: Package application :: Package desmond :: Package packages :: Package msys
[hide private]
[frames] | no frames]

Package msys

This is the high-level Python interface for msys, intended for use by chemists.

Submodules [hide private]

Classes [hide private]
  Handle
  Bond
Represents a bond in a System
  Atom
Represents an atom (or pseudoparticle) in a chemical system
  Residue
Represents a residue (group of Atoms) in a System
  Chain
Represents a chain (of Residues) in a System
  Ct
Represents a list of Chains in a System
  PropertyMap
  Param
A `Param` instance is a reference to a row in a `ParamTable`.
  ParamTable
The `ParamTable` class is a 2d table, whose rows are indexed by ``id`` and whose columns are properties; see the discussion of properties in the Overview.
  Term
A `Term` is a handle for an entry in a `TermTable`.
  TermTable
Each TermTable is intended to describe a specific type of interaction, e.g.
  System
The `System` class holds all structure and forcefield data for a single chemical system.
  AnnotatedSystem
System that has been annotated with additional chemical information
  SmartsPattern
A class representing a compiled SMARTS pattern
  IndexedFileLoader
Supports random access to multi-structure files
  Graph
Represents the chemical topology of a System
  InChI
InChI holds an the result of an inchi invocation for a structure
  SpatialHash
SpatialHash provides an interface for efficient spatial queries on particle positions.
  HydrogenBondFinder
Find candidate hydrogen bonds.
Functions [hide private]
 
__add_properties(cls, *names)
 
deserialize_system(data, suffix='.dms')
helper function for System pickle support
 
CreateSystem()
Create a new, empty System
 
_convert_ids(hs, klass=<class 'schrodinger.application.desmond.packages.msys.Atom'>)
 
CreateParamTable()
Create a new, empty ParamTable
 
LoadDMS(path=None, structure_only=False, buffer=None)
Load the DMS file at the given path and return a System containing it.
 
LoadMAE(path=None, ignore_unrecognized=False, buffer=None, structure_only=False)
load the MAE file at the given path and return a System containing it.
 
LoadPDB(path)
Load a PDB file at the given path and return a System.
 
LoadPrmTop(path, structure_only=False)
Load an Amber7 prmtop file at the given path and return a System.
 
LoadMol2(path, multiple=False)
Load a mol2 file at the given path.
 
LoadXYZ(path)
Load an xyz file at the given path.
 
Load(path, structure_only=False, without_tables=None)
Infer the file type of path and load the file.
 
ConvertToRdkit(mol)
Construct an RDKit ROMol from the given System
 
LoadMany(path, structure_only=False, error_writer=sys.stdout)
Iterate over structures in a file, if the file type supports iteration.
 
Save(mol, path, append=False, structure_only=False)
Save the given system to path, using a file format guessed from the path name.
 
FormatSDF(mol)
Return System in sdf format
 
ParseSDF(text)
Iterate over blocks in sdf format text.
 
ReadPDBCoordinates(mol, path)
Read coordinates and box from the given pdb file into the given System.
 
ReadCrdCoordinates(mol, path)
Read coordinates from the given Amber crd file into the given System.
 
SaveDMS(system, path, structure_only=False, unbuffered=False)
Export the System to a DMS file at the given path.
 
SerializeMAE(system, with_forcefield=True)
Return the MAE form of the System as a string.
 
SaveMAE(system, path, with_forcefield=True, append=False)
Export the System (or list of systems) to an MAE file at the given path.
 
SavePDB(system, path, append=False)
Export the System to a PDB file at the given path.
 
SaveMol2(system, path, append=False)
Export the System to a mol2 file at the given path.
 
FromSmilesString(smiles, forbid_stereo=True)
Construct a System from a smiles string.
 
TableSchemas()
available schemas for System.addTableFromSchema
 
NonbondedSchemas()
available nonbonded schemas for System.addNonbondedFromSchema
 
GetSSSR(atoms, all_relevant=False)
Get smallest set of smallest rings (SSSR) for a system fragment.
 
GetRingSystems(atoms)
Get ring systems for the given atoms
 
AssignBondOrderAndFormalCharge(system_or_atoms, total_charge=None)
Assign bond orders and formal charges to a molecular system.
 
FindDistinctFragments(system)
Return fragids of representative fragments.
 
ComputeTopologicalIds(system)
Compute and return the topological ids for the atoms or system
 
CalcDistance(a, b)
Distance between atoms or positions a and b
 
CalcAngle(a, b, c)
Angle in radians of atoms or positions a-b-c.
 
CalcDihedral(a, b, c, d)
Dihedral angle in radians of atoms or positions a-b-c-d
 
ApplyDihedralGeometry(a, b, c, r, theta, phi)
Return the position of atom d with cd length r, bcd angle theta, and abcd dihedral phi, all in radians.
 
CalcPlanarity(pos_or_atoms)
Planarity of positions or atoms
 
LineIntersectsTriangle(r, s, a, b, c)
True if line segment rs intersects triangle abc
 
CloneSystem(atoms)
Call System.clone(atoms) using the System from the first atom.
Variables [hide private]
  __package__ = 'schrodinger.application.desmond.packages.msys'
Function Details [hide private]

LoadDMS(path=None, structure_only=False, buffer=None)

 

Load the DMS file at the given path and return a System containing it. If structure_only is True, only Atoms, Bonds, Residues and Chains will be loaded, along with the GlobalCell, and no pseudos (atoms with atomic number less than one) will be loaded.

If the buffer argument is provided, it is expected to hold the contents of a DMS file, and the path argument will be ignored.

LoadMAE(path=None, ignore_unrecognized=False, buffer=None, structure_only=False)

 

load the MAE file at the given path and return a System containing it. Forcefield tables will be created that attempt to match as closely as possible the force terms in the MAE file; numerical differences are bound to exist. If ignore_unrecognized is True, ignore unrecognized force tables.

If the buffer argument is provided, it is expected to hold the contents of an MAE file, and the path argument will be ignored.

If the contents of the file specified by path, or the contents of buffer, are recognized as being gzip-compressed, they will be decompressed on the fly.

If structure_only is True, no forcefield components will be loaded.

LoadPDB(path)

 

Load a PDB file at the given path and return a System. No bonds will be created, even if CONECT records are parent.

LoadPrmTop(path, structure_only=False)

 

Load an Amber7 prmtop file at the given path and return a System. Coordinates and global cell information are not present in the file.

LoadMol2(path, multiple=False)

 

Load a mol2 file at the given path. If multiple is True, return a list of Systems, one for each MOLECULE record. Otherwise, return just one System corresponding to the first MOLECULE record.

LoadXYZ(path)

 

Load an xyz file at the given path. Guesses bonds based on guessed atomic numbers based on atom name.

Load(path, structure_only=False, without_tables=None)

 

Infer the file type of path and load the file. If without_tables is True or False, it specifies whether TermTables should be loaded along with the structure; by default it takes the value of structure_only.

Returns a new System.

ConvertToRdkit(mol)

 
Construct an RDKit ROMol from the given System

Args:
    mol (System): System

Returns:
    rdkit.ROMol

LoadMany(path, structure_only=False, error_writer=sys.stdout)

 

Iterate over structures in a file, if the file type supports iteration.

for mol in LoadMany('input.mol2'): ...

If there was an error reading a structure, LoadMany returns None for that iteration. If error_writer is not None, it's write() method is invoked with the contents of the exception message as argument. error_writer defaults to sys.stderr.

Save(mol, path, append=False, structure_only=False)

 

Save the given system to path, using a file format guessed from the path name. Not all formats support both append and structure_only options; see the corresponding SaveXXX functions.

ParseSDF(text)

 

Iterate over blocks in sdf format text. Accepts normal and gzipped text.

SaveMol2(system, path, append=False)

 

Export the System to a mol2 file at the given path. You should probably call AssignBondOrderAndFormalCharge() before exporting the system.

FromSmilesString(smiles, forbid_stereo=True)

 
Construct a System from a smiles string.

Args:
    smiles (str): the smiles string
    forbid_stereo (bool): if True, raise exception if smiles has stereo

EXPERIMENTAL.  In particular, stereo information in the smiles string
is ignored.  Set forbid_stereo=False to permit stereo specifications
to be silently ignored.  This flag may be removed at a later date once
stereo support has been added.

GetSSSR(atoms, all_relevant=False)

 

Get smallest set of smallest rings (SSSR) for a system fragment.

The SSSR is in general not unique; the SSSR of a tetrahedron is any three of its four triangular faces. The set of rings that is the union of all SSSR's (all relevant rings) may be obtained by setting all_relevant to True.

Arguments: atoms -- [msys.Atom, ..., msys.Atom] from a single system all_relevant -- bool Returns: [[msys.Atom, ..., msys.Atom], ..., [msys.Atom, ..., msys.Atom]]

AssignBondOrderAndFormalCharge(system_or_atoms, total_charge=None)

 

Assign bond orders and formal charges to a molecular system.

Determines bond orders and formal charges by preferring neutral charges and placing negative charges with more electronegative atoms, under octet constraints and the total system charge constraint. Assigns the bond orders and formal charges to the system. Can assign to a subset of atoms of the system, provided these atoms form complete connected fragments.

WARNING: calling this function on a chemically incomplete system, i.e. just protein backbone, may cause msys to hang indefinitely.

Arguments: system_or_atoms: either a System or a list of Atoms total_charge: if not None, integral total charge

CloneSystem(atoms)

 

Call System.clone(atoms) using the System from the first atom.

DEPRECATED. Use System.clone directly instead.