Skip to content
Snippets Groups Projects
Commit 5b45d959 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Added access to absolute atom index in Colvars

Just use getAbsoluteIndex(i) to get the absolute number of i-th atom.
parent 2758843f
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,8 @@ protected:
int getNatoms()const{return indexes.size();};
/// Compute the pbc distance between two positions
Vector pbcDistance(const Vector&,const Vector&)const;
/// Get the absolute index of an atom
int getAbsoluteIndex(int i)const;
public:
......@@ -79,6 +81,10 @@ double ActionAtomistic::getCharges(int i)const{
return charges[i];
}
inline
int ActionAtomistic::getAbsoluteIndex(int i)const{
return indexes[i];
}
inline
const std::vector<Vector> & ActionAtomistic::getPositions()const{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment