Skip to main content

Crate molar

Crate molar 

Source
Expand description

MolAR is a library for molecular modeling and analysis written in Rust with an emphasis on memory safety and performance. Molar is designed to simplify the analysis of molecular dynamics trajectories and to implement new analysis algorithms. Molar is intended to provide facilities, which are routinely used in all molecular analysis programs, namely input/output of popular file formats, powerful and flexible atom selections, geometry transformations, RMSD fitting and alignment, etc. MolAR is a logical successor of Pteros molecular modeling library, which is written in C++ and become hard to develop and maintain due to all C++ idiosyncrasies.

Re-exports§

pub use crate::io::*;

Modules§

io
IO handlers for different file formats and associated traits
prelude
Most useful public imports exposed to the users
voronoi_cell
2D Voronoi diagrams

Macros§

bind
Convenience macro for binding several selections ar once
bind_mut
Convenience macro for binding several selections ar once mutably

Structs§

AnalysisContext
Context passed to all frame processing methods
Atom
Information about the atom except its coordinates.
Dssp
DSSP secondary structure assignment result for a selection.
NdxFile
Representation of Gromacs index files
ParSplit
Collection of non-overlapping selections that could be mutated in parallel Selections don’t have access to shared fields such as box and bonds.
Particle
Holds immutable reference to Atom and Pos and particle id.
ParticleMut
Holds mutable reference to Atom and Pos and particle id.
PbcDims
Representation of periodic dimensions in 3D space.
PeriodicBox
Periodic box allowing working with periodicity and computing periodic distances and images.
Sasa
Solvent-Accessible Surface Area calculator backed by the pure-Rust PowerSASA algorithm.
SearchConnectivity
Contacts between atoms in the format of atom -> neib1 neib2 neib3...
SearchConnectivityIter
Iterator over SearchConnectivity entries
Sel
Selection index detached from any System. It is guaranteed to be non-empty.
SelBound
Read only selection that borrows its index Implements only read-only analysis traits
SelBoundMut
Read-write selection that borrows its index
SelOwnBound
Read only subsystem that owns its index Implements only read-only analysis traits
SelOwnBoundMut
Read-write bound subsystem having access to all fields of Topology and State
SelPar
Read-only subsystem for non-blocking parallel access to atoms and posisitons Doesn’t have access to shared fields such as box and bonds.
SelParMut
Read-write subsystem for non-blocking parallel access to atoms and posisitons Doesn’t have access to shared fields such as box and bonds.
SelectionExpr
A compiled selection expression that can be used to select atoms based on various criteria
State
State of molecular system including its coordinates, time stamp and periodic box.
System
System that stores Topology and State
Topology
Topology of the molecular system: atoms, bonds, molecules, etc.
TopologyStateSizesError
Error for different sizes of topology and state
TrajAnalysisArgs
Standard trajectory processing arguments

Enums§

AnalysisError
Errors related to analysis task execution and trajectory processing
BuilderError
Errors related to builder sources
LipidOrderError
Errors related to computing lipid order parameter
MeasureError
Errors that can occur during measurements
NdxError
Errors related to reading and manipulating Gromacs index files
OrderType
Type of order parameter calculation
PeriodicBoxError
Errors related to periodic boxes and periodicity
SS
Secondary structure code assigned to a single residue.
SelectionError
Error related to creation of selections
StateError
Error type for missing optional state data (velocities or forces)

Constants§

PBC_FULL
All dimentions are periodic
PBC_NONE
All dimentions are non-periodic

Traits§

Analysis
Trait providing split and split_par for selections that have full particle access.
AnalysisTask
Analysis task trait. Should be implemented by user’s types.
AtomIterator
Convenience alias for iterator over atoms
AtomLike
AtomMutIterator
Convenience alias for mutable iterator over atoms
AtomMutProvider
Element trait providing mutable access to atoms.
AtomProvider
Element trait providing immutable access to atoms via index.
BondProvider
Element trait providing immutable access to bonds.
BoxMutProvider
Trait for providing mutable access to periodic box
BoxProvider
Trait for providing access to periodic box
DistanceSearchOutput
Trait for the results of distance seacrh
ForceIterator
Convenience alias for iterator over forces
ForceMutIterator
Convenience alias for mutable iterator over forces
ForceMutProvider
Element trait providing mutable access to forces.
ForceProvider
Element trait providing immutable access to forces via index.
IdPosIterator
Convenience alias for iterator over index-position pairs
IdPosMutIterator
Convenience alias for mutable iterator over index-position pairs
IndexIterator
Convenience alias for iterator over indices
IndexParProvider
Trait for parallel iteration over indexes
IndexProvider
Trait for selected indices
IndexSliceProvider
Trait for entities that contain continuous slices of indices (selections and such)
LenProvider
Trait for providing length of provided data
Measure
Unified trait for all measurement operations on selections.
Modify
Unified trait for all modification operations on selections.
MolProvider
Element trait providing immutable access to molecules.
ParticleIterMutProvider
Trait for providing mutable iteration over particles
ParticleIterProvider
Provides iteration over (id, atom, pos) particles
ParticleIterator
Convenience alias for iterator over particles
ParticleMutIterator
Convenience alias for mutable iterator over particles
ParticleParIterProvider
PosIterator
Convenience alias for iterator over positions
PosMutIterator
Convenience alias for mutable iterator over positions
PosMutProvider
Element trait providing mutable access to positions.
PosProvider
Element trait providing immutable access to positions via index.
Selectable
Trait for objects that support creating selections
SelectableBound
Trait for objects that support creating bound selections
SelectionDef
Trait for selection definitions. Implementors could be used as argumnets for selection creation methods.
SelectionLogic
Trait for logical operations in any (borrowed or own) bound selections
SystemMutProvider
Trait for things containing mut reference to System (mostly selections)
SystemProvider
Trait for things containing reference to System (mostly selections)
TimeMutProvider
Trait for setting simulation time
TimeProvider
Trait for getting time
TopLike
VelIterator
Convenience alias for iterator over velocities
VelMutIterator
Convenience alias for mutable iterator over velocities
VelMutProvider
Element trait providing mutable access to velocities.
VelProvider
Element trait providing immutable access to velocities via index.

Functions§

distance_search_double
Performs distance search between two sets of points within a given cutoff distance
distance_search_double_pbc
Performs distance search between two sets of points within periodic boundary conditions
distance_search_double_vdw
Performs distance search between two sets of points using van der Waals radii
distance_search_double_vdw_pbc
Performs distance search between two sets of points using van der Waals radii with periodic boundaries
distance_search_single
Performs distance search within a single set of points
distance_search_single_pbc
Performs distance search within a single set of points with periodic boundaries
fit_transform
Computes the transformation that best fits sel1 onto sel2
fit_transform_at_origin
Like fit_transform but assumes both selections are centered at origin
fit_transform_matching
Computes the transformation that best fits sel1 onto sel2 taking into account only matching atoms. The sequences of atom names from both selections are aligned first with Needleman–Wunsch Global Alignment algorithm and then only the matching atoms are used to compute a fit transform
get_matching_atoms_by_name
greeting
Prints a welcome message for MolAR with package information and the specified tool name
rmsd
Calculates the Root Mean Square Deviation between two selections
rmsd_mw
Calculates the mass-weighted Root Mean Square Deviation between two selections

Type Aliases§

AtomStr
Stack-allocated ASCII atom string (max 8 bytes, no heap allocation).
Force
Atom force (kJ/mol/nm)
Matrix3f
Convenience alias for 3x3 matrix
Pos
Atom position
SVec
Alias to sorted vector
Vector3f
Convenience alias for 3D vector
Vel
Atom velocity (nm/ps)