OpenMM
|
PDBxFile parses a PDBx/mmCIF file and constructs a Topology and a set of atom positions from it. More...
Public Member Functions | |
def | __init__ |
Load a PDBx/mmCIF file. More... | |
def | getTopology |
Get the Topology of the model. More... | |
def | getNumFrames |
Get the number of frames stored in the file. More... | |
def | getPositions |
Get the atomic positions. More... | |
Public Attributes | |
topology | |
The Topology read from the PDBx/mmCIF file. More... | |
positions | |
The atom positions read from the PDBx/mmCIF file. More... | |
PDBxFile parses a PDBx/mmCIF file and constructs a Topology and a set of atom positions from it.
def __init__ | ( | self, | |
file | |||
) |
Load a PDBx/mmCIF file.
The atom positions and Topology can be retrieved by calling getPositions() and getTopology().
file | (string) the name of the file to load. Alternatively you can pass an open file object. |
def getNumFrames | ( | self | ) |
Get the number of frames stored in the file.
References PDBxFile._positions, PDBFile._positions, and GromacsGroFile._positions.
def getPositions | ( | self, | |
asNumpy = False , |
|||
frame = 0 |
|||
) |
Get the atomic positions.
asNumpy | (boolean=False) if true, the values are returned as a numpy array instead of a list of Vec3s |
frame | (int=0) the index of the frame for which to get positions |
References AmberInpcrdFile._numpyPositions, PDBxFile._numpyPositions, PDBFile._numpyPositions, GromacsGroFile._numpyPositions, PDBxFile._positions, PDBFile._positions, and GromacsGroFile._positions.
def getTopology | ( | self | ) |
Get the Topology of the model.
References PDBxFile.topology, Modeller.topology, PDBFile.topology, AmberPrmtopFile.topology, and GromacsTopFile.topology.
positions |
The atom positions read from the PDBx/mmCIF file.
If the file contains multiple frames, these are the positions in the first frame.
Referenced by AmberInpcrdFile.getPositions().
topology |
The Topology read from the PDBx/mmCIF file.
Referenced by DesmondDMSFile.getTopology(), and PDBxFile.getTopology().