class SecondSphere : public MultiColvar {
private:
double rcut2;
HistogramBead bead;
public:
static void registerKeywords( Keywords& keys );
explicit SecondSphere(const ActionOptions&);
// active methods:
virtual double compute( const unsigned& tindex, AtomValuePack& myatoms ) const ;
/// Returns the number of coordinates of the field
bool isPeriodic(){ return false; }
};
PLUMED_REGISTER_ACTION(SecondSphere,"SECONDSPHERE")
void SecondSphere::registerKeywords( Keywords& keys ){
MultiColvar::registerKeywords( keys );
keys.use("SPECIES"); keys.use("SPECIESA"); keys.use("SPECIESB");
// Use actionWithDistributionKeywords
keys.add("compulsory","BEAD","the histogram we are using");
keys.use("MEAN"); keys.use("MORE_THAN"); keys.use("LESS_THAN"); keys.use("MAX");
keys.use("MIN"); keys.use("BETWEEN"); keys.use("HISTOGRAM"); keys.use("MOMENTS");
keys.use("ALT_MIN"); keys.use("LOWEST"); keys.use("HIGHEST");
}
SecondSphere::SecondSphere(const ActionOptions&ao):
PLUMED_MULTICOLVAR_INIT(ao)
{
std::string mybeadstr, errors; parse("BEAD",mybeadstr);
bead.set( mybeadstr, errors ); bead.isNotPeriodic();
if( errors.size()!=0 ) error( errors );
// Read in the atoms
int natoms=2; readAtoms( natoms );
// And setup the ActionWithVessel
checkRead();
}
double SecondSphere::compute( const unsigned& tindex, AtomValuePack& myatoms ) const {
double value=0, dfunc;