STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::topology::CmapSurfaceUnion Class Reference

A class to merge two sets of CMAP surfaces. While the AtomGraphSynthesis has a means for doing this, it is more advanced and fits in the context of a different data structure. Similar ideas will be applied in the limited case of finding the union of two parameter sets. More...

#include <atomgraph_refinement.h>

Public Member Functions

int getUniqueSurfaceCount () const
 Get the number of unique CMAP surfaces.
 
int getContributingTopologyCount () const
 Get the number of contributing topologies.
 
std::vector< double > getCmapSurface (int surf_index) const
 Get a CMAP surface based on its index in the consensus parameter set.
 
const std::vector< double > & getAllSurfaces () const
 Get a vector of all surfaces in the union.
 
void addSet (const double *surf_v, const int *dim_v, int nmap, double tol=constants::small)
 Add another set of CMAP terms to the union.
 
 CmapSurfaceUnion ()
 Rather than take ValenceKit abstracts and introduce a dependency on atomgraph_abstracts.h, the constructor cherry-picks the relevant details from each valence interaction abstract of the two topologies.
 
 CmapSurfaceUnion (const double *surf_a, const int *dim_a, int nmap_a, const double *surf_b, const int *dim_b, int nmap_b, double match_tol=constants::small)
 
 CmapSurfaceUnion (const double *surf_a, const int *dim_a, int nmap_a)
 
 CmapSurfaceUnion (const std::vector< double > &surf_a, const std::vector< int > &dim_a, const std::vector< double > &surf_b, const std::vector< int > &dim_b, double match_tol=constants::small)
 
 CmapSurfaceUnion (const std::vector< double > &surf_a, const std::vector< int > &dim_a)
 
 CmapSurfaceUnion (const CmapSurfaceUnion &orig)=default
 With only Standard Template Library elements for arrays and scalar member variables otherwise, the default copy and move constructors as well as the copy and move assignment operators will be adequate.
 
 CmapSurfaceUnion (CmapSurfaceUnion &&orig)=default
 
CmapSurfaceUnionoperator= (const CmapSurfaceUnion &orig)=default
 
CmapSurfaceUnionoperator= (CmapSurfaceUnion &&orig)=default
 
const std::vector< int > & getSurfaceDimensions () const
 Get the dimension of one or all surfaces in the consensus parameter set. Each CMAP surface is assumed to be a square grid.
 
int getSurfaceDimensions (int surf_index) const
 
const std::vector< int > & getCorrespondence (int set_index) const
 Access the CMAP surface parameter index correspondence for a particular input set (input sets will, for most purposes, be specific topologies).
 
int getCorrespondence (int set_index, int surf_index) const
 

Detailed Description

A class to merge two sets of CMAP surfaces. While the AtomGraphSynthesis has a means for doing this, it is more advanced and fits in the context of a different data structure. Similar ideas will be applied in the limited case of finding the union of two parameter sets.

Constructor & Destructor Documentation

◆ CmapSurfaceUnion() [1/2]

stormm::topology::CmapSurfaceUnion::CmapSurfaceUnion ( )

Rather than take ValenceKit abstracts and introduce a dependency on atomgraph_abstracts.h, the constructor cherry-picks the relevant details from each valence interaction abstract of the two topologies.

Overloaded:

  • Initialize an empty object
  • Provide the data as raw, C-style arrays
  • Provide the data as Standard Template Library vectors
Parameters
surf_aConcatenated array of CMAP surface values for the first topology
dim_aDimensions of the CMAP surfaces for the first topology (all surfaces are assumed to be square grids). Summing the squares of the elements of dim_a, as is done internally, provides a prefix sum indicating the bounds of each unique CMAP surface.
nmap_aThe number of distinct CMAP surfaces in the first topology, the trusted length of dim_a
surf_bConcatenated array of CMAP surface values for the second topology
dim_bDimensions of the CMAP surfaces for the second topology
nmap_bThe number of distinct CMAP surfaces in the second topology
match_tolThe tolerance for declaring that the values at two points of different CMAPs are identical. All points on both surfaces must align to within this tolerance in order for the surfaces to be considered a match.

◆ CmapSurfaceUnion() [2/2]

stormm::topology::CmapSurfaceUnion::CmapSurfaceUnion ( const CmapSurfaceUnion & orig)
default

With only Standard Template Library elements for arrays and scalar member variables otherwise, the default copy and move constructors as well as the copy and move assignment operators will be adequate.

Parameters
originalThe original object to copy or move
otherAnother object placed on the right hand side of an assignment statement

Member Function Documentation

◆ addSet()

void stormm::topology::CmapSurfaceUnion::addSet ( const double * surf_v,
const int * dim_v,
int nmap,
double tol = constants::small )

Add another set of CMAP terms to the union.

Parameters
surf_vThe CMAP surface values with which to populate the object, concatenated
dims_vThe dimensions of each surface
nmapThe number of distinct CMAP surfaces
tolThe tolerance for declaring that the values at two points of different CMAPs are identical. All points on both surfaces must align to within this tolerance in order for the surfaces to be considered a match.

◆ getCmapSurface()

std::vector< double > stormm::topology::CmapSurfaceUnion::getCmapSurface ( int surf_index) const

Get a CMAP surface based on its index in the consensus parameter set.

Parameters
surf_indexThe index of the surface of interest, with a count beginning at zero

◆ getCorrespondence()

const std::vector< int > & stormm::topology::CmapSurfaceUnion::getCorrespondence ( int set_index) const

Access the CMAP surface parameter index correspondence for a particular input set (input sets will, for most purposes, be specific topologies).

Overloaded:

  • Provide the CMAP index within the topology of interest to get its index in the consensus
  • Provide only an indication of the topology to get the mapping for all of its CMAP parameters onto the consensus table
Parameters
set_indexIndex of the topology of interest
surf_indexIndex of the surface of interest within its native topology

◆ getSurfaceDimensions()

const std::vector< int > & stormm::topology::CmapSurfaceUnion::getSurfaceDimensions ( ) const

Get the dimension of one or all surfaces in the consensus parameter set. Each CMAP surface is assumed to be a square grid.

Overloaded:

  • Get all surface dimensions by providing no argument
  • Get a specific CMAP's dimension by specifying a parameter index
Parameters
surf_indexThe index of the CMAP surface of interest

The documentation for this class was generated from the following files: