Transform Behaviors¶
The format_transform method (available on FileBatchModelDisk and individual file objects) allows converting between different chemical file formats.
Key Behaviors¶
- Frame Selection: By default, only the last frame (
frameID=-1) is transformed. You can specifyframeID="all"to transform all frames in a file. - Embedding: If
embed_in_one_file=True(default), multiple frames are combined into a single output file if the format supports it (e.g., SDF or multi-frame XYZ). - Structure Level:
- COORDS (Coordinate Level): Formats like
xyz,gjf, andorcainpprimarily preserve atomic coordinates and elements. - GRAPH (Graph Level): Formats like
sdf,smi, andcmlpreserve bonding information (molecular graph). If the source file only has coordinates (e.g., a.logfile), MolOP will automatically attempt to reconstruct the molecular graph using its built-in algorithms. - Metadata Preservation:
- QM input formats (
gjf,orcainp) attempt to preserve raw directives and keywords. - Computational properties (energies, frequencies) are generally NOT preserved when transforming to simple coordinate formats like XYZ, although some formats like SDF can store them as properties.