schrodinger.application.desmond.packages.msys package

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

class schrodinger.application.desmond.packages.msys.Handle(_ptr, _id)

Bases: object

__slots__ = ('_ptr', '_id')
__init__(_ptr, _id)

Initialize self. See help(type(self)) for accurate signature.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__hash__()

Return hash(self).

id

id of this object in the parent System

system

parent System

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

class schrodinger.application.desmond.packages.msys.Bond(_ptr, _id)

Bases: schrodinger.application.desmond.packages.msys.Handle

Represents a bond in a System

__slots__ = ()
__repr__()

Return repr(self).

data()
remove()

remove this Bond from the System

first

first Atom in the bond (the one with lower id)

second

second Atom in the bond (the one with higher id)

other(atom)

atom in bond not the same as given atom

atoms

Atoms in this Bond

__setitem__(key, val)

set custom Bond property

__getitem__(key)

get custom Bond property

__contains__(key)

does custom Bond property exist?

order

bond order (int)

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(x)

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__()

Return hash(self).

__init__(_ptr, _id)

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__(x)

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

id

id of this object in the parent System

system

parent System

class schrodinger.application.desmond.packages.msys.Atom(_ptr, _id)

Bases: schrodinger.application.desmond.packages.msys.Handle

Represents an atom (or pseudoparticle) in a chemical system

__slots__ = ()
__repr__()

Return repr(self).

fullname
data()
remove()

remove this Atom from the System

__setitem__(key, val)

set atom property key to val

__getitem__(key)

get atom property key

__contains__(key)

does atom property key exist?

addBond(other)

create and return a Bond from self to other

findBond(other)

Find the bond between self and Atom other; None if not found

pos

position

vel

velocity

residue
bonds

Bonds connected to this atom

bonded_atoms

Atoms bonded to this atom

nbonds

number of bonds to this atom

nhydrogens

number of bonded hydrogens

valence

sum of bond orders

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(x)

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__()

Return hash(self).

__init__(_ptr, _id)

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__(x)

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

aromatic
atomic_number
charge
formal_charge
fragid
id

id of this object in the parent System

mass
name
system

parent System

vx
vy
vz
x
y
z
class schrodinger.application.desmond.packages.msys.Residue(_ptr, _id)

Bases: schrodinger.application.desmond.packages.msys.Handle

Represents a residue (group of Atoms) in a System

__slots__ = ()
__repr__()

Return repr(self).

data()
remove()

remove this Residue from the System

addAtom()

append a new Atom to this Residue and return it

atoms

list of Atoms in this Residue

natoms

number of atoms in this residue

chain

parent chain

resid

the PDB residue identifier

name

residue name

insertion

insertion code

center

return geometric center of positions of atoms in residue

selectAtom(name=None)

Returns a single Atom from this residue with the given name, or None if no such atom is present. If multiple atoms in the residue have that name, raise an exception.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(x)

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__()

Return hash(self).

__init__(_ptr, _id)

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__(x)

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

id

id of this object in the parent System

system

parent System

class schrodinger.application.desmond.packages.msys.Chain(_ptr, _id)

Bases: schrodinger.application.desmond.packages.msys.Handle

Represents a chain (of Residues) in a System

__slots__ = ()
__repr__()

Return repr(self).

data()
remove()

remove this Chain from the System

addResidue()

append a new Residue to this Chain and return it

residues

list of Residues in this Chain

nresidues

number of residues in this chain

selectResidue(resid=None, name=None, insertion=None)

Returns a single Residue with the given resid, name, and/or insertion code. If no such residue is found, returns None. If multiple such residues are found within this chain, raises an exception.

ct

Return the Ct for this chain

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(x)

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__()

Return hash(self).

__init__(_ptr, _id)

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__(x)

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

id

id of this object in the parent System

name
segid
system

parent System

class schrodinger.application.desmond.packages.msys.Ct(_ptr, _id)

Bases: schrodinger.application.desmond.packages.msys.Handle

Represents a list of Chains in a System

The Ct class exists mainly to provide a separate namespace for chains. If you merge two systems each of which has a chain A, you probably want the chains to remain separate. Cts accomplish this.

The Ct class also provides a key-value namespace for assigning arbitrary properties to Systems.

__slots__ = ()
data()
remove()

remove this Ct from the System

addChain()

append a new Chain to this Ct and return it

chains

list of Chains in this Ct

nchains

number of Chains in this Ct

natoms

number of Atoms in the Ct

atoms

list of Atoms in this Ct

bonds

list of Bonds in this Ct

append(system)

Appends atoms and forcefield from system to self. Returns a list of of the new created atoms in self. Systems must have identical nonbonded_info.vdw_funct. Does not overwrite the global cell information in self.

name

Name of Ct

keys()

available Ct properties

__setitem__(key, val)

set ct property key to val

__getitem__(key)

get ct property key

__delitem__(key)

remove property key

get(key, d=None)

get ct property key, else d, which defaults to None

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(x)

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__()

Return hash(self).

__init__(_ptr, _id)

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__(x)

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

id

id of this object in the parent System

system

parent System

class schrodinger.application.desmond.packages.msys.PropertyMap(ptr)

Bases: object

__init__(ptr)

Initialize self. See help(type(self)) for accurate signature.

keys()
__getitem__(key)
__setitem__(key, val)
__delitem__(key)
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.packages.msys', '__init__': <function PropertyMap.__init__>, 'keys': <function PropertyMap.keys>, '__getitem__': <function PropertyMap.__getitem__>, '__setitem__': <function PropertyMap.__setitem__>, '__delitem__': <function PropertyMap.__delitem__>, '__dict__': <attribute '__dict__' of 'PropertyMap' objects>, '__weakref__': <attribute '__weakref__' of 'PropertyMap' objects>, '__doc__': None})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.desmond.packages.msys.Param(_ptr, _id)

Bases: schrodinger.application.desmond.packages.msys.Handle

A Param instance is a reference to a row in a ParamTable. Use the dict-style interface to get and set values in the row. Msys will take care of converting input values to the type of the corresponding column, and raise an exception if the conversion cannot be performed.

__slots__ = ()
__repr__()

Return repr(self).

id

id in parent table

table

parent ParamTable

system

parent System

keys()

sorted list of available properties

__setitem__(prop, val)

update the value of prop with val

__getitem__(prop)

get the value of prop

duplicate()

create a new entry in the parent parameter table with the same values as this one, returning it.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(x)

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__()

Return hash(self).

__init__(_ptr, _id)

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__(x)

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

class schrodinger.application.desmond.packages.msys.ParamTable(_ptr)

Bases: object

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. A ParamTable is used by TermTables to hold the shared parameters for its Terms.

__slots__ = ('_ptr',)
__init__(_ptr)

Initialize self. See help(type(self)) for accurate signature.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__hash__()

Return hash(self).

addParam(**kwds)

add and return a new Param().

If keyword arguments are supplied, they will be assigned to the newly created Param before returning it.

addProp(name, type)

add a new property of the given type, which must be int, float, or str.

props

names of the properties

nprops

number of properties

propType(name)

type of the property with the given name

delProp(name)

removes the property with the given name.

param(id)

fetch the Param with the given id

nparams

number of Params

params

list of all Params in table

find(name, value)

return the Params with the given value for name

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

class schrodinger.application.desmond.packages.msys.Term(_ptr, _id)

Bases: schrodinger.application.desmond.packages.msys.Handle

A Term is a handle for an entry in a TermTable.

The properties of a Term can be read and updated using a dictionary like interface. Both “term properties” and properties from the ParamTable are accessed through the same interface. To add or remove properties, use the provided methods in the TermTable or ParamTable instance. If a Term’s param is shared by another Term in any other TermTable, Msys will take care of providing the Term with its own Param containing a copy of the original properties before applying the changes. However, if you a modify a Param through its dictionary interface, you will affect all Terms that happen to share that Param:

# fetch the stretch_harm table
table = mol.table('stretch_harm')
# update the properties of just the first Term
table.term(0)['fc'] = 320
# update the properties of all terms that use this param!
table.term(0).param['fc'] = 320
__slots__ = ()
__repr__()

Return repr(self).

paramid
remove()

remove the given Term from its TermTable

id

id of this term in its TermTable

system

parent System of parent TermTable

param

The Param corresponding to this Term’s parameters

atoms

list of Atoms for this Term

table

parent TermTable

keys()

union of table.params.props and table.term_props

__getitem__(prop)

get the value of property prop

__setitem__(prop, val)

set the value of property prop

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__eq__(x)

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__()

Return hash(self).

__init__(_ptr, _id)

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__(x)

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

class schrodinger.application.desmond.packages.msys.TermTable(_ptr)

Bases: object

Each TermTable is intended to describe a specific type of interaction, e.g. stretch, angle, Lennard-Jones, constraint_hoh, etc. A TermTable has an arity (given by the natoms property) which specifies how many atoms are involved in each interaction: one for nonbonded terms, two for stretch terms, etc. Each interaction instance is described by a Term. Each Term references the appropriate number of atoms, and exactly one Param, which lives in a ParamTable owned (or possible shared) by the TermTable.

The functional form described by a TermTable is not part of msys; all msys does is represent the forcefield parameters in a generic way.

__slots__ = ('_ptr',)
__init__(_ptr)

Construct from TermTablePtr. Do not invoke directly; use System.addTable or System.table instead

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__hash__()

Return hash(self).

remove()

Remove this table from its parent system

coalesce()

Reassign param for each Term in this Table to a member of the distinct set of Params used by those Terms.

props

Table properties

name

name of this table

__repr__()

Return repr(self).

params

The ParamTable for terms in this table.

system

The System whose atoms are referenced by this table.

term_props

names of the custom properties

natoms

number of atoms in each term

category

A string describing what kind of TermTable this is. Possibilities are: bond, constraint, virtual, polar, nonbonded, and exclusion.

nterms

number of terms

delTermsWithAtom(atom)

remove all terms whose atoms list contains the given Atom

findWithAll(atoms)

return the terms that contain all the given atoms in any order

findWithAny(atoms)

return the terms that contain at least one of the given atoms

findWithOnly(atoms)

return the terms that contain only the given atoms

findExact(atoms)

return the terms that contain precisely the given atoms in the given order.

terms

returns a list of all the Terms in the table

term(id)

returns the Term in the table with the given id

hasTerm(id)

Does a Term with the given id exist in the table?

addTermProp(name, type)

add a custom Term property of the given type

delTermProp(name)

remove the custom Term property

termPropType(name)

type of the given Term property

addTerm(atoms, param=None)

Add a Term to the table, with given initial param. The atoms list must have natoms elements, and each Atom must belong to the same System as the TermTable. If param is not None, it must belong to the ParamTable held by the TermTable.

override_params

parameter table containing override values

noverrides

number of parameter overrides

overrides()

return a mapping from pairs of Params in self.params to a Param in self.override_params.

setOverride(pi, pj, op)

override the interaction between params pi and pj with the interaction given by op. pi and pj must be Params from self.params; op must be a param from self.override_params, or None to remove the override.

getOverride(pi, pj)

get override for given pair of params, or None if not present.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

class schrodinger.application.desmond.packages.msys.System(_ptr, glued_topology=None)

Bases: object

The System class holds all structure and forcefield data for a single chemical system. Create a new System using msys.CreateSystem(), or from a file using msys.LoadDMS or msys.LoadMAE.

A System organizes the information in a DMS file into several different groups:

  • Tables - TermTables are grouped and accessed by name
  • cell - the unit cell vectors for the System, in the form of a 3x3 NumPy array.
  • nonbonded_info - the NonbondedInfo object describing the type of nonbonded interactions.
  • provenance - a list of Provenance objects describing how the input file has been processed.
  • Auxiliary tables: Everything else in the DMS file that does not fit into one of the above categories finds its way into an auxiliary table. Notable denizens of this category include:
    • cmap tables
    • forcefield (annotation for parameters in the DMS file)
__slots__ = ('_ptr', '_atoms', '_glued_topology', '_nactive')
__getinitargs__()

Pickle support (requires cPickle.HIGHEST_PROTOCOL)

__init__(_ptr, glued_topology=None)

Construct from SystemPtr. Do not invoke directly; use CreateSystem() instead.

__eq__(x)

Return self==value.

__ne__(x)

Return self!=value.

__hash__()

Return hash(self).

__repr__()

Return repr(self).

name

The name of the System, taken from the input file name

addAtom()

add and return a new Atom in its own residue

addResidue()

add and return a new Residue in its own chain

addChain(ct=4294967295)

add and return a new Chain. If no ct is given, the chain will be added to the first ct, creating one if necessary.

addCt()

add and return a new Ct

delAtoms(atoms)

remove the given Atoms from the System

delBonds(bonds)

remove the given Bonds from the System

delResidues(residues)

remove the given Residues from the System

delChains(chains)

remove the given Chains from the System

atom(id)

return the atom with the specified id

bond(id)

return the bond with the specified id

residue(id)

return the residue with the specified id

chain(id)

return the chain with the specified id

ct(id)

return the Ct with the specified id

findBond(a1, a2)

return the bond between the specified atoms, or None if not found

cell

The GlobalCell for this System

nonbonded_info

NonbondedInfo for this System

natoms

number of atoms

nactive

Number of active atoms

nbonds

number of bonds

nresidues

number of residues

nchains

number of chains

ncts

number of Cts

atoms

return list of all atoms in the system

bonds

return list of all bonds in the system

residues

return list of all residues in the system

chains

return list of all chains in the system

cts

return list of all cts in the system

addAtomProp(name, type)

add a custom atom property with the given name and type. type should be int, float, or str.

delAtomProp(name)

remove the given custom atom property

atom_props

return the list of custom atom properties.

atomPropType(name)

type of the given atom property

atomsGroupedBy(prop)

Return dictionary mapping representative values of the given atom property to lists of atoms having that property. If the property does not exist in this system, returns an empty dictionary.

positions

Nx3 list of lists of positions of all atoms

getPositions()

get copy of positions as Nx3 array

setPositions(pos)

set positions from Nx3 array

getVelocities()

get copy of velocities as N3x array

setVelocities(vel)

set velocities from Nx3 array. vel can be None, and in this case this function has no effects.

setCell(cell)

set unit cell from from 3x3 array

getCell()

return copy of unit cell as 3x3 numpy array

center

return geometric center of positions of all atoms

translate(xyz)

shift coordinates by given amount

addBondProp(name, type)

add a custom bond property with the given name and type. type should be int, float, or str.

delBondProp(name)

remove the given custom bond property

bond_props

return the list of custom bond properties.

bondPropType(name)

type of the given bond property

topology

list of bonded atoms for each atom in the System

table_names

names of the tables in the System

tables

all the tables in the System

table(name)

Get the TermTable with the given name, raising ValueError if not present.

getTable(name)

Return the TermTable with the given name, or None if not present.

addTable(name, natoms, params=None)

add a table with the given name and number of atoms. If a table with the same name already exists, it is returned, otherwise the newly created table is returned. If no ParamTable params is supplied, a new one is created.

addTableFromSchema(type, name=None)

Add a table to the system if it not already present, returning it. If optional name field is provided, the table will be added with the given name; otherwise the name is taken from the table schema.

coalesceTables()

Invoke TermTable.coalesce on each table

auxtable_names

names of the auxiliary tables

auxtables

all the auxiliary tables

auxtable(name)

auxiliary table with the given name

addAuxTable(name, table)

add or replace extra table with the given name.

delAuxTable(name)

remove auxiliary table with the given name.

addNonbondedFromSchema(funct, rule='')

Add a nonbonded table to the system, and configure the nonbonded info according to funct and rule. funct must be the name of recognized nonbonded type. rule is not checked; at some point in the future we might start requiring that it be one of the valid combining rules for the specified funct. If nonbonded_info’s vdw_funct and vdw_rule are empty, they are overridden by the provided values; otherwise, the corresponding values must agree if funct and rule are not empty. A nonbonded table is returned.

atomsel(sel)

Create and return an atom selection object (Atomsel). Args:

sel (object): str atom selection, or list of GIDs (possibly empty).
Note:
Even if ids are provided, the ids of the selection are in sorted order.
select(seltext)

return a list of Atoms satisfying the given VMD atom selection.

selectIds(seltext, pos=None, box=None)

Return the ids of the Atoms satisfying the given VMD atom selection. This can be considerably faster than calling select().

if pos is supplied, it should be an Nx3 numpy array of positions, where N=self.natoms.

If box is supplied, it should be a 3x3 numpy array of cell vectors, like System.cell.

selectArr(seltext)

Return the ids of the Atoms satisfying the given VMD atom selection as a numpy array of type uint32.

selectChain(name=None, segid=None)

Returns a single Chain with the matching name and/or segid, or raises an exception if no single such chain is present.

selectCt(name=None)

Return a single Ct with the matching name, or raises an exception if no single such Ct is present

append(system)

Appends atoms and forcefield from system to self. Returns a list of of the new created atoms in self. Systems must have identical nonbonded_info.vdw_funct. Overwrites self.global_cell with system.global_cell only when self.global_cell is all zeros.

clone(sel=None, share_params=False)

Clone the System, returning a new System. If selection is provided, it should be an atom selection string, a list of ids, or a list of Atoms.

If share_params is True, then ParamTables will be shared between the old and new systems. By default, copies of the ParamTables are made, but ParamTables shared _within_ the old system will also be shared in the new system.

glued_topology
glue(glue_pts, start_fresh=False)
sorted()

Return a clone of the system with atoms reordered based on their order of appearance in a depth-first traversal of the structure hierarchy.

guessBonds(replace=True, reanalyze=True)

Guess bond connectivity based on an atomic-number based atom radius.

Replaces any existing bonds, unless replace=False is specified.

Reanalyzes fragids and atom types unless reanalyze=False is specified. In that case, you MUST call updateFragids() manually before making any use of the fragment assignment (fragids will be out of date).

analyze()

Assign atom and residue types. This needs to be called manually only if you create a system from scratch, using msys.CreateSystem(); in that case, analyze() should be called before performing any atom selections.

updateFragids()

Find connected sets of atoms, and assign each a 0-based id, stored in the fragment property of the atom. Return a list of fragments as a list of lists of atoms.

provenance

return a list of Provenance entries for this system

findContactIds(cutoff, ids=None, other=None, pos=None)

Find atoms not bonded to each other which are within cutoff of each other. If ids is not None, consider only atoms with the given ids. If other is not None, consider only atom pairs such that one is in ids and the other is in other. If pos is not None, use pos as positions, which should be natoms x 3 regardless of the size of ids or other. pos may be supplied only when there are no deleted atoms in the structure.

Returns a list of (id 1, id 2, distance) tuples for each contact found.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dir__() → list

default dir() implementation

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

class schrodinger.application.desmond.packages.msys.AnnotatedSystem(sys, allow_bad_charges=False)

Bases: object

System that has been annotated with additional chemical information

The AnnotatedSystem class provides chemical annotation useful primarily for evaluating smarts patterns. The system is expected to already have have chemical reasonable bond orders and formal charges, and to have no missing atoms (e.g. hydrogens). If these criteria cannot be met, set allow_bad_charges=True in the constructor to bypass these checks; in that case the AnnotatedSystem can still be used to evaluate smarts patterns, but patterns making use of the electronic state of the system (e.g. aromaticity, hybridization, etc.) will not be correct (the system will appear to be entirely aliphatic). You may also use the AssignBondOrderAndFormalCharge function to assign reasonable bond orders and formal charges, assuming there are no missing atoms.

The AnnotatedSystem defines a model for aromaticity. First, the SSSR (smallest set of smallest rings) is determined. Next, rings which share bonds are detected and grouped into ring systems. Rings are initially marked as nonaromatic. If the ring system taken as a whole is deemed to be aromatic, then all rings within it are aromatic as well; otherwise, individual rings are checked for aromaticity. Rings are checked in this fashion until no new rings are found to be aromatic.

A ring system is deemed to be aromatic if it satisfies Huckel’s 4N+2 rule for the number of electrons in the ring(s). An internal double bond (i.e. a bond between two atoms in the ring) adds 2 to the electron count. An external double bond (a bond between a ring atom and an atom not in that ring) adds 1 to the electron count. An external double bond between a carbon and a nonaromatic carbon makes the ring unconditionally nonaromtic. An atom with a lone pair and no double bonds adds 2 to the electron count.

__init__(sys, allow_bad_charges=False)

Construct from System. AnnotatedSystem is not updated if System is subsequently modified.

__repr__()

Return repr(self).

errors

List of errors found during system analysis if allow_bad_charges=True

aromatic(atom_or_bond)

Is atom or bond aromatic

hcount(atom)

Number of bonded hydrogens

degree(atom)

Number of (non-pseudo) bonds

valence(atom)

Sum of bond orders of all (non-pseudo) bonds

loneelectrons(atom)

Number of lone electrons

hybridization(atom)

Atom hybridization – 1=sp, 2=sp2, 3=sp3, 4=sp3d, etc.

Equal to 0 for hydrogen and atoms with no bonds, otherwise max(1, a.degree() + (a.lone_electrons+1)/2 - 1).

ringbondcount(atom)

Number of ring bonds

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.packages.msys', '__doc__': " System that has been annotated with additional chemical information\n\n The AnnotatedSystem class provides chemical annotation useful\n primarily for evaluating smarts patterns. The system is expected to\n already have have chemical reasonable bond orders and formal charges,\n and to have no missing atoms (e.g. hydrogens). If these criteria\n cannot be met, set allow_bad_charges=True in the constructor to bypass\n these checks; in that case the AnnotatedSystem can still be used to\n evaluate smarts patterns, but patterns making use of the electronic\n state of the system (e.g. aromaticity, hybridization, etc.) will\n not be correct (the system will appear to be entirely aliphatic).\n You may also use the AssignBondOrderAndFormalCharge function to\n assign reasonable bond orders and formal charges, assuming there\n are no missing atoms.\n\n The AnnotatedSystem defines a model for aromaticity. First, the SSSR\n (smallest set of smallest rings) is determined. Next, rings which\n share bonds are detected and grouped into ring systems. Rings are\n initially marked as nonaromatic. If the ring system taken as a whole\n is deemed to be aromatic, then all rings within it are aromatic as\n well; otherwise, individual rings are checked for aromaticity. Rings\n are checked in this fashion until no new rings are found to be aromatic.\n\n A ring system is deemed to be aromatic if it satisfies Huckel's\n 4N+2 rule for the number of electrons in the ring(s). An internal\n double bond (i.e. a bond between two atoms in the ring) adds 2 to the\n electron count. An external double bond (a bond between a ring atom\n and an atom not in that ring) adds 1 to the electron count. An\n external double bond between a carbon and a nonaromatic carbon makes\n the ring unconditionally nonaromtic. An atom with a lone pair and\n no double bonds adds 2 to the electron count.\n ", '__init__': <function AnnotatedSystem.__init__>, '__repr__': <function AnnotatedSystem.__repr__>, 'errors': <property object>, 'aromatic': <function AnnotatedSystem.aromatic>, 'hcount': <function AnnotatedSystem.hcount>, 'degree': <function AnnotatedSystem.degree>, 'valence': <function AnnotatedSystem.valence>, 'loneelectrons': <function AnnotatedSystem.loneelectrons>, 'hybridization': <function AnnotatedSystem.hybridization>, 'ringbondcount': <function AnnotatedSystem.ringbondcount>, '__dict__': <attribute '__dict__' of 'AnnotatedSystem' objects>, '__weakref__': <attribute '__weakref__' of 'AnnotatedSystem' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.desmond.packages.msys.SmartsPattern(pattern)

Bases: object

A class representing a compiled SMARTS pattern

The Msys smarts implementation is similar to that of Daylight smarts, with support for arbitrarily nested recursive smarts. A few features are not currently supported; warnings will be generated when these constructs are used in a smarts pattern.

  • Directional bonds; e.g. \ and /; these are treated as single bonds (i.e. as a - character).
  • Chiral specification (@, @@, etc); ignored.
  • Implicit hydrogen (h): treated as explicit H.
  • Explicit degree (D): treated as bond count X.
  • Isotopes: ([12C]): ignored.
  • Atom class ([C:6]): ignored.

On the other hand, Msys does support hybridization using the ^ token, as in OpenBabel:

[c^2]       select sp2 aromatic carbon
__init__(pattern)

Initialize with SMARTS pattern

natoms

Number of atoms in the compiled smarts pattern

pattern

The pattern used to initialize the object

warnings

Warnings, if any, emitted during compilation

__repr__()

Return repr(self).

findMatches(annotated_system, atoms=None)

Return list of lists representing ids of matches of this pattern in this system, optionally requiring that the first atom match belongs to the given set of atoms. An AnnotatedSystem must be used here, which can be constructed from a System after calling AssignBondOrderAndFormalCharge.

match(annotated_system)

Return True if a match is found anywhere; False otherwise.

This is much faster than checking for an empty result from findMatches.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.packages.msys', '__doc__': ' A class representing a compiled SMARTS pattern\n\n The Msys smarts implementation is similar to that of `Daylight smarts\n <http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html>`, with\n support for arbitrarily nested recursive smarts. A few features are\n not currently supported; warnings will be generated when these constructs\n are used in a smarts pattern.\n\n * Directional bonds; e.g. ``\\`` and `/`; these are treated as single bonds\n (i.e. as a `-` character).\n\n * Chiral specification (``@``, ``@@``, etc); ignored.\n\n * Implicit hydrogen (``h``): treated as explicit ``H``.\n\n * Explicit degree (``D``): treated as bond count ``X``.\n\n * Isotopes: (``[12C]``): ignored.\n\n * Atom class (``[C:6]``): ignored.\n\n On the other hand, Msys does support hybridization using the ``^`` token,\n as in OpenBabel::\n\n [c^2] select sp2 aromatic carbon\n\n ', '__init__': <function SmartsPattern.__init__>, 'natoms': <property object>, 'pattern': <property object>, 'warnings': <property object>, '__repr__': <function SmartsPattern.__repr__>, 'findMatches': <function SmartsPattern.findMatches>, 'match': <function SmartsPattern.match>, '__dict__': <attribute '__dict__' of 'SmartsPattern' objects>, '__weakref__': <attribute '__weakref__' of 'SmartsPattern' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

schrodinger.application.desmond.packages.msys.CreateSystem()

Create a new, empty System

schrodinger.application.desmond.packages.msys.CreateParamTable()

Create a new, empty ParamTable

schrodinger.application.desmond.packages.msys.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.

schrodinger.application.desmond.packages.msys.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.

schrodinger.application.desmond.packages.msys.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.

schrodinger.application.desmond.packages.msys.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.

schrodinger.application.desmond.packages.msys.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.

schrodinger.application.desmond.packages.msys.LoadXYZ(path)

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

schrodinger.application.desmond.packages.msys.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.

class schrodinger.application.desmond.packages.msys.IndexedFileLoader(path, idx_path=None)

Bases: object

Supports random access to multi-structure files

__init__(path, idx_path=None)

Open an indexed file loader, creating an index file if needed. Args:

path (str): file path. File type is inferred from the extension. idx_path (str): index file path. Defaults to $path.idx.
Note:
You need write permission to the location of the index file.
path

path to source file

__len__()

number of entries

__getitem__(index)

Get structure at given index

Args:
index (int): 0-based index
Returns:
mol (System): msys System
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.packages.msys', '__doc__': ' Supports random access to multi-structure files\n ', '__init__': <function IndexedFileLoader.__init__>, 'path': <property object>, '__len__': <function IndexedFileLoader.__len__>, '__getitem__': <function IndexedFileLoader.__getitem__>, '__dict__': <attribute '__dict__' of 'IndexedFileLoader' objects>, '__weakref__': <attribute '__weakref__' of 'IndexedFileLoader' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

schrodinger.application.desmond.packages.msys.ConvertToRdkit(mol)

Construct an RDKit ROMol from the given System

Args:
mol (System): System
Returns:
rdkit.ROMol
schrodinger.application.desmond.packages.msys.LoadMany(path, structure_only=False, error_writer=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>)

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.

schrodinger.application.desmond.packages.msys.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.

schrodinger.application.desmond.packages.msys.FormatSDF(mol)

Return System in sdf format

schrodinger.application.desmond.packages.msys.ParseSDF(text)

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

schrodinger.application.desmond.packages.msys.ReadPDBCoordinates(mol, path)

Read coordinates and box from the given pdb file into the given System.

schrodinger.application.desmond.packages.msys.ReadCrdCoordinates(mol, path)

Read coordinates from the given Amber crd file into the given System.

schrodinger.application.desmond.packages.msys.SaveDMS(system, path, structure_only=False, unbuffered=False)

Export the System to a DMS file at the given path.

schrodinger.application.desmond.packages.msys.SerializeMAE(system, with_forcefield=True)

Return the MAE form of the System as a string.

schrodinger.application.desmond.packages.msys.SaveMAE(system, path, with_forcefield=True, append=False)

Export the System (or list of systems) to an MAE file at the given path.

schrodinger.application.desmond.packages.msys.SavePDB(system, path, append=False)

Export the System to a PDB file at the given path.

schrodinger.application.desmond.packages.msys.SaveMol2(system, path, selection='none', append=False)

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

schrodinger.application.desmond.packages.msys.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.

schrodinger.application.desmond.packages.msys.TableSchemas()

available schemas for System.addTableFromSchema

schrodinger.application.desmond.packages.msys.NonbondedSchemas()

available nonbonded schemas for System.addNonbondedFromSchema

schrodinger.application.desmond.packages.msys.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]]

schrodinger.application.desmond.packages.msys.GetRingSystems(atoms)

Get ring systems for the given atoms

schrodinger.application.desmond.packages.msys.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

class schrodinger.application.desmond.packages.msys.Graph(system_or_atoms)

Bases: object

Represents the chemical topology of a System

Used mainly to implement graph isomorphism; see the match() method

__init__(system_or_atoms)

Initialize self. See help(type(self)) for accurate signature.

size()

number of atoms in graph

atoms()

ordered atoms in graph

hash()

string hash of atoms and bonds in graph

match(graph)

Find a graph isomorphism between self and the given Graph. If no isomorphism could be found, return None; otherwise return mapping from atoms in this graph to atoms in that graph.

matchAll(graph, substructure=False)

Find all graph isomorphisms between self and the given Graph. If no isomorphism could be found, return empty list; otherwise return list of dicts mapping atoms in this graph to atoms in that graph. If substructure is True, return isomorphisms between self and any subgraph of the given Graph.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.packages.msys', '__doc__': ' Represents the chemical topology of a System\n\n Used mainly to implement graph isomorphism; see the match() method\n ', '_from_boost': <classmethod object>, '__init__': <function Graph.__init__>, 'size': <function Graph.size>, 'atoms': <function Graph.atoms>, 'hash': <function Graph.hash>, 'match': <function Graph.match>, 'matchAll': <function Graph.matchAll>, '__dict__': <attribute '__dict__' of 'Graph' objects>, '__weakref__': <attribute '__weakref__' of 'Graph' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

schrodinger.application.desmond.packages.msys.FindDistinctFragments(system)

Return fragids of representative fragments.

schrodinger.application.desmond.packages.msys.ComputeTopologicalIds(system)

Compute and return the topological ids for the atoms or system

schrodinger.application.desmond.packages.msys.CalcDistance(a, b)

Distance between atoms or positions a and b

schrodinger.application.desmond.packages.msys.CalcAngle(a, b, c)

Angle in radians of atoms or positions a-b-c.

schrodinger.application.desmond.packages.msys.CalcDihedral(a, b, c, d)

Dihedral angle in radians of atoms or positions a-b-c-d

schrodinger.application.desmond.packages.msys.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.

schrodinger.application.desmond.packages.msys.CalcPlanarity(pos_or_atoms)

Planarity of positions or atoms

schrodinger.application.desmond.packages.msys.LineIntersectsTriangle(r, s, a, b, c)

True if line segment rs intersects triangle abc

class schrodinger.application.desmond.packages.msys.InChI(system, DoNotAddH=True, SNon=True, FixedH=True)

Bases: object

InChI holds an the result of an inchi invocation for a structure

__init__(system, DoNotAddH=True, SNon=True, FixedH=True)

Initialize self. See help(type(self)) for accurate signature.

__str__()

Return str(self).

__bool__()
string

Computed inchi string

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.packages.msys', '__doc__': ' InChI holds an the result of an inchi invocation for a structure ', '__init__': <function InChI.__init__>, '__str__': <function InChI.__str__>, '__bool__': <function InChI.__bool__>, 'string': <property object>, 'auxinfo': <property object>, 'message': <property object>, 'ok': <property object>, 'key': <property object>, '__dict__': <attribute '__dict__' of 'InChI' objects>, '__weakref__': <attribute '__weakref__' of 'InChI' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

auxinfo

Auxiliary info

message

Message returned by inchi during calculation

ok

Was an inchi computed successfully?

key

inchi key for this object’s string.

schrodinger.application.desmond.packages.msys.CloneSystem(atoms)

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

DEPRECATED. Use System.clone directly instead.

class schrodinger.application.desmond.packages.msys.SpatialHash(pos, ids=None, box=None)

Bases: object

SpatialHash provides an interface for efficient spatial queries on particle positions.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.packages.msys', '__doc__': ' SpatialHash provides an interface for efficient spatial queries\n on particle positions. ', '__init__': <function SpatialHash.__init__>, 'voxelize': <function SpatialHash.voxelize>, 'findWithin': <function SpatialHash.findWithin>, 'findNearest': <function SpatialHash.findNearest>, 'findContacts': <function SpatialHash.findContacts>, '__dict__': <attribute '__dict__' of 'SpatialHash' objects>, '__weakref__': <attribute '__weakref__' of 'SpatialHash' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

__init__(pos, ids=None, box=None)

Construct from particle positions. If ids are provided, they should be a numpy array of type uint32 and specify which rows of the Nx3 pos array are to be hashed. If box is provided, it must be a 3x3 array of doubles, and the search will be performed using periodic boundary conditions.

voxelize(radius)

Perform voxelization such that findWithin queries with reuse_voxels=True at a radius equal to or less than the given radius can be performed accurately. For queries at radius less than the voxelization, it may be worthwhile to revoxelize at a smaller radius. Note that, by default, findWithin calls voxelize with the query radius as argument, so it is not strictly necessary ever to use this method.

findWithin(radius, pos, ids=None, reuse_voxels=False)

Find particles from pos which are within the given radius of some particle in the spatial hash (i.e. provided in the SpatialHash constructor). By default, voxelization is performed at the same resolution as the query radius, but this can be overridden by calling voxelize() manually, then calling findWithin() with reuse_voxels=True. pos is expected to be an Nx3 array of floats. The ids parameter defaults to arange(len(pos)); supply an array of ids to limit the search to a subset of rows in pos.

findNearest(k, pos, ids=None)

Find at most k particles from pos with the smallest minimum distance to some particle in the spatial hash. If ids is not provided, it defaults to arange(len(pos)).

findContacts(radius, pos, ids=None, reuse_voxels=False)

Find pairs of particles within radius of each other.

Args:
radius (float): search radius pos (array[float]): positions ids (array[uint]): particle indices reuse_voxels (bool): assume voxelize(R>=radius) has already been called
Returns:
i, j, dists (tuple): Mx1 arrays of ids and distances.

The first array corresponds to ids in the call to findContacts; the second column to the ids passed to the SpatialHash constructor.

IMPORTANT: pairs with the same id in the constructor and the call the findContacts are excluded from the output set. Therefore, the positions passsed to findContacts should correspond to the same atom indices as the positions passed to the SpatialHash constructor.

class schrodinger.application.desmond.packages.msys.HydrogenBondFinder(system, donors, acceptors, cutoff=3.5)

Bases: object

Find candidate hydrogen bonds.

More hbonds will be found than are “realistic”; further filtering may be performed using the energy attribute of the returned hbonds. A reasonable filter seems to be around -1.0 (more negative is stronger); i.e. energies greater than that are more likely than not to be spurious.

The HydrogenBond class can also be used directly to compute hydrogen bond geometry and energies by supplying donor, acceptor and hydrogen positions.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.desmond.packages.msys', '__doc__': ' Find candidate hydrogen bonds.\n\n More hbonds will be found than are "realistic"; further filtering\n may be performed using the energy attribute of the returned hbonds.\n A reasonable filter seems to be around -1.0 (more negative is\n stronger); i.e. energies greater than that are more likely than not\n to be spurious.\n\n The HydrogenBond class can also be used directly to compute hydrogen\n bond geometry and energies by supplying donor, acceptor and\n hydrogen positions.\n ', '__init__': <function HydrogenBondFinder.__init__>, 'find': <function HydrogenBondFinder.find>, '__dict__': <attribute '__dict__' of 'HydrogenBondFinder' objects>, '__weakref__': <attribute '__weakref__' of 'HydrogenBondFinder' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.desmond.packages.msys'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

__init__(system, donors, acceptors, cutoff=3.5)
Args:
system (System): msys system donors: selection string, list of ids, or list of Atoms acceptors: selection string, list of ids, or list of Atoms cutoff (float): distance cutoff for donor and acceptor
Note:
If Atoms are provided, they must be members of system.
find(pos=None)

Find hydrogen bonds for the given positions, defaulting to the current positions of the input system.