PSF File

This module defines a function for parsing protein structure files in PSF format.

parsePSF(filename, title=None, ag=None)[source]

Returns an AtomGroup instance storing data parsed from X-PLOR format PSF file filename. Atom and bond information is parsed from the file. If title is not given, filename will be set as the title of the AtomGroup instance. An AtomGroup instance may be provided as ag argument. When provided, ag must have the same number of atoms in the same order as the file. Data from PSF file will be added to the ag. This may overwrite present data if it overlaps with PSF file content. Note that this function does not evaluate angles, dihedrals, and impropers sections.

writePSF(filename, atoms)[source]

Write atoms in X-PLOR format PSF file with name filename and return filename. This function will write available atom and bond information only.