# PDBxFile Class Reference

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

List of all members.

## Public Member Functions
def | __init__
| Load a PDBx/mmCIF file.
def | getTopology
| Get the Topology of the model.
def | getNumFrames
| Get the number of frames stored in the file.
def | getPositions
| Get the atomic positions.
## Public Attributes
| topology
| The Topology read from the PDBx/mmCIF file.
| positions
| The atom positions read from the PDBx/mmCIF file.

## Detailed Description

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

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

def getNumFrames | ( |  | self | ) |

Get the number of frames stored in the file.

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

def getTopology | ( |  | self | ) |

Get the Topology of the model.

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

topology

The Topology read from the PDBx/mmCIF file.

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

- pdbxfile.py