diff --git a/regtest/multicolvar/rt-link/main.cpp b/regtest/multicolvar/rt-link/main.cpp index a74fea6900009b26d38fa9745f50ac64fa9839c2..9e4dbb97e33a752270add0b8250dcca8e1840cba 100644 --- a/regtest/multicolvar/rt-link/main.cpp +++ b/regtest/multicolvar/rt-link/main.cpp @@ -29,7 +29,7 @@ int main(){ for(unsigned nx=1;nx<6;++nx){ for(unsigned ny=1;ny<6;++ny){ for(unsigned nz=1;nz<6;++nz){ - myatoms.resize( nx*ny*nz*2 ); + myatoms.resize( 1 + nx*ny*nz*2 ); buildCell( nx, ny, nz, fposA, fposB, Bindices, mypbc ); // Check list is built correctly - with pbc linkcells.buildCellLists( fposB, Bindices, mypbc ); diff --git a/src/colvar/Gyration.cpp b/src/colvar/Gyration.cpp index 830695fc38263b656f0aba132c5c6be783f4c606..48bf285049a81f46cca3a46ede00e5369a54e7ea 100644 --- a/src/colvar/Gyration.cpp +++ b/src/colvar/Gyration.cpp @@ -57,12 +57,15 @@ with the position of the center of mass \f${r}_{\rm COM}\f$ given by: {r}_{\rm COM}=\frac{\sum_i^{n} {r}_i\ m_i }{\sum_i^{n} m_i} \f] +The radius of gyration is calculated without applying periodic boundary conditions so the atoms used for the calculation +should all be part of the same molecule that should be made whole before calculating the cv, \ref WHOLEMOLECULES. \par Examples The following input tells plumed to print the radius of gyration of the chain containing atoms 10 to 20. \verbatim +WHOLEMOLECULES ENTITY0=10-20 GYRATION TYPE=RADIUS ATOMS=10-20 LABEL=rg PRINT ARG=rg STRIDE=1 FILE=colvar \endverbatim @@ -77,17 +80,18 @@ private: int rg_type; bool use_masses; public: - static void registerKeywords( Keywords& keys ); + static void registerKeywords(Keywords& keys); Gyration(const ActionOptions&); virtual void calculate(); }; PLUMED_REGISTER_ACTION(Gyration,"GYRATION") -void Gyration::registerKeywords( Keywords& keys ){ - Colvar::registerKeywords( keys ); - keys.add("compulsory","TYPE","RADIUS","The type of calculation relative to the Gyration Tensor you want to perform"); +void Gyration::registerKeywords(Keywords& keys){ + Colvar::registerKeywords(keys); + keys.remove("NOPBC"); keys.add("atoms","ATOMS","the group of atoms that you are calculating the Gyration Tensor for"); + keys.add("compulsory","TYPE","RADIUS","The type of calculation relative to the Gyration Tensor you want to perform"); keys.addFlag("NOT_MASS_WEIGHTED",false,"set the masses of all the atoms equal to one"); }