Skip to content

Commit c54e27b

Browse files
Gareth Aneurin TribelloGareth Aneurin Tribello
authored andcommitted
Merge branch 'v2.10'
2 parents 9a6f083 + 518a4bc commit c54e27b

File tree

5 files changed

+142
-3
lines changed

5 files changed

+142
-3
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#! FIELDS time parameter p1.x p1.y p1.z p1n.x p1n.y p1n.z
2+
0.000000 0 0.00000 2.44705 0.80805 0.00000 2.44705 0.80805
3+
0.000000 1 -2.44705 0.00000 0.02851 -2.44705 0.00000 0.02851
4+
0.000000 2 -0.80805 -0.02851 0.00000 -0.80805 -0.02851 0.00000
5+
0.000000 3 0.00000 -2.44705 -0.80805 0.00000 -2.44705 -0.80805
6+
0.000000 4 2.44705 0.00000 -0.02851 2.44705 0.00000 -0.02851
7+
0.000000 5 0.80805 0.02851 0.00000 0.80805 0.02851 0.00000
8+
0.000000 6 0.00000 1.64577 -0.05614 0.00000 1.64577 -0.05614
9+
0.000000 7 -1.64577 0.00000 -0.05161 -1.64577 0.00000 -0.05161
10+
0.000000 8 0.05614 0.05161 0.00000 0.05614 0.05161 0.00000
11+
0.000000 9 0.00000 -1.64577 0.05614 0.00000 -1.64577 0.05614
12+
0.000000 10 1.64577 0.00000 0.05161 1.64577 0.00000 0.05161
13+
0.000000 11 -0.05614 -0.05161 0.00000 -0.05614 -0.05161 0.00000
14+
0.000000 12 0.00000 -0.17322 -0.04011 -0.00000 -0.17322 -0.04011
15+
0.000000 13 0.17322 0.00000 0.00000 0.17322 0.00000 0.00000
16+
0.000000 14 0.04011 0.00000 0.00000 0.04011 -0.00000 0.00000
17+
0.000000 15 0.00000 1.46726 0.00000 -0.00000 1.46726 -0.00000
18+
0.000000 16 -1.46726 0.00000 -0.04011 -1.46726 0.00000 -0.04011
19+
0.000000 17 0.00000 0.04011 0.00000 -0.00000 0.04011 0.00000
20+
0.000000 18 0.00000 0.00000 1.46726 -0.00000 -0.00000 1.46726
21+
0.000000 19 0.00000 0.00000 0.17322 -0.00000 0.00000 0.17322
22+
0.000000 20 -1.46726 -0.17322 0.00000 -1.46726 -0.17322 0.00000
23+
0.050000 0 0.00000 2.40244 0.78108 0.00000 2.40244 0.78108
24+
0.050000 1 -2.40244 0.00000 0.02046 -2.40244 0.00000 0.02046
25+
0.050000 2 -0.78108 -0.02046 0.00000 -0.78108 -0.02046 0.00000
26+
0.050000 3 0.00000 -2.40244 -0.78108 0.00000 -2.40244 -0.78108
27+
0.050000 4 2.40244 0.00000 -0.02046 2.40244 0.00000 -0.02046
28+
0.050000 5 0.78108 0.02046 0.00000 0.78108 0.02046 0.00000
29+
0.050000 6 0.00000 1.64198 -0.09163 0.00000 1.64198 -0.09163
30+
0.050000 7 -1.64198 0.00000 -0.10765 -1.64198 0.00000 -0.10765
31+
0.050000 8 0.09163 0.10765 0.00000 0.09163 0.10765 0.00000
32+
0.050000 9 0.00000 -1.64198 0.09163 0.00000 -1.64198 0.09163
33+
0.050000 10 1.64198 0.00000 0.10765 1.64198 0.00000 0.10765
34+
0.050000 11 -0.09163 -0.10765 0.00000 -0.09163 -0.10765 0.00000
35+
0.050000 12 0.00000 -0.29224 -0.08221 0.00000 -0.29224 -0.08221
36+
0.050000 13 0.29224 0.00000 0.00000 0.29224 -0.00000 -0.00000
37+
0.050000 14 0.08221 0.00000 0.00000 0.08221 -0.00000 -0.00000
38+
0.050000 15 0.00000 1.50265 0.00000 0.00000 1.50265 0.00000
39+
0.050000 16 -1.50265 0.00000 -0.08221 -1.50265 -0.00000 -0.08221
40+
0.050000 17 0.00000 0.08221 0.00000 0.00000 0.08221 -0.00000
41+
0.050000 18 0.00000 0.00000 1.50265 0.00000 -0.00000 1.50265
42+
0.050000 19 0.00000 0.00000 0.29224 0.00000 -0.00000 0.29224
43+
0.050000 20 -1.50265 -0.29224 0.00000 -1.50265 -0.29224 -0.00000
44+
0.100000 0 0.00000 2.40342 0.74357 0.00000 2.40342 0.74357
45+
0.100000 1 -2.40342 0.00000 0.00469 -2.40342 0.00000 0.00469
46+
0.100000 2 -0.74357 -0.00469 0.00000 -0.74357 -0.00469 0.00000
47+
0.100000 3 0.00000 -2.40342 -0.74357 0.00000 -2.40342 -0.74357
48+
0.100000 4 2.40342 0.00000 -0.00469 2.40342 0.00000 -0.00469
49+
0.100000 5 0.74357 0.00469 0.00000 0.74357 0.00469 0.00000
50+
0.100000 6 0.00000 1.62939 -0.10927 0.00000 1.62939 -0.10927
51+
0.100000 7 -1.62939 0.00000 -0.16810 -1.62939 0.00000 -0.16810
52+
0.100000 8 0.10927 0.16810 0.00000 0.10927 0.16810 0.00000
53+
0.100000 9 0.00000 -1.62939 0.10927 0.00000 -1.62939 0.10927
54+
0.100000 10 1.62939 0.00000 0.16810 1.62939 0.00000 0.16810
55+
0.100000 11 -0.10927 -0.16810 0.00000 -0.10927 -0.16810 0.00000
56+
0.100000 12 0.00000 -0.41166 -0.12449 0.00000 -0.41166 -0.12449
57+
0.100000 13 0.41166 0.00000 0.00000 0.41166 0.00000 0.00000
58+
0.100000 14 0.12449 0.00000 0.00000 0.12449 -0.00000 0.00000
59+
0.100000 15 0.00000 1.47421 0.00000 0.00000 1.47421 0.00000
60+
0.100000 16 -1.47421 0.00000 -0.12449 -1.47421 0.00000 -0.12449
61+
0.100000 17 0.00000 0.12449 0.00000 -0.00000 0.12449 0.00000
62+
0.100000 18 0.00000 0.00000 1.47421 0.00000 0.00000 1.47421
63+
0.100000 19 0.00000 0.00000 0.41166 0.00000 0.00000 0.41166
64+
0.100000 20 -1.47421 -0.41166 0.00000 -1.47421 -0.41166 0.00000
65+
0.150000 0 0.00000 2.44419 0.69638 0.00000 2.44419 0.69638
66+
0.150000 1 -2.44419 0.00000 -0.02175 -2.44419 0.00000 -0.02175
67+
0.150000 2 -0.69638 0.02175 0.00000 -0.69638 0.02175 0.00000
68+
0.150000 3 0.00000 -2.44419 -0.69638 0.00000 -2.44419 -0.69638
69+
0.150000 4 2.44419 0.00000 0.02175 2.44419 0.00000 0.02175
70+
0.150000 5 0.69638 -0.02175 0.00000 0.69638 -0.02175 0.00000
71+
0.150000 6 0.00000 1.61477 -0.11830 0.00000 1.61477 -0.11830
72+
0.150000 7 -1.61477 0.00000 -0.22124 -1.61477 0.00000 -0.22124
73+
0.150000 8 0.11830 0.22124 0.00000 0.11830 0.22124 0.00000
74+
0.150000 9 0.00000 -1.61477 0.11830 0.00000 -1.61477 0.11830
75+
0.150000 10 1.61477 0.00000 0.22124 1.61477 0.00000 0.22124
76+
0.150000 11 -0.11830 -0.22124 0.00000 -0.11830 -0.22124 0.00000
77+
0.150000 12 0.00000 -0.50563 -0.15664 0.00000 -0.50563 -0.15664
78+
0.150000 13 0.50563 0.00000 0.00000 0.50563 0.00000 -0.00000
79+
0.150000 14 0.15664 0.00000 0.00000 0.15664 0.00000 0.00000
80+
0.150000 15 0.00000 1.41365 0.00000 0.00000 1.41365 0.00000
81+
0.150000 16 -1.41365 0.00000 -0.15664 -1.41365 0.00000 -0.15664
82+
0.150000 17 0.00000 0.15664 0.00000 0.00000 0.15664 0.00000
83+
0.150000 18 0.00000 0.00000 1.41365 0.00000 0.00000 1.41365
84+
0.150000 19 0.00000 0.00000 0.50563 0.00000 0.00000 0.50563
85+
0.150000 20 -1.41365 -0.50563 0.00000 -1.41365 -0.50563 0.00000
86+
0.200000 0 0.00000 2.47711 0.64867 0.00000 2.47711 0.64867
87+
0.200000 1 -2.47711 0.00000 -0.04847 -2.47711 0.00000 -0.04847
88+
0.200000 2 -0.64867 0.04847 0.00000 -0.64867 0.04847 0.00000
89+
0.200000 3 0.00000 -2.47711 -0.64867 0.00000 -2.47711 -0.64867
90+
0.200000 4 2.47711 0.00000 0.04847 2.47711 0.00000 0.04847
91+
0.200000 5 0.64867 -0.04847 0.00000 0.64867 -0.04847 0.00000
92+
0.200000 6 0.00000 1.62124 -0.15580 0.00000 1.62124 -0.15580
93+
0.200000 7 -1.62124 0.00000 -0.23917 -1.62124 0.00000 -0.23917
94+
0.200000 8 0.15580 0.23917 0.00000 0.15580 0.23917 0.00000
95+
0.200000 9 0.00000 -1.62124 0.15580 0.00000 -1.62124 0.15580
96+
0.200000 10 1.62124 0.00000 0.23917 1.62124 0.00000 0.23917
97+
0.200000 11 -0.15580 -0.23917 0.00000 -0.15580 -0.23917 0.00000
98+
0.200000 12 0.00000 -0.51386 -0.16269 0.00000 -0.51386 -0.16269
99+
0.200000 13 0.51386 0.00000 0.00000 0.51386 0.00000 0.00000
100+
0.200000 14 0.16269 0.00000 0.00000 0.16269 0.00000 0.00000
101+
0.200000 15 0.00000 1.43758 0.00000 0.00000 1.43758 -0.00000
102+
0.200000 16 -1.43758 0.00000 -0.16269 -1.43758 0.00000 -0.16269
103+
0.200000 17 0.00000 0.16269 0.00000 0.00000 0.16269 0.00000
104+
0.200000 18 0.00000 0.00000 1.43758 0.00000 0.00000 1.43758
105+
0.200000 19 0.00000 0.00000 0.51386 0.00000 0.00000 0.51386
106+
0.200000 20 -1.43758 -0.51386 0.00000 -1.43758 -0.51386 0.00000

regtest/basic/rt-plane/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include ../../scripts/test.make

regtest/basic/rt-plane/config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
type=driver
2+
# this is to test a different name
3+
arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz trajectory.xyz --dump-forces forces --dump-forces-fmt=%10.6f"
4+
extra_files="../../trajectories/trajectory.xyz"

regtest/basic/rt-plane/plumed.dat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
p1: PLANE ATOMS=2,6,3
2+
p1n: PLANE ATOMS=2,6,3 NUMERICAL_DERIVATIVES
3+
4+
DUMPDERIVATIVES ...
5+
STRIDE=10
6+
ARG=p1.*,p1n.*
7+
FILE=DERIVATIVES
8+
FMT=%8.5f
9+
... DUMPDERIVATIVES
10+
11+
ENDPLUMED
12+

src/colvar/Plane.cpp

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,27 @@ void Plane::calculate() {
162162
}
163163
ColvarOutput cvout = ColvarOutput::createColvarOutput(value,derivs,this);
164164
calculateCV( ColvarInput::createColvarInput( 0, getPositions(), this ), cvout );
165-
setValue( value[0] );
165+
Value* valuex=getPntrToComponent("x");
166+
Value* valuey=getPntrToComponent("y");
167+
Value* valuez=getPntrToComponent("z");
168+
169+
for(unsigned i=0; i<getPositions().size(); ++i) {
170+
setAtomsDerivatives( valuex, i, cvout.getAtomDerivatives(0,i) );
171+
}
172+
setBoxDerivatives( valuex, cvout.virial[0] );
173+
valuex->set( value[0] );
174+
175+
for(unsigned i=0; i<getPositions().size(); ++i) {
176+
setAtomsDerivatives( valuey, i, cvout.getAtomDerivatives(1,i) );
177+
}
178+
setBoxDerivatives( valuey, cvout.virial[1] );
179+
valuey->set( value[1] );
180+
166181
for(unsigned i=0; i<getPositions().size(); ++i) {
167-
setAtomsDerivatives( i, cvout.getAtomDerivatives(0,i) );
182+
setAtomsDerivatives( valuez, i, cvout.getAtomDerivatives(2,i) );
168183
}
169-
setBoxDerivatives( cvout.virial[0] );
184+
setBoxDerivatives( valuez, cvout.virial[2] );
185+
valuez->set( value[2] );
170186
}
171187

172188
void Plane::calculateCV( const ColvarInput& cvin, ColvarOutput& cvout ) {

0 commit comments

Comments
 (0)