Skip to main content

Crate cosmolkit

Crate cosmolkit 

Source
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§

AddHsParams
AdjacencyList
AltLocLabel
Single-char altloc label (e.g. b’A’, b’B’).
AngleConstraintContrib
AngleConstraintContribs
AngleConstraintContribsParams
AromaticityAssignment
Atom
Immutable atom record owned by Molecule.
AtomId
Stable atom table index.
AtomMapping
AtomName
Up to 4-char atom name (e.g. “ CA “, “ N “).
AtomPdbResidueInfo
Typed atom-level PDB residue metadata.
AtomRow
AtomSourceIds
AtomSpec
Atom construction payload.
BatchExportReport
BatchProgressBar
BatchRecordError
BatchValidationError
BioAssembly
BioAtomId
BioBlockSet
BioChainId
BioCisPep
BioConnection
BioDerivedState
BioEntityId
BioMetadata
BioModRes
BioModelId
BioNcsOperator
BioPdbReadParams
BioResidueId
BioRowMapping
BioStateSet
BioStructure
Flat-row biomolecular structure.
BioStructureMapping
BioStructureOpSpec
BioTransform
BlockAccess
BlockSet
Bond
Immutable bond record owned by Molecule.
BondId
Stable bond table index.
BondMapping
BondSpec
Bond construction payload. Builders assign BondId.
ChainRow
ChainSourceIds
Conformer2D
Conformer3D
ConformerStore
CoordinateBlock
3D coordinates for all atoms, indexed by AtomId. Invariant: len() == atoms.len() in the owning BioStructure.
CrystalCell
CrystalInfo
CxSmilesFields
DerivedState
Derived state invalidated by molecule operations.
DihedralOutput
DistanceConstraintContrib
DistanceConstraintContribs
DistanceConstraintContribsParams
Element
Minimal element identity for the core.
EmbedMoleculeResult
EmbedMultipleConfsResult
EmbedParameters
EntityRow
EntitySourceIds
FeatureSpec
Fingerprint
ForceField
ForceFieldSnapshot
ForceFieldVec3
InvariantCheckSet
MmffAngle
MMFF angle-bending parameter.
MmffAngleCollection
MMFF angle-bending parameter collection.
MmffAtomProperties
MmffBond
MMFF bond-stretching parameter.
MmffBondCollection
MMFF bond-stretching parameter collection.
MmffChg
MMFF bond-charge-increment parameter.
MmffChgCollection
MMFF bond-charge-increment collection.
MmffDef
MMFF atom type equivalence levels.
MmffDefCollection
MMFF atom type equivalence definition collection.
MmffDfsbCollection
MMFF default stretch-bend parameter collection.
MmffMolProperties
MmffOop
MMFF out-of-plane bending parameter.
MmffOopCollection
MMFF out-of-plane bending parameter collection.
MmffOptimizeMoleculeConfResult
MmffOptimizeMoleculeConfsResult
MmffOptimizeMoleculeResult
MmffPbci
MMFF partial bond charge increments.
MmffPbciCollection
MMFF partial bond charge increment collection.
MmffProp
MMFF atom-type properties.
MmffPropCollection
MMFF atom-type property collection.
MmffStbn
MMFF stretch-bend parameter.
MmffStbnCollection
MMFF stretch-bend parameter collection.
MmffTor
MMFF torsion parameter.
MmffTorCollection
MMFF torsion parameter collection.
MmffVdw
MMFF non-bonded Van der Waals parameter.
MmffVdwCollection
MMFF non-bonded Van der Waals parameter collection.
MmffVdwRijstarEps
MMFF combined Van der Waals pair constants.
ModelRow
Mol2ReadParams
Mol2Record
Molecule
Immutable molecule value.
MoleculeBatch
MoleculeBuilder
One-shot molecule construction API.
MoleculeCapabilities
MoleculeOpSpec
MoleculeProperties
MorganAdditionalOutput
MorganBondInvariantsGenerator
MorganFingerprintOutput
MorganFingerprintParams
NeighborRef
OperationInvariantEntry
OperationTrace
ParityMatrixEntry
PositionConstraintContrib
PropertyStore
Protein
ProteinAtomRef
ProteinChainRef
ProteinResidueRef
ProteinSelectionSummary
RdkitPdbMolProfile
RemoveHsParams
ResidueInfo
ResidueName
Up to 3-char residue name (e.g. “ALA”, “GLY”).
ResidueRow
RingInfo
RowSpan
SGroupAttachPoint
SGroupBracket
SGroupCState
SGroupData
SGroupDisplay
SanitizeError
SanitizeOps
SdfDataset
SdfPropertyList
SdfReadParams
SdfRecordMetadata
SemanticPreconditionSet
SmilesWriteParams
StereoGroup
SubstanceGroup
SubstanceGroupId
Substance-group identity inside a molecule.
SubstructMatchParams
Parameters controlling substructure matching behaviour.
SubstructMatchResult
Result of a single substructure match.
SupportMatrixEntry
TetrahedralStereo
TopologyMapping
TorsionAngleContribM6
TorsionAngleContribs
TorsionAngleContribsParams
TorsionConstraintContrib
UffAngle
UFF parameters for angle bending.
UffBond
UFF parameters for bond stretching.
UffInv
UFF parameters for inversions.
UffOptimizeMoleculeConfResult
UffOptimizeMoleculeConfsResult
UffOptimizeMoleculeResult
UffTor
UFF parameters for torsions.
UffVdw
UFF parameters for van der Waals interactions.
UnsupportedFeatureError
ValenceAssignment
With2DCoordinatesParams

Enums§

AddHydrogensError
AdjacencyError
AromaticityError
AromaticityModel
AtomQueryPredicate
Atom-level SMARTS / MolFile query predicates.
BatchErrorMode
BatchRecord
BioConnectionType
BioCoorFormat
BioEditKind
BioOpDomain
BioOpKind
BioOpOutcome
BioOperationError
BioParityPolicy
BioReadError
BondDirection
BondOrder
COSMolKit core bond order.
BondQueryPredicate
Bond-level query predicates.
BondStereo
ChainKind
ChiralTag
CoordinateDimension
DgBoundsError
DoubleBondStereo
RDKit❗✔️: E/Z bond stereo information
EmbedFailureCause
EntityKind
FeatureCategory
FingerprintError
Hybridization
InvariantError
KekulizeError
LigandRef
MappingRequirement
MmffMolPropertiesError
MmffParamError
MmffPublicApiError
MmffVariant
Mol2ReadError
Mol2Type
MoleculeBuildError
MoleculeOpKind
MorganAtomInvariantsGenerator
OpOutcome
OperationDomain
OperationError
ParityPolicy
PdbMoleculeConversionError
PickleError
PolymerKind
QueryNode
A recursive Boolean query tree over a predicate type T.
RemoveHydrogensError
ResidueCode
ResidueInfoKind
ResidueInfoSequenceError
ResidueKind
RestoreBondDirOption
RingFindType
RingFindingError
SGroupBondRole
SGroupBracketStyle
SGroupConnection
SanitizeStep
SdfCoordinateMode
SdfPropertyListTarget
SemanticPrecondition
SmartsParseError
Errors produced by SMARTS parsing.
SmilesParseError
SmilesWriteError
StereoError
StereoGroupKind
SubstanceGroupKind
SupportStatus
SvgDrawError
Errors returned by SVG / PNG drawing routines.
TopologyEditKind
TopologyTrust
UffPublicApiError
ValenceError
ValenceModel
XyzReadError

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§

ForceFieldContrib

Functions§

assign_double_bond_stereo_from_directions
assign_radicals
assign_stereochemistryDeprecated
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 Molecule from binary data produced by mol_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 Molecule to 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.

Type Aliases§

BatchProgress