coflandscaper

Cof landscaper package.

Functions

ab_half_diagonal_from_cif

Compute half the $a+b$ diagonal length and angle from a CIF.

calculator_settings_for_head

Map a MACE head name to fixed calculator settings.

default_shift_from_cif

Compute the default slip length and angle for AB stacking.

extract_atoms

Extract fractional atom sites from a CIF atom loop block.

find_last_occurrence

Return the index of the last occurrence of a keyword.

get_mode_folders

Return output folders for the selected stacking mode(s).

guess_symbol

Guess a chemical symbol from a CIF-like raw token.

list_cifs

List CIF files in a folder.

parse_atom_lines

Parse atom symbols and XYZ coordinates from a line block.

parse_cell

Parse unit-cell lengths and angles from CIF text.

parse_xyz_from_atom_line

Parse XYZ coordinates from a CIF atom line.

parse_z_L_from_stem

Parse _z and _L tags from a structure stem.

pick_lower_left_pair_from_lines

Pick the lower‑left atom pair from consecutive atom lines.

wrap01

Wrap a value into [0, 1).

Classes

AnalyzeStacking

BuildCOF2D

Construct a single-layer 2D COF from node/linker inputs.

ChangeIld

Generate ILD variations by rescaling the layer separation along $z$.

CreateMatrix

Create an ILD×ILS matrix of stacking variants for a fixed COF layer.

Crystal

Base class for converting CIF structures into CRYSTAL .d12 inputs.

CrystalOpt

CRYSTAL geometry-optimization input/output utilities.

CrystalSP

CRYSTAL single-point input and output parser utilities.

IlsIncl

Generate inclined ILS structures by tilting the $c$ vector.

IlsSerr

Generate serrated ILS structures by shifting the top layer in a bilayer.

Landscape

Generate potential energy landscape plots from single-point CSV data.

Mace

Base helper for constructing MACE calculators with normalized settings.

MaceOpt

Optimize CIF structures with MACE and optional z-axis constraints.

MaceSP

Evaluate single-point energies for CIF structures using MACE.

PXRD

Simulate PXRD patterns from optimized CIFs and create stacked plots.

SelectCofs

Select CIFs for downstream optimization based on ILD/ILS pairs.

Supercell

Build a supercell $atimes btimes c$ from each input unit cell.

VisualizeCOF

Visualize optimized COF structures with py3Dmol.