stk.TurbomoleWriter
- class stk.TurbomoleWriter[source]
Bases:
object
A writer class for
Turbomole
files.Examples
Writing to a File with a Unit Cell
This writer can write to a file with the unit cell included for periodic molecules. Note that this always assumes P1 space group.
import stk bb1 = stk.BuildingBlock('BrCCBr', [stk.BromoFactory()]) bb2 = stk.BuildingBlock( smiles='BrCC(CBr)CBr', functional_groups=[stk.BromoFactory()], ) topology_graph = stk.cof.PeriodicHoneycomb( building_blocks=(bb1, bb2), lattice_size=(3, 3, 1), ) construction_result = topology_graph.construct() cof = ( stk.ConstructedMolecule.init_from_construction_result( construction_result=construction_result, ) ) writer = stk.TurbomoleWriter() writer.write( molecule=cof, path='cof.coord', periodic_info=construction_result.get_periodic_info(), )
Methods
Get a
Turbomole
file format string of molecule.Write molecule to
Turbomole
file format.- to_string(molecule, atom_ids=None, periodic_info=None)[source]
Get a
Turbomole
file format string of molecule.- Parameters:
- Returns:
The content of a .coord file.
- Return type:
- write(molecule, path, atom_ids=None, periodic_info=None)[source]
Write molecule to
Turbomole
file format.- Parameters:
molecule (Molecule) – Molecule to write to
Turbomole
format.path (Path | str) – The full path to the file being written.
atom_ids (int | Iterable[int] | None) – The atom ids of atoms to write. Can be a single
int
, if a single atom is to be used, orNone
, if all atoms are to be used.periodic_info (PeriodicInfo | None) – Information about the periodic cell.
- Returns:
A file is written.
- Return type:
None