Package src :: Package toplevel :: Module Physical :: Class Physical
[hide private]
[frames] | no frames]

Class Physical

source code

Defines a physical system: positions, velocities, temperature, boundary conditions, etc.

Instance Methods [hide private]
 
__init__(self) source code
 
copy(self)
Perform a deep copy, avoid reference assignment
source code
 
__getattr__(self, name) source code
 
__setattr__(self, name, val) source code
 
reset(self)
Reset all member variables to default values
source code
float
pressure(self, forces)
Pressure of the system.
source code
float
volume(self)
Volume of the system.
source code
int
N(self)
Number of atoms.
source code
int
numAtoms(self)
Number of atoms.
source code
int
numBonds(self)
Number of bonds.
source code
int
numAngles(self)
Number of angles
source code
int
numDihedrals(self)
Number of dihedrals
source code
int
numImpropers(self)
Number of impropers
source code
int
numDonors(self)
Number of hydrogen donors (for H+ bonding)
source code
int
numAcceptors(self)
Number of hydrogen acceptors (for H+ bonding)
source code
Atom
atom(self, index)
Get an atom at the passed index.
source code
Bond
bond(self, index)
Get a bond at the passed index.
source code
Angle
ang(self, index)
Get an angle at the passed index.
source code
Dihedral
dihedral(self, index)
Get a dihedral at the passed index.
source code
Improper
improper(self, index)
Get an improper at the passed index.
source code
HDonor
donor(self, index)
Get an H+ donor at the passed index.
source code
HAcceptor
acceptor(self, index)
Get an H+ acceptor at the passed index.
source code
float
mass(self, atom)
Mass of an atom.
source code
float
charge(self, atom)
Mass of an atom.
source code
float
temperature(self)
System temperature (K)
source code
float
angle(self, index)
Dihedral angle (rad, -PI to PI) at passed index
source code
 
randomVelocity(self, T)
Assign random velocities.
source code
 
updateCOM_Momenta(self)
Update center of mass and angular momentum
source code
 
build(self)
Build the physical data.
source code
Instance Variables [hide private]
  seed
Random number seed
  exclude
Exclusion Pairs
  cellsize
Cell size
  bc
Boundary conditions
  remcom
Remove COM motion?
  remang
Remove angular momentum?
  defaultCBV
Use default cell basis vectors (PBC)
  time
Current time
  cB1
Cell basis vector 1
  cB2
Cell basis vector 2
  cB3
Cell basis vector 3
  cO
Cell origin
  masses
Diagonal mass matrix
  invmasses
Diagonal inverse mass matrix
  masssum
Sum over all atomic masses
  dirty
Dirty bit
Method Details [hide private]

pressure(self, forces)

source code 

Pressure of the system.

Parameters:
  • forces (Forces) - MDL Forces object
Returns: float
System pressure

volume(self)

source code 

Volume of the system.

Returns: float
System volume

N(self)

source code 

Number of atoms.

Returns: int
Number of atoms.

numAtoms(self)

source code 

Number of atoms.

Returns: int
Number of atoms.

numBonds(self)

source code 

Number of bonds.

Returns: int
Number of bonds

numAngles(self)

source code 

Number of angles

Returns: int
Number of angles

numDihedrals(self)

source code 

Number of dihedrals

Returns: int
Number of dihedrals

numImpropers(self)

source code 

Number of impropers

Returns: int
Number of impropers

numDonors(self)

source code 

Number of hydrogen donors (for H+ bonding)

Returns: int
Number of hydrogen donors

numAcceptors(self)

source code 

Number of hydrogen acceptors (for H+ bonding)

Returns: int
Number of hydrogen acceptors

atom(self, index)

source code 

Get an atom at the passed index.

Parameters:
  • index (int) - Atom index (1 to N)
Returns: Atom
The atom at the passed index.

bond(self, index)

source code 

Get a bond at the passed index.

Parameters:
  • index (int) - Bond index
Returns: Bond
The bond at the passed index.

ang(self, index)

source code 

Get an angle at the passed index.

Parameters:
  • index (int) - Angle index
Returns: Angle
The angle at the passed index.

dihedral(self, index)

source code 

Get a dihedral at the passed index.

Parameters:
  • index (int) - Dihedral index
Returns: Dihedral
The dihedral at the passed index.

improper(self, index)

source code 

Get an improper at the passed index.

Parameters:
  • index (int) - Improper index
Returns: Improper
The improper at the passed index.

donor(self, index)

source code 

Get an H+ donor at the passed index.

Parameters:
  • index (int) - H+ donor index
Returns: HDonor
The H+ donor at the passed index.

acceptor(self, index)

source code 

Get an H+ acceptor at the passed index.

Parameters:
  • index (int) - H+ acceptor index
Returns: HAcceptor
The H+ acceptor at the passed index.

mass(self, atom)

source code 

Mass of an atom.

Parameters:
  • atom (int) - Atom index (1 to N)
Returns: float
Atom mass [amu]

charge(self, atom)

source code 

Mass of an atom.

Parameters:
  • atom (int) - Atom index (1 to N)
Returns: float
Atom mass [amu]

temperature(self)

source code 

System temperature (K)

Returns: float
Kelvin temperature

angle(self, index)

source code 

Dihedral angle (rad, -PI to PI) at passed index

Parameters:
  • index (int) - Dihedral index
Returns: float
Dihedral angle in radians

randomVelocity(self, T)

source code 

Assign random velocities.

Parameters:
  • T (float) - Kelvin temperature.