Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::DistanceGeometry Namespace Reference

Distance geometry-related classes and functions. More...

Data Structures

struct  Configuration
 A configuration object for distance geometry runs with sane defaults. More...
 
struct  MoleculeDGInformation
 Intermediate conformational data about a Molecule given by a spatial model. More...
 
class  DistanceBoundsMatrix
 
struct  ChiralConstraint
 Data struct representing a chiral constraint. More...
 
struct  DihedralConstraint
 Data struct representing a dihedral constraint. More...
 
class  EigenRefinementProblem
 Eigen-based refinement error function. More...
 
struct  RefinementTraits
 This is for when you have a fully qualified Refinement typename but want to get the template arguments back. More...
 
class  ExplicitBoundsGraph
 BGL wrapper to help with distance bounds smoothing. More...
 
class  ImplicitBoundsGraph
 Simulates a graph from which triangle inequality bounds can be calculated by shortest-paths. More...
 
class  MetricMatrix
 
class  SpatialModel
 Class performing spatial modeling of molecules. More...
 
struct  ValueBounds
 Data class for bounded values. More...
 

Enumerations

enum  Partiality { Partiality::FourAtom, Partiality::TenPercent, Partiality::All }
 Limit triangle inequality bounds smoothing to a subset of all atoms. More...
 

Functions

MoleculeDGInformation gatherDGInformation (const Molecule &molecule, const Configuration &configuration)
 Collects intermediate conformational data about a Molecule using a spatial model. More...
 
Result< AngstromPositionsrefine (Eigen::MatrixXd embeddedPositions, const DistanceBoundsMatrix &distanceBounds, const Configuration &configuration, const std::shared_ptr< MoleculeDGInformation > &DgDataPtr)
 Distance Geometry refinement.
 
Result< AngstromPositionsgenerateConformer (const Molecule &molecule, const Configuration &configuration, std::shared_ptr< MoleculeDGInformation > &DgDataPtr, bool regenerateDGDataEachStep, Random::Engine &engine)
 
std::vector< Result
< AngstromPositions >> 
run (const Molecule &molecule, unsigned numConformers, const Configuration &configuration, boost::optional< unsigned > seedOption)
 Main and parallel implementation of Distance Geometry. Generates an ensemble of 3D structures of a given Molecule. More...
 
template<class RefinementType , typename PositionType >
bool finalStructureAcceptable (const RefinementType &refinement, const DistanceBoundsMatrix &bounds, const PositionType &positions)
 Decides whether the final structure from a refinement is acceptable. More...
 
unsigned tetrangleSmooth (Eigen::Ref< Eigen::MatrixXd > bounds)
 Smoothes the bounds matrix using tetrangle inequalities. More...
 

Detailed Description

Distance geometry-related classes and functions.

Enumeration Type Documentation

Limit triangle inequality bounds smoothing to a subset of all atoms.

Usually, after choosing a single conformer's atom-pairwise distances from between the distance bounds that are generated from the spatial model, all other distance bounds are re-smoothed using the triangle inequality. However, the reduction in distance bounds slack all over the matrix diminishes with each successive chosen distance, yielding only diminishing returns.

With this option, you can choose to stop re-smoothing the entire matrix after a limited number of one-to-all distance choices. This has the following tradeoff effects:

  • Reduces computational effort in generating a distance matrix, speeding up conformer generation
  • Worsens the quality of initial embedded coordinates prior to refinement, requiring more refinement steps
Enumerator
FourAtom 

Perform smoothing for four one-to-all distance choices.

In principle, if the distances from four atoms to all others are known, the overall conformation is fully determined. This is unfortunately not realized in practice in the DG procedure.

This yields the most speedup in distance matrix generation, but also worsens the initial embedded coordinates the most.

TenPercent 

Perform smoothing for ten percent of one-to-all distance choices.

Note
Still performs bounds smoothing for at least four one-to-all distance choices if the number of atoms is less than 40.
All 

Perform smoothing after all distance choices.

This yields the slowest distance matrix generation, but also the best initial embedded coordinates.

Function Documentation

template<class RefinementType , typename PositionType >
bool Scine::Molassembler::DistanceGeometry::finalStructureAcceptable ( const RefinementType &  refinement,
const DistanceBoundsMatrix &  bounds,
const PositionType &  positions 
)

Decides whether the final structure from a refinement is acceptable.

A final structure is acceptable if

  • All distance bounds are within 0.5 of either the lower or upper boundary
  • All chiral constraints are within 0.5 of either the lower or upper boundary

Complexity \(\Theta(N^2)\) due to atom-pairwise distance bounds

Parameters
refinementThe refinement functor
boundsThe distance bounds
positionsThe final positions from a refinement
Returns
Whether the final structure is acceptable
MoleculeDGInformation Scine::Molassembler::DistanceGeometry::gatherDGInformation ( const Molecule &  molecule,
const Configuration &  configuration 
)

Collects intermediate conformational data about a Molecule using a spatial model.

Complexity At least \(O(P_2 + P_3 + P_4)\) where \(P_i\) is the number of distinct paths of length \(i\) in the graph. That should scale at least linearly in the number of vertices.

std::vector< Result<AngstromPositions>> Scine::Molassembler::DistanceGeometry::run ( const Molecule &  molecule,
unsigned  numConformers,
const Configuration &  configuration,
boost::optional< unsigned >  seedOption 
)

Main and parallel implementation of Distance Geometry. Generates an ensemble of 3D structures of a given Molecule.

Complexity Roughly \(O(C \cdot N^3)\) where \(C\) is the number of conformers and \(N\) is the number of atoms in molecule

See Also
generateEnsemble
unsigned Scine::Molassembler::DistanceGeometry::tetrangleSmooth ( Eigen::Ref< Eigen::MatrixXd >  bounds)

Smoothes the bounds matrix using tetrangle inequalities.

Precondition
Assumes bounds has already been triangle inequality smoothed
Parameters
boundsA square matrix with zeros on the diagonal and B(j, i) <= B(i, j) for all i < j (lower bounds on strictly lower triangle, upper bounds on strictly upper triangle)

Complexity \(\Theta(N^4)\)

Warning
This doesn't work and I don't know why.
Returns
Tetrangle smoothed bounds matrix