OpenMM
|
AmberInpcrdFile parses an AMBER inpcrd file and loads the data stored in it. More...
Public Member Functions | |
def | __init__ |
Load an inpcrd file. More... | |
def | getPositions |
Get the atomic positions. More... | |
def | getVelocities |
Get the atomic velocities. More... | |
def | getBoxVectors |
Get the periodic box vectors. More... | |
Public Attributes | |
positions | |
The atom positions read from the inpcrd file. More... | |
boxVectors | |
The periodic box vectors read from the inpcrd file. More... | |
velocities | |
The atom velocities read from the inpcrd file. More... | |
AmberInpcrdFile parses an AMBER inpcrd file and loads the data stored in it.
def __init__ | ( | self, | |
file, | |||
loadVelocities = False , |
|||
loadBoxVectors = False |
|||
) |
Load an inpcrd file.
An inpcrd file contains atom positions and, optionally, velocities and periodic box dimensions. Unfortunately, it is sometimes impossible to determine from the file itself exactly what data it contains. You therefore must specify in advance what data to load. It is stored into this object's "positions", "velocities", and "boxVectors" fields.
file | (string) the name of the file to load |
loadVelocities | (boolean=False) whether to load velocities from the file |
loadBoxVectors | (boolean=False) whether to load the periodic box vectors |
def getBoxVectors | ( | self, | |
asNumpy = False |
|||
) |
Get the periodic box vectors.
asNumpy | (boolean=False) if true, the values are returned as a numpy array instead of a list of Vec3s |
References AmberInpcrdFile._numpyBoxVectors, and AmberInpcrdFile.boxVectors.
def getPositions | ( | self, | |
asNumpy = False |
|||
) |
Get the atomic positions.
asNumpy | (boolean=False) if true, the values are returned as a numpy array instead of a list of Vec3s |
References AmberInpcrdFile._numpyPositions, and AmberInpcrdFile.positions.
def getVelocities | ( | self, | |
asNumpy = False |
|||
) |
Get the atomic velocities.
asNumpy | (boolean=False) if true, the vectors are returned as numpy arrays instead of Vec3s |
References AmberInpcrdFile._numpyVelocities, and AmberInpcrdFile.velocities.
boxVectors |
The periodic box vectors read from the inpcrd file.
Referenced by AmberInpcrdFile.getBoxVectors().
positions |
The atom positions read from the inpcrd file.
Referenced by Modeller.add(), Modeller.addExtraParticles(), Modeller.addHydrogens(), Modeller.addSolvent(), Modeller.convertWater(), Modeller.delete(), Modeller.getPositions(), AmberInpcrdFile.getPositions(), and DesmondDMSFile.getPositions().
velocities |
The atom velocities read from the inpcrd file.
Referenced by AmberInpcrdFile.getVelocities().