mstk.topology.Psf¶
- class mstk.topology.Psf(file, **kwargs)¶
Generate Topology from 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’, ‘bond’ or ‘auto’. Default is ‘auto’. If set to ‘residue’, each residue will be parsed as a molecule. It works only if there is no inter-residue bonds. If set to ‘whole’, all the atoms will be put into one molecule. If set to ‘bond’, the atoms will be grouped into molecules based on connectivity. if set to ‘auto’, it will try ‘residue’ first. If there’s inter-residue connectivity, will use ‘whole’ instead.
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