Expand description
Facade crate that re-exports COSMolKit core modules.
§Examples
use cosmolkit::Molecule;
let mol = Molecule::from_smiles("CCO").unwrap();
let with_hydrogens = mol.with_hydrogens().unwrap();
assert_eq!(mol.num_atoms(), 3);
assert!(with_hydrogens.num_atoms() > mol.num_atoms());use cosmolkit::Molecule;
let mut mol = Molecule::from_smiles("CCO").unwrap();
mol.add_hydrogens_().unwrap();
mol.compute_2d_coordinates_().unwrap();
assert!(mol.num_atoms() > 3);
assert_eq!(mol.coordinates_2d().unwrap().len(), mol.num_atoms());Re-exports§
pub use cosmolkit_core as core;
Modules§
- bio
- Biomolecular structure primitives.
- chemistry
- Chemistry algorithms over the core molecule model.
- io
- IO pipelines.
- model
- Core molecule state model.
- notation
- Text notations and fragment/sequence construction.
- operations
- Registered mutation and finalization operations.
- properties
- Derived descriptors, rendering, hashing, serialization, and batch helpers.
- search
- Query, SMARTS, and substructure search.
- support
Structs§
- AddHs
Params - Adjacency
List - AltLoc
Label - Single-char altloc label (e.g. b’A’, b’B’).
- Angle
Constraint Contrib - Angle
Constraint Contribs - Angle
Constraint Contribs Params - Aromaticity
Assignment - Atom
- Immutable atom record owned by
Molecule. - AtomId
- Stable atom table index.
- Atom
Mapping - Atom
Name - Up to 4-char atom name (e.g. “ CA “, “ N “).
- Atom
PdbResidue Info - Typed atom-level PDB residue metadata.
- AtomRow
- Atom
Source Ids - Atom
Spec - Atom construction payload.
- Batch
Export Report - Batch
Progress Bar - Batch
Record Error - Batch
Validation Error - BioAssembly
- BioAtom
Id - BioBlock
Set - BioChain
Id - BioCis
Pep - BioConnection
- BioDerived
State - BioEntity
Id - BioMetadata
- BioMod
Res - BioModel
Id - BioNcs
Operator - BioPdb
Read Params - BioResidue
Id - BioRow
Mapping - BioState
Set - BioStructure
- Flat-row biomolecular structure.
- BioStructure
Mapping - BioStructure
OpSpec - BioTransform
- Block
Access - Block
Set - Bond
- Immutable bond record owned by
Molecule. - BondId
- Stable bond table index.
- Bond
Mapping - Bond
Spec - Bond construction payload. Builders assign
BondId. - Chain
Row - Chain
Source Ids - Conformer2D
- Conformer3D
- Conformer
Store - Coordinate
Block - 3D coordinates for all atoms, indexed by AtomId.
Invariant:
len() == atoms.len()in the owning BioStructure. - Crystal
Cell - Crystal
Info - CxSmiles
Fields - Derived
State - Derived state invalidated by molecule operations.
- Dihedral
Output - Distance
Constraint Contrib - Distance
Constraint Contribs - Distance
Constraint Contribs Params - Element
- Minimal element identity for the core.
- Embed
Molecule Result - Embed
Multiple Confs Result - Embed
Parameters - Entity
Row - Entity
Source Ids - Feature
Spec - Fingerprint
- Force
Field - Force
Field Snapshot - Force
Field Vec3 - Invariant
Check Set - Mmff
Angle - MMFF angle-bending parameter.
- Mmff
Angle Collection - MMFF angle-bending parameter collection.
- Mmff
Atom Properties - Mmff
Bond - MMFF bond-stretching parameter.
- Mmff
Bond Collection - MMFF bond-stretching parameter collection.
- MmffChg
- MMFF bond-charge-increment parameter.
- Mmff
ChgCollection - MMFF bond-charge-increment collection.
- MmffDef
- MMFF atom type equivalence levels.
- Mmff
DefCollection - MMFF atom type equivalence definition collection.
- Mmff
Dfsb Collection - MMFF default stretch-bend parameter collection.
- Mmff
MolProperties - MmffOop
- MMFF out-of-plane bending parameter.
- Mmff
OopCollection - MMFF out-of-plane bending parameter collection.
- Mmff
Optimize Molecule Conf Result - Mmff
Optimize Molecule Confs Result - Mmff
Optimize Molecule Result - Mmff
Pbci - MMFF partial bond charge increments.
- Mmff
Pbci Collection - MMFF partial bond charge increment collection.
- Mmff
Prop - MMFF atom-type properties.
- Mmff
Prop Collection - MMFF atom-type property collection.
- Mmff
Stbn - MMFF stretch-bend parameter.
- Mmff
Stbn Collection - MMFF stretch-bend parameter collection.
- MmffTor
- MMFF torsion parameter.
- Mmff
TorCollection - MMFF torsion parameter collection.
- MmffVdw
- MMFF non-bonded Van der Waals parameter.
- Mmff
VdwCollection - MMFF non-bonded Van der Waals parameter collection.
- Mmff
VdwRijstar Eps - MMFF combined Van der Waals pair constants.
- Model
Row - Mol2
Read Params - Mol2
Record - Molecule
- Immutable molecule value.
- Molecule
Batch - Molecule
Builder - One-shot molecule construction API.
- Molecule
Capabilities - Molecule
OpSpec - Molecule
Properties - Morgan
Additional Output - Morgan
Bond Invariants Generator - Morgan
Fingerprint Output - Morgan
Fingerprint Params - Neighbor
Ref - Operation
Invariant Entry - Operation
Trace - Parity
Matrix Entry - Position
Constraint Contrib - Property
Store - Protein
- Protein
Atom Ref - Protein
Chain Ref - Protein
Residue Ref - Protein
Selection Summary - Rdkit
PdbMol Profile - Remove
HsParams - Residue
Info - Residue
Name - Up to 3-char residue name (e.g. “ALA”, “GLY”).
- Residue
Row - Ring
Info - RowSpan
- SGroup
Attach Point - SGroup
Bracket - SGroupC
State - SGroup
Data - SGroup
Display - Sanitize
Error - Sanitize
Ops - SdfDataset
- SdfProperty
List - SdfRead
Params - SdfRecord
Metadata - Semantic
Precondition Set - Smiles
Write Params - Stereo
Group - Substance
Group - Substance
Group Id - Substance-group identity inside a molecule.
- Substruct
Match Params - Parameters controlling substructure matching behaviour.
- Substruct
Match Result - Result of a single substructure match.
- Support
Matrix Entry - Tetrahedral
Stereo - Topology
Mapping - Torsion
Angle Contrib M6 - Torsion
Angle Contribs - Torsion
Angle Contribs Params - Torsion
Constraint Contrib - UffAngle
- UFF parameters for angle bending.
- UffBond
- UFF parameters for bond stretching.
- UffInv
- UFF parameters for inversions.
- UffOptimize
Molecule Conf Result - UffOptimize
Molecule Confs Result - UffOptimize
Molecule Result - UffTor
- UFF parameters for torsions.
- UffVdw
- UFF parameters for van der Waals interactions.
- Unsupported
Feature Error - Valence
Assignment - With2D
Coordinates Params
Enums§
- AddHydrogens
Error - Adjacency
Error - Aromaticity
Error - Aromaticity
Model - Atom
Query Predicate - Atom-level SMARTS / MolFile query predicates.
- Batch
Error Mode - Batch
Record - BioConnection
Type - BioCoor
Format - BioEdit
Kind - BioOp
Domain - BioOp
Kind - BioOp
Outcome - BioOperation
Error - BioParity
Policy - BioRead
Error - Bond
Direction - Bond
Order - COSMolKit core bond order.
- Bond
Query Predicate - Bond-level query predicates.
- Bond
Stereo - Chain
Kind - Chiral
Tag - Coordinate
Dimension - DgBounds
Error - Double
Bond Stereo - RDKit❗✔️: E/Z bond stereo information
- Embed
Failure Cause - Entity
Kind - Feature
Category - Fingerprint
Error - Hybridization
- Invariant
Error - Kekulize
Error - Ligand
Ref - Mapping
Requirement - Mmff
MolProperties Error - Mmff
Param Error - Mmff
Public ApiError - Mmff
Variant - Mol2
Read Error - Mol2
Type - Molecule
Build Error - Molecule
OpKind - Morgan
Atom Invariants Generator - OpOutcome
- Operation
Domain - Operation
Error - Parity
Policy - PdbMolecule
Conversion Error - Pickle
Error - Polymer
Kind - Query
Node - A recursive Boolean query tree over a predicate type
T. - Remove
Hydrogens Error - Residue
Code - Residue
Info Kind - Residue
Info Sequence Error - Residue
Kind - Restore
Bond DirOption - Ring
Find Type - Ring
Finding Error - SGroup
Bond Role - SGroup
Bracket Style - SGroup
Connection - Sanitize
Step - SdfCoordinate
Mode - SdfProperty
List Target - Semantic
Precondition - Smarts
Parse Error - Errors produced by SMARTS parsing.
- Smiles
Parse Error - Smiles
Write Error - Stereo
Error - Stereo
Group Kind - Substance
Group Kind - Support
Status - SvgDraw
Error - Errors returned by SVG / PNG drawing routines.
- Topology
Edit Kind - Topology
Trust - UffPublic
ApiError - Valence
Error - Valence
Model - XyzRead
Error
Constants§
- AROMATICITY_
FEATURE - ASSIGNED_
AROMATICITY_ SPEC - ASSIGNED_
RINGS_ SPEC - ASSIGNED_
RING_ FAMILIES_ SPEC - ASSIGNED_
VALENCE_ SPEC - BATCH_
FEATURE - BIO_
MMCIF_ ATOM_ SITE_ SUBSET_ READ_ FEATURE - BIO_
PDB_ COORDINATE_ SUBSET_ READ_ FEATURE - BIO_
SELECTION_ FEATURE - BIO_
STRUCTURE_ FEATURE - CONFORMER_
GENERATION_ FEATURE - COORDINATE_
2D_ FEATURE - DG_
BOUNDS_ FEATURE - DRAWING_
FEATURE - FINGERPRINT_
FEATURE - HYDROGENS_
FEATURE - KEKULIZE_
FEATURE - MMFF_
MOL_ PROPERTIES_ FEATURE - MOLBLOCK_
IO_ FEATURE - MOLECULE_
OPS - OPERATION_
INVARIANT_ MATRIX - PARITY_
MATRIX - PUBLIC_
FEATURES - RESIDUE_
INFO_ TABLE - RINGS_
FEATURE - SANITIZE_
FEATURE - SANITIZE_
SPEC - SMILES_
PARSE_ FEATURE - SMILES_
WRITE_ FEATURE - STEREO_
FEATURE - SUPPORT_
MATRIX - UNKNOWN_
TABULATED_ RESIDUE_ IDX - VALENCE_
FEATURE - WITHOUT_
HYDROGENS_ SPEC - WITHOUT_
HYDROGENS_ WITH_ PARAMS_ SPEC - WITH_
2D_ COORDINATES_ SPEC - WITH_
3D_ CONFORMERS_ SPEC - WITH_
3D_ CONFORMER_ SPEC - WITH_
HYDROGENS_ SPEC - WITH_
KEKULIZED_ BONDS_ SPEC
Traits§
Functions§
- assign_
double_ bond_ stereo_ from_ directions - assign_
radicals - assign_
stereochemistry Deprecated - assign_
valence - assign_
valence_ with_ options - atom_
has_ valence_ violation - batch_
progress_ bar - bio_
structure_ to_ rdkit_ pdb_ molecule - calc_
torsion_ energy - calc_
torsion_ energy_ m6 - classify_
residue_ name - compute_
dihedral_ from_ flat - compute_
dihedral_ from_ points - compute_
dihedral_ from_ position_ vec - detect_
chemistry_ problems - embed_
molecule - embed_
molecule_ result - embed_
multiple_ confs - embed_
multiple_ confs_ result - embed_
multiple_ confs_ return_ vector - expand_
one_ letter - expand_
one_ letter_ sequence - expand_
protein_ one_ letter - expand_
protein_ one_ letter_ string - fast_
find_ rings - find_
ring_ families - find_
sssr - find_
tabulated_ residue - find_
tabulated_ residue_ idx - get_
residue_ info - get_
residue_ info_ checked - get_
substruct_ match - Get the first substructure match, if any.
- get_
substruct_ matches - Get all substructure matches with default parameters.
- get_
substruct_ matches_ with_ params - Get all substructure matches with custom parameters.
- get_
uff_ angle_ bend_ params - get_
uff_ bond_ stretch_ params - get_
uff_ inversion_ params - get_
uff_ torsion_ params - get_
uff_ vdw_ params - has_
substruct_ match - Check if a molecule contains a substructure match for the given query.
- mmff_
has_ all_ molecule_ params - mmff_
optimize_ molecule - mmff_
optimize_ molecule_ confs - mmff_
sanitize_ ops - mol_
from_ binary - Deserialize a
Moleculefrom binary data produced bymol_to_binary. - mol_
from_ mol2_ block_ like_ rdkit - mol_
from_ mol2_ data_ stream_ like_ rdkit - mol_
from_ mol2_ file_ like_ rdkit - mol_
to_ binary - Serialize a
Moleculeto a compact binary format. - mol_
to_ random_ smiles_ vect - molecule_
from_ mmcif_ block_ with_ options - molecule_
from_ pdb_ block_ with_ options - normalize_
angle_ deg - perceive_
stereochemistry - RDKit❗✔️: assignStereochemistry — main stereochemistry perception entry point
- rdkit_
valence_ list - read_
mmcif_ atom_ site_ subset_ from_ str - Reads the Gemmi-aligned mmCIF structural reader surface into a
BioStructure. - read_
mol2_ file - read_
mol2_ file_ with_ params - read_
mol2_ from_ str - read_
mol2_ from_ str_ with_ params - read_
xyz_ from_ str - residue_
code_ from_ name - sanitize_
mmff_ mol - set_
aromaticity - symmetrize_
sssr - uff_
has_ all_ molecule_ params - uff_
optimize_ molecule - uff_
optimize_ molecule_ confs - version
- Returns the crate version at compile time.