OpenMM

- Main Page
- Related Pages
- Classes

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
PDBxFile Class Reference

PDBxFile parses a PDBx/mmCIF file and constructs a Topology and a set of atom positions from it. More...

Inheritance diagram for PDBxFile:

## 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...

## Detailed Description

PDBxFile parses a PDBx/mmCIF file and constructs a Topology and a set of atom positions from it.

## Constructor & Destructor Documentation

def __init__ | ( |  | self,
|  |  | file
| ) |  |

Load a PDBx/mmCIF file.

The atom positions and Topology can be retrieved by calling getPositions() and getTopology().

Parameters

  file | (string) the name of the file to load. Alternatively you can pass an open file object.

## Member Function Documentation

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.

Parameters

  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.

## Member Data Documentation

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

The documentation for this class was generated from the following file:

- pdbxfile.py