--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To post to this group, send email to plumed...@googlegroups.com.
Visit this group at http://groups.google.com/group/plumed-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/a48f17d0-d77a-4728-a7e7-184e52a42969%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion visit https://groups.google.com/d/msgid/plumed-users/9142a37a-b2af-41d7-89f7-134fc6d369c9n%40googlegroups.com.
static void parseAtomList( const int& num, std::vector<AtomNumber>& t, ActionAtomistic* aa );
static unsigned getModeAndSetupValues( ActionWithValue* av );
static void calculateCV( const unsigned& mode, const std::vector<double>& masses, const std::vector<double>& charges,
const std::vector<Vector>& pos, std::vector<double>& vals, std::vector<std::vector<Vector> >& derivs,
std::vector<Tensor>& virial, const ActionAtomistic* aa );
The first two of these do things that were in the constructor for the old version of the command. The last thing does a lot of what was done in the old version of calculate.
You will then notice that the command for registering the action is as follows:
typedef ColvarShortcut<Distance> DistanceShortcut;
PLUMED_REGISTER_ACTION(DistanceShortcut,"DISTANCE")
PLUMED_REGISTER_ACTION(Distance,"DISTANCE_SCALAR")
typedef MultiColvarTemplate<Distance> DistanceMulti;
PLUMED_REGISTER_ACTION(DistanceMulti,"DISTANCE_VECTOR")
The MultiColvarTemplate template class basically calls the calculateCv function function multiple times to calculate your vector of CVs. Then once you have that vector of CVs you can pass it into the other actions. It also makes use of the parseAtomList and getModeAndSetupValues to do the reading in of the atoms involved and working out what exactly the user wants to calculate (for the distance example this deals with the COMPONENTS and SCALED_COMPONENTS flags. You may be able to do what is done in ANGLE for your version of the CV as there may not be options to do different things.)
Alternatively, if you don't want to change your code you can use two or more GHOSTPROBE commands and concatenate them together as follows.
cv1: GHOSTPROBE ...
cv2: GHOSTPROBE ...
vec: CONCATENATE ARG=cv1,cv2
You can then pass the object called vec to the restraint action.
I hope this helps
Gareth
To view this discussion visit https://groups.google.com/d/msgid/plumed-users/88af16af-199c-4649-96cd-c94c91323855n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/plumed-users/9478a00f-057a-4c6a-9e26-d95d6da991f0n%40googlegroups.com.