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

Class System

object --+
         |
        System

Instance Methods [hide private]
 
__init__(self, _ptr)
Construct from SystemPtr.
 
__eq__(self, x)
 
__ne__(self, x)
 
__hash__(self)
hash(x)
 
__repr__(self)
repr(x)
 
name(self, s)
 
addAtom(self)
add and return a new Atom in its own residue
 
addResidue(self)
add and return a new Residue in its own chain
 
addChain(self, ct=_msys.BadId)
add and return a new Chain.
 
addCt(self)
add and return a new Ct
 
delAtoms(self, atoms)
remove the given Atoms from the System
 
delBonds(self, bonds)
remove the given Bonds from the System
 
delResidues(self, residues)
remove the given Residues from the System
 
delChains(self, chains)
remove the given Chains from the System
 
atom(self, id)
return the atom with the specified id
 
bond(self, id)
return the bond with the specified id
 
residue(self, id)
return the residue with the specified id
 
chain(self, id)
return the chain with the specified id
 
ct(self, id)
return the Ct with the specified id
 
findBond(self, a1, a2)
return the bond between the specified atoms, or None if not found
 
cell(self)
The GlobalCell for this System
 
nonbonded_info(self, nbinfo)
 
natoms(self)
number of atoms
 
nbonds(self)
number of bonds
 
nresidues(self)
number of residues
 
nchains(self)
number of chains
 
ncts(self)
number of Cts
 
atoms(self)
return list of all atoms in the system
 
bonds(self)
return list of all bonds in the system
 
chains(self)
return list of all chains in the system
 
cts(self)
return list of all cts in the system
 
residues(self)
return list of all residues in the sytem
 
addAtomProp(self, name, type)
add a custom atom property with the given name and type.
 
delAtomProp(self, name)
remove the given custom atom property
 
atom_props(self)
return the list of custom atom properties.
 
atomPropType(self, name)
type of the given atom property
 
atomsGroupedBy(self, prop)
Return dictionary mapping representative values of the given atom property to lists of atoms having that property.
 
positions(self, pos)
 
getPositions(self)
get copy of positions as Nx3 array
 
setPositions(self, pos)
set positions from Nx3 array
 
getVelocities(self)
get copy of velocities as N3x array
 
setVelocities(self, vel)
set velocities from Nx3 array
 
setCell(self, cell)
set unit cell from from 3x3 array
 
getCell(self)
return copy of unit cell as 3x3 numpy array
 
center(self)
return geometric center of positions of all atoms
 
translate(self, xyz)
shift coordinates by given amount
 
addBondProp(self, name, type)
add a custom bond property with the given name and type.
 
delBondProp(self, name)
remove the given custom bond property
 
bond_props(self)
return the list of custom bond properties.
 
bondPropType(self, name)
type of the given bond property
 
topology(self)
list of bonded atoms for each atom in the System
 
table_names(self)
names of the tables in the System
 
tables(self)
all the tables in the System
 
table(self, name)
Get the TermTable with the given name, raising ValueError if not present.
 
getTable(self, name)
Return the TermTable with the given name, or None if not present.
 
addTable(self, name, natoms, params=None)
add a table with the given name and number of atoms.
 
addTableFromSchema(self, type, name=None)
Add a table to the system if it not already present, returning it.
 
coalesceTables(self)
Invoke TermTable.coalesce on each table
 
auxtable_names(self)
names of the auxiliary tables
 
auxtables(self)
all the auxiliary tables
 
auxtable(self, name)
auxiliary table with the given name
 
addAuxTable(self, name, table)
add or replace extra table with the given name.
 
delAuxTable(self, name)
remove auxiliary table with the given name.
 
addNonbondedFromSchema(self, funct, rule="")
Add a nonbonded table to the system, and configure the nonbonded info according to funct and rule.
 
_update_atoms(self)
 
atomsel(self, sel)
Create and return an atom selection object (Atomsel).
 
select(self, seltext)
return a list of Atoms satisfying the given VMD atom selection.
 
selectIds(self, seltext, pos=None, box=None)
Return the ids of the Atoms satisfying the given VMD atom selection.
 
selectArr(self, seltext)
Return the ids of the Atoms satisfying the given VMD atom selection as a numpy array of type uint32.
 
selectChain(self, 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(self, name=None)
Return a single Ct with the matching name, or raises an exception if no single such Ct is present
 
append(self, system)
Appends atoms and forcefield from system to self.
 
clone(self, seltext=None, share_params=False)
Clone the System, returning a new System.
 
sorted(self)
Return a clone of the system with atoms reordered based on their order of appearance in a depth-first traversal of the structure hierarchy.
 
permuted(self, perm)
Return a permutation of the atoms in the system.
 
guessBonds(self, replace=True, reanalyze=True)
Guess bond connectivity based on an atomic-number based atom radius.
 
analyze(self)
Assign atom and residue types.
 
updateFragids(self)
Find connected sets of atoms, and assign each a 0-based id, stored in the fragment property of the atom.
 
provenance(self)
return a list of Provenance entries for this system
 
findContactIds(self, cutoff, ids=None, other=None, pos=None)
Find atoms not bonded to each other which are within cutoff of each other.

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, _ptr)
(Constructor)

 

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

Overrides: object.__init__

__hash__(self)
(Hashing function)

 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

name(self, s)

 
Decorators:
  • @name.setter

addChain(self, ct=_msys.BadId)

 

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

cell(self)

 

The GlobalCell for this System

Decorators:
  • @property

nonbonded_info(self, nbinfo)

 
Decorators:
  • @nonbonded_info.setter

natoms(self)

 

number of atoms

Decorators:
  • @property

nbonds(self)

 

number of bonds

Decorators:
  • @property

nresidues(self)

 

number of residues

Decorators:
  • @property

nchains(self)

 

number of chains

Decorators:
  • @property

ncts(self)

 

number of Cts

Decorators:
  • @property

atoms(self)

 

return list of all atoms in the system

Decorators:
  • @property

bonds(self)

 

return list of all bonds in the system

Decorators:
  • @property

chains(self)

 

return list of all chains in the system

Decorators:
  • @property

cts(self)

 

return list of all cts in the system

Decorators:
  • @property

residues(self)

 

return list of all residues in the sytem

Decorators:
  • @property

addAtomProp(self, name, type)

 

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

atom_props(self)

 

return the list of custom atom properties.

Decorators:
  • @property

atomsGroupedBy(self, 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(self, pos)

 
Decorators:
  • @positions.setter

center(self)

 

return geometric center of positions of all atoms

Decorators:
  • @property

addBondProp(self, name, type)

 

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

bond_props(self)

 

return the list of custom bond properties.

Decorators:
  • @property

topology(self)

 

list of bonded atoms for each atom in the System

Decorators:
  • @property

table_names(self)

 

names of the tables in the System

Decorators:
  • @property

tables(self)

 

all the tables in the System

Decorators:
  • @property

addTable(self, 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(self, 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.

auxtable_names(self)

 

names of the auxiliary tables

Decorators:
  • @property

auxtables(self)

 

all the auxiliary tables

Decorators:
  • @property

addNonbondedFromSchema(self, 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(self, sel)

 

Create and return an atom selection object (Atomsel). sel can be either a list of GIDs or a string.

selectIds(self, 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.

append(self, 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(self, seltext=None, share_params=False)

 

Clone the System, returning a new System. If seltext is provided, it should be a valid VMD atom selection, and only the selected atoms will be cloned.

If seltext is a sequence (and not a string), it will be treated as a list of atom ids.

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.

permuted(self, perm)

 

Return a permutation of the atoms in the system. perm should be either a permutation of range(natoms), or a permutation of the atoms in the system.

guessBonds(self, 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(self)

 

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(self)

 

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(self)

 

return a list of Provenance entries for this system

Decorators:
  • @property

findContactIds(self, 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.