Geo Generator Engine Utility
GEO/XTLGRF file generation utilities.
This module contains GEO-specific text/file generation helpers and re-exports general structure I/O and transform helpers from the split geometry modules.
Usage context
- Template generation: Produce canonical text payloads for ReaxFF artifacts.
- File writing: Persist generated outputs to disk with stable formatting.
- Workflow integration: Support higher-level ReaxKit workflow commands.
Function: orient_structure_for_reaxff
Copy a periodic structure into standalone ReaxFF's Cartesian frame.
CRYSTX reconstructs c along z and b in the yz plane. Preserve fractional positions and lattice parameters while expressing both cell and positions in that frame, as in vasp2reax. Plain XYZ input has no cell orientation and must already use this frame before being passed to xtob.
Function: vasp2reax
Convert a VASP POSCAR/CONTCAR or CIF to standalone ReaxFF geometry.
The GEO output (default reaxff.geo) replaces the Fortran fort.15: an
XTLGRF/BGF structure containing CRYSTX cell parameters and Cartesian atoms.
Its sibling
ASE reads VASP Direct/Cartesian coordinates, scaling and Selective Dynamics syntax. Selective Dynamics flags are not translated into ReaxFF restraints. Cell setting and atom order are preserved; no symmetry standardization or relaxation is performed. CIF suffixes select CIF; otherwise VASP is assumed unless format is explicitly specified. Returns (geo_path, xyz_path).
Function: xtob
Write XYZ coordinates already oriented for standalone ReaxFF to GEO.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xyz_file
|
str | Path
|
Input parameter. |
required |
geo_file
|
str | Path
|
Input parameter. |
'geo'
|
box_lengths
|
Iterable[float]
|
Input parameter. |
(1.0, 1.0, 1.0)
|
box_angles
|
Iterable[float]
|
Input parameter. |
(90.0, 90.0, 90.0)
|
sort_by
|
Optional[SortKey]
|
Input parameter. |
None
|
ascending
|
bool
|
Input parameter. |
True
|
Returns:
| Type | Description |
|---|---|
Path
|
Return value. |
Examples:
# Example
xtob(...)
Function: sort_geo
Sort geo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_geo
|
str | Path
|
Keyword-only parameter. |
required |
output_geo
|
str | Path
|
Keyword-only parameter. |
required |
sort_by
|
GeoSortKey
|
Keyword-only parameter. |
required |
descending
|
bool
|
Keyword-only parameter. |
False
|
Returns:
| Type | Description |
|---|---|
Path
|
Return value. |
Examples:
# Example
sort_geo(...)
Function: add_restraints_to_geo
Add restraints to geo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geo_file
|
str | Path
|
Input parameter. |
required |
out_file
|
str | Path | None
|
Keyword-only parameter. |
None
|
kinds
|
Sequence[str]
|
Keyword-only parameter. |
required |
params
|
Optional[Dict[str, str]]
|
Keyword-only parameter. |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
Return value. |
Examples:
# Example
add_restraints_to_geo(...)
Function: add_molcharge_to_geo
Add molcharge to geo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geo_file
|
str | Path
|
Input parameter. |
required |
out_file
|
str | Path | None
|
Keyword-only parameter. |
None
|
each_atom_ranges
|
Optional[Sequence[tuple[int, int, float]]]
|
Keyword-only parameter. |
None
|
each_atom_types
|
Optional[Sequence[tuple[str, float]]]
|
Keyword-only parameter. |
None
|
together_charge
|
float | None
|
Keyword-only parameter. |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
Return value. |
Examples:
# Example
add_molcharge_to_geo(...)