API Reference¶
Top-level overview of every public symbol exported from tricor,
with full signatures, parameter docs, and return types pulled
straight from the source docstrings.
- Supercell
Supercell.from_atoms()Supercell.generate()Supercell.refine_initial_orientations()Supercell.refine_grains()Supercell.refine_grains_coarse_to_fine()Supercell.shell_relax()Supercell.bond_relax()Supercell.enforce_hard_core()Supercell.thermal_relax()Supercell.measure_g3()Supercell.sync_g3()Supercell.view_structure()Supercell.plot_structure()Supercell.plot_g2()Supercell.plot_g3()Supercell.plot_g3_compare()Supercell.plot_shell_relax()Supercell.plot_thermal_relax()Supercell.plot_thermal_before_after()Supercell.plot_monte_carlo()Supercell.export_trajectory_html()Supercell.export_g3_html()Supercell.export_g2_html()Supercell.PRESETS- Presets
- CoordinationShellTarget
CoordinationShellTarget.from_atoms()CoordinationShellTarget.from_targets()CoordinationShellTarget.with_cross_species_bonds_only()CoordinationShellTarget.with_bonded_species_pairs()CoordinationShellTarget.with_angle_triplets()CoordinationShellTarget.without_angle_triplets()CoordinationShellTarget.pair_labelsCoordinationShellTarget.angle_labels- Restricting the bond graph
- Masking angle springs (multi-modal shells)
- Blending two reference crystals
- G3Distribution
- Module-level exporters
Public module surface¶
Symbol |
Kind |
Purpose |
|---|---|---|
|
class |
Central disorder-generator with visualisation + export helpers. |
|
class |
First-shell coordination + angle targets extracted from a reference crystal. Composable via |
|
class |
Stand-alone three-body g3 measurement + pairwise g2 byproduct. |
function |
Rotating multi-panel 3D grid of finished supercells. |
|
function |
Overlaid g(r) across multiple supercells, stacked y-offset, species-pair dropdown. |
|
function |
Inline-Jupyter wrapper around |
Pipeline summary¶
A typical end-to-end build chains four calls:
import tricor as tc
from ase.build import bulk
atoms_ref = bulk("Si", "diamond", a=5.431)
shell = tc.CoordinationShellTarget.from_atoms(atoms_ref, phi_num_bins=90)
cell = tc.Supercell.from_atoms(
atoms_ref,
cell_dim_angstroms=(40, 40, 40),
r_max=10, r_step=0.1, phi_num_bins=90,
rng_seed=42,
)
cell.generate(shell, **tc.Supercell.PRESETS["MRO"])
cell.measure_g3()
After generate() the cell carries:
cell.atoms: the ASEAtomsobject with periodic positions.cell.shell_relax_history: per-step bond / angle / repulsion losses, FIRE trajectory, and (optionally) per-atom cost vectors.cell.refine_initial_orientations_history: only populated whenrefine_orientations=Trueis passed; one entry per accepted rotation.cell.current_distribution: the most recently measuredG3Distribution(set bymeasure_g3()).
From there the visualisation methods (plot_g3(),
view_structure(), plot_shell_relax())
render inline in Jupyter, and the export methods
(export_trajectory_html(),
export_g3_html(),
export_g2_html()) write self-contained HTML for
embedding in static sites or sharing as standalone files.