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.
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. Usually created indirectly by types implementing ParticleIterProvider.
ParticleMut
Holds mutable reference to Atom and Pos and particle id. Usually created indirectly by types implementing ParticleIterMutProvider.
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
SelectionError
Error related to creation of selections

Constants§

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

Traits§

AnalysisTask
Analysis task trait. Should be implemented by user’s types.
AtomIterMutProvider
Trait for providing mutable iteration over atoms
AtomIterProvider
Trait for providing iteration over atoms
AtomIterator
Convenience alias for iterator over atoms
AtomLike
AtomMutIterator
Convenience alias for mutable iterator over atoms
AtomParIterMutProvider
Trait for providing parallel mutable iteration over atoms
AtomParIterProvider
AtomPosAnalysis
Umbrella trait for implementing read-only analysis traits involving only atoms and positions.
AtomPosAnalysisMut
Umbrella trait for implementing read-write analysis traits involving atoms and positions
BondIterProvider
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
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
Trair 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
MassIterProvider
Trait for providing iteration over atomic masses
MeasureAtomPos
Trait for analysis requiring both atom properties and positions.
MeasureMasses
Trait for analysis requiring positions and masses
MeasurePeriodic
Trait for analysis requiring positions, masses and periodic boundary conditions
MeasurePos
Trait for analysis requiring only positions
MeasureRandomAccess
Trait for modification requiring random access positions and pbc
ModifyAtoms
Trait for modification requiring atoms
ModifyPeriodic
Trait for modification requiring positions and pbc
ModifyPos
Trait for modification requiring only positions
ModifyRandomAccess
Trait for modification requiring random access positions and pbc
MoleculeIterProvider
NonAtomPosAnalysis
Umbrella trait for implementing read-only analysis traits NOT involving atoms and positions
NonAtomPosAnalysisMut
Umbrella trait for implementing read-write analysis traits NOT involving atoms and positions
ParticleIterMutProvider
Trait for providing mutable iteration over particles
ParticleIterProvider
Trait for providing iteration over particles
ParticleParIterMutProvider
Trait for providing parallel mutable iteration over particles
ParticleParIterProvider
PosIterMutProvider
Trait for providing mutable iteration over positions
PosIterProvider
Trait for providing iteration over positions
PosIterator
Convenience alias for iterator over positions
PosMutIterator
Convenience alias for mutable iterator over positions
PosParIterMutProvider
Trait for providing parallel mutable iteration over positions
PosParIterProvider
Trait for providing parallel iteration over positions
RandomAtomMutProvider
Trait for providing mutable random access to atoms
RandomAtomProvider
Trait for providing random access to atoms
RandomBondProvider
Trait for providing access to bonds
RandomMoleculeProvider
Trait for providing access to molecules (atoms subsets connected by bonds)
RandomParticleMutProvider
Trait for providing mutable random access to particles
RandomParticleProvider
Trait for providing random access to particles
RandomPosMutProvider
Trait for providing mutable random access to positions
RandomPosProvider
Trait for providing random access to positions
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

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).
Matrix3f
Convenience alias for 3x3 matrix
Pos
Atom position
SVec
Alias to sorted vector
Vector3f
Convenience alias for 3D vector