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

Merge branch 'v2.1' into v2.2

parents 1dedccb8 922f253a
No related branches found
No related tags found
No related merge requests found
...@@ -221,6 +221,12 @@ Unreleased changes (will be included in 2.1.4) ...@@ -221,6 +221,12 @@ Unreleased changes (will be included in 2.1.4)
See branch \branch{v2.1} on git repository. See branch \branch{v2.1} on git repository.
For users: For users:
- Fixed NAMD patch. Masses and charges were not passed correctly, thus resulting in wrong
\ref COM or \ref CENTER with MASS.
This fix required repatching NAMD.
Notice that this bug was present also in v2.0 but in a different form.
More information here (\issue{162}), including a workaround that allows masses to be fixed
without repatching.
- Fixed erroneously reported message about MPI at the end of ./configure. - Fixed erroneously reported message about MPI at the end of ./configure.
- Changed warning message about undocumented components. - Changed warning message about undocumented components.
- PLUMED now says in the log file if it was compiled from a dirty git repository. - PLUMED now says in the log file if it was compiled from a dirty git repository.
......
...@@ -128,8 +128,8 @@ patch -u -l -b -F 5 --suffix=.preplumed "./src/ComputeMgr.C" << \EOF_EOF ...@@ -128,8 +128,8 @@ patch -u -l -b -F 5 --suffix=.preplumed "./src/ComputeMgr.C" << \EOF_EOF
+ positions[3*i+0]=coord.x; + positions[3*i+0]=coord.x;
+ positions[3*i+1]=coord.y; + positions[3*i+1]=coord.y;
+ positions[3*i+2]=coord.z; + positions[3*i+2]=coord.z;
+ masses[i]=Node::Object()->molecule->atommass(i); + masses[i]=Node::Object()->molecule->atommass(index[i]);
+ charges[i]=Node::Object()->molecule->atommass(i); + charges[i]=Node::Object()->molecule->atomcharge(index[i]);
+ }; + };
+ +
+ if(spar->lattice.volume()>0.0){ + if(spar->lattice.volume()>0.0){
...@@ -141,7 +141,7 @@ patch -u -l -b -F 5 --suffix=.preplumed "./src/ComputeMgr.C" << \EOF_EOF ...@@ -141,7 +141,7 @@ patch -u -l -b -F 5 --suffix=.preplumed "./src/ComputeMgr.C" << \EOF_EOF
+ +
+ for(int i=0;i<forces.size();i++) forces[i]=0.0; + for(int i=0;i<forces.size();i++) forces[i]=0.0;
+ +
+ cmd("setMasses",&masses[0]); + cmd("setMasses",&masses[0]); cmd("setCharges",&charges[0]);
+ cmd("setPositions",&positions[0]); + cmd("setPositions",&positions[0]);
+ cmd("setForces",&forces[0]); + cmd("setForces",&forces[0]);
+ +
......
...@@ -127,8 +127,8 @@ patch -u -l -b -F 5 --suffix=.preplumed "./src/ComputeMgr.C" << \EOF_EOF ...@@ -127,8 +127,8 @@ patch -u -l -b -F 5 --suffix=.preplumed "./src/ComputeMgr.C" << \EOF_EOF
+ positions[3*i+0]=coord.x; + positions[3*i+0]=coord.x;
+ positions[3*i+1]=coord.y; + positions[3*i+1]=coord.y;
+ positions[3*i+2]=coord.z; + positions[3*i+2]=coord.z;
+ masses[i]=Node::Object()->molecule->atommass(i); + masses[i]=Node::Object()->molecule->atommass(index[i]);
+ charges[i]=Node::Object()->molecule->atommass(i); + charges[i]=Node::Object()->molecule->atomcharge(index[i]);
+ }; + };
+ +
+ if(spar->lattice.volume()>0.0){ + if(spar->lattice.volume()>0.0){
...@@ -140,7 +140,7 @@ patch -u -l -b -F 5 --suffix=.preplumed "./src/ComputeMgr.C" << \EOF_EOF ...@@ -140,7 +140,7 @@ patch -u -l -b -F 5 --suffix=.preplumed "./src/ComputeMgr.C" << \EOF_EOF
+ +
+ for(int i=0;i<forces.size();i++) forces[i]=0.0; + for(int i=0;i<forces.size();i++) forces[i]=0.0;
+ +
+ cmd("setMasses",&masses[0]); + cmd("setMasses",&masses[0]); cmd("setCharges",&charges[0]);
+ cmd("setPositions",&positions[0]); + cmd("setPositions",&positions[0]);
+ cmd("setForces",&forces[0]); + cmd("setForces",&forces[0]);
+ +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment