Skip to main content

Crate mol_defs

Crate mol_defs 

Source
Expand description

Molecule data structures for computational chemistry and drug discovery.

Where bio_files provides format-level types for reading and writing molecular files, this library provides the application-level types those are loaded into: ones carrying inferred properties, topology, and conformational data.

These types are shared between Molchanica and its ADME inference library; they live here so neither has to depend on the other.

The render feature adds surface-mesh generation, and the mesh and electron-density fields used to draw molecules. It pulls in a GPU stack, so leave it off for headless use such as ML inference.

Modules§

bond_inference
mol_components
Represents small organic molecules by breaking them down into components. Components correspond to chemically meaningful subgraphs (functional groups, ring clusters, chains), and are connected by Connections that mirror the actual bonds that cross component boundaries.
molecules
properties
Properties inferred from a molecule’s structure.
reflection
Data types for electron density, as measured by crystallography and Cryo-EM reflection data.
screening
Types used when screening small molecules against a target.
serialization
Binary serialization of MoleculeSmall.
sfc_mesh
For calculating the accessible surface (AS), a proxy for accessibility of solvents to a molecule. Used for drawing surface, dots, and related meshes. Related to the van der Waals radius.
smiles
Convert between molecules and SMILES text todo: Consider moving this to bio_files. Although geometry considerations may be a better suit for here.
tautomers
For identifying Tautomers
util
Misc.

Macros§

copy_le
Write a primitive into a byte slice as little-endian. Used by our custom binary formats.
parse_le
Read a little-endian primitive out of a byte slice. Used by our custom binary formats.

Type Aliases§

Color
RGB, each channel in the range 0.0 to 1.0.