mstk.topology.Psf¶
- class mstk.topology.Psf(file, **kwargs)¶
Generate Topology from NAMD-variant (space-delimited instead of column-based) PSF file.
Atoms, bonds, angles, dihedrals, impropers and virtual sites are parsed. Polarizability and thole parameters for Drude model are parsed, but anisotroic polarizability are ignored. All others like hydrogen bonds are ignored.
- Parameters:
file (str) –
split_molecule (str) – Can be ‘residue’, ‘whole’, ‘atom’. Default is ‘residue’. If set to ‘residue’, the topology will be split into molecules based on the bonds between residues. If set to ‘whole’, all the atoms will be put into one molecule. If set to ‘atom’, the topology will be split into molecules based on the bonds between atoms.
Examples
>>> psf = Psf('input.psf') >>> topology = psf.topology
>>> Psf.save_to(topology, 'output.psf')
Methods
__init__(file, **kwargs)save_to(top, file, **kwargs)Save topology into a PSF file