coflandscaper.CreateMatrix¶
- class coflandscaper.CreateMatrix(ild_start=3.0, ild_end=4.0, ild_step=0.1, ils_length_start=0.0, ils_length_end=None, ils_length_step=1.0, ils_angle=None, print_shift=False)[source]¶
Create an ILD×ILS matrix of stacking variants for a fixed COF layer.
The layer itself is kept unchanged while (1) the interlayer distance (ILD) is varied by rescaling the $z$ lattice vector and (2) interlayer slipping (ILS) is applied either as a serrated bilayer shift or as an inclined lattice tilt. Both serrated and inclined modes converge to the AB stacking limit; the corresponding default shift length and angle are computed automatically when unset and can be printed via print_shift. The default ILD range is 3.0–4.0 Å in 0.1 Å steps.
Users may override the slip angle, minimum/maximum slip length, and step size to scan a specific region or alternative slip pathway. Outputs are written to COF_NAME/2_{COF_NAME}_matrix/{serr|incl} by default and are intended for subsequent single‑point energy evaluations (e.g., MACE or DFT).
Methods
Create the ILD×ILS matrix for a given COF.
- Parameters:
- run(cof_name, topo, mode, input_cif=None, output_base_folder=None)[source]¶
Create the ILD×ILS matrix for a given COF.
- Parameters:
cof_name (str) – COF name used for input/output folder naming.
topo (str) – Topology string used for defaults. Allowed values are “hcb”, “sql”, “hcb_ab”, and “kgm”.
mode (str) – ILS mode selector. Allowed values are “incl”, “serr”, or “both”.
input_cif (str | None) – Optional path to a pre-optimized CIF file. Defaults to {cof_name}/1_{cof_name}_single_layer/{cof_name}_preopt.cif.
output_base_folder (str | None) – Optional base folder for outputs (relative to cof_name). Defaults to 2_{cof_name}_matrix, which yields {cof_name}/2_{cof_name}_matrix/{serr|incl}.
- Raises:
ValueError – If mode is not one of “incl”, “serr”, or “both”.
FileNotFoundError – If the resolved input CIF does not exist.
- Return type:
None