mstk.topology.XyzTopology¶
- class mstk.topology.XyzTopology(file, **kwargs)¶
Generate Topology from XYZ file.
XYZ format only records the type (or atomic symbol) and position of atoms. There is no real topology, so all atoms are assumed to be in the same molecule. The first column is treated as atom type instead of name or symbol.
- Parameters:
file (str) –
kwargs (dict) – Ignored
Examples
>>> xyz = XyzTopology('input.xyz') >>> topology = xyz.topology
>>> XyzTopology.save_to(topology, 'output.xyz')
Methods
__init__(file, **kwargs)save_to(top, file, **kwargs)Save topology into a XYZ file.