Skip to content

Commit

Permalink
Added regtest for EMST
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniBussi committed Feb 20, 2024
1 parent 7b8345f commit 9ff970d
Show file tree
Hide file tree
Showing 9 changed files with 947 additions and 0 deletions.
3 changes: 3 additions & 0 deletions regtest/basic/rt-emst/COLVAR.reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! FIELDS time r1 r2 r3 r4 r5 r6
0.000000 12.624019 0.000000 12.624019 12.624019 12.624019 0.000000
1.000000 12.624019 8.981462 12.624019 12.624019 12.624019 0.000000
1 change: 1 addition & 0 deletions regtest/basic/rt-emst/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../scripts/test.make
3 changes: 3 additions & 0 deletions regtest/basic/rt-emst/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type=driver
# we use A so as to make the comparison with pdb easier
arg="--ixyz traj.xyz --length-units A"
43 changes: 43 additions & 0 deletions regtest/basic/rt-emst/go.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import random
def print_pdb(coords,file):
i=0
for coord in coords:
i+=1
print("{:6s}{:5d} {:^4s}{:1s}{:3s} {:1s}{:4d}{:1s} {:8.3f}{:8.3f}{:8.3f}{:6.2f}{:6.2f} {:>2s}{:2s}".format(
"ATOM",i,"type","","","",1,"",coord[0],coord[1],coord[2],1.0,1.0,"",""),file=f)

def print_xyz(box,coords,file):
print(len(coords),file=f)
print(box[0],box[1],box[2],file=f)
for coord in coords:
print("type ",coord[0],coord[1],coord[2],file=f)

coords=[]


box=[11,11,11]

for i in range(-20,21):
if i%2==0: j=i
else: j=-i
coords.append([j,0.0,0.0])
for i in range(-20,21):
if i%2==0: j=i
else: j=-i
coords.append([0.0,j,0.0])
for i in range(-20,21):
if i%2==0: j=i
else: j=-i
coords.append([0.0,0.0,j])

with open("ref.pdb","w") as f:
print_pdb(coords,f)


with open("traj.xyz","w") as f:
print_xyz(box,coords,f)
for i in range(len(coords)):
coords[i][0]+=box[0]*(i%3)
print_xyz(box,coords,f)


24 changes: 24 additions & 0 deletions regtest/basic/rt-emst/plumed.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
UNITS LENGTH=A

# this will incorrectly reconstruct PBC, and return !=0
r1: RMSD REFERENCE=ref.pdb

# this is zero in first frame, but non zero in subsequent (shifted) frames
r2: RMSD REFERENCE=ref.pdb NOPBC

WHOLEMOLECULES ENTITY0=1-123
DUMPATOMS ATOMS=1-123 FILE=wrong.xyz PRECISION=3
# these are always non zero, as PBC are wrong here
r3: RMSD REFERENCE=ref.pdb
r4: RMSD REFERENCE=ref.pdb NOPBC

MOLINFO STRUCTURE=ref.pdb WHOLE
WHOLEMOLECULES ENTITY0=1-123 EMST
DUMPATOMS ATOMS=1-123 FILE=right.xyz PRECISION=3
# this is non zero (incorrectly reconstructed)
r5: RMSD REFERENCE=ref.pdb
# finally, this is always zero
r6: RMSD REFERENCE=ref.pdb NOPBC


PRINT ARG=(r.) FILE=COLVAR
123 changes: 123 additions & 0 deletions regtest/basic/rt-emst/ref.pdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
ATOM 1 type 1 -20.000 0.000 0.000 1.00 1.00
ATOM 2 type 1 19.000 0.000 0.000 1.00 1.00
ATOM 3 type 1 -18.000 0.000 0.000 1.00 1.00
ATOM 4 type 1 17.000 0.000 0.000 1.00 1.00
ATOM 5 type 1 -16.000 0.000 0.000 1.00 1.00
ATOM 6 type 1 15.000 0.000 0.000 1.00 1.00
ATOM 7 type 1 -14.000 0.000 0.000 1.00 1.00
ATOM 8 type 1 13.000 0.000 0.000 1.00 1.00
ATOM 9 type 1 -12.000 0.000 0.000 1.00 1.00
ATOM 10 type 1 11.000 0.000 0.000 1.00 1.00
ATOM 11 type 1 -10.000 0.000 0.000 1.00 1.00
ATOM 12 type 1 9.000 0.000 0.000 1.00 1.00
ATOM 13 type 1 -8.000 0.000 0.000 1.00 1.00
ATOM 14 type 1 7.000 0.000 0.000 1.00 1.00
ATOM 15 type 1 -6.000 0.000 0.000 1.00 1.00
ATOM 16 type 1 5.000 0.000 0.000 1.00 1.00
ATOM 17 type 1 -4.000 0.000 0.000 1.00 1.00
ATOM 18 type 1 3.000 0.000 0.000 1.00 1.00
ATOM 19 type 1 -2.000 0.000 0.000 1.00 1.00
ATOM 20 type 1 1.000 0.000 0.000 1.00 1.00
ATOM 21 type 1 0.000 0.000 0.000 1.00 1.00
ATOM 22 type 1 -1.000 0.000 0.000 1.00 1.00
ATOM 23 type 1 2.000 0.000 0.000 1.00 1.00
ATOM 24 type 1 -3.000 0.000 0.000 1.00 1.00
ATOM 25 type 1 4.000 0.000 0.000 1.00 1.00
ATOM 26 type 1 -5.000 0.000 0.000 1.00 1.00
ATOM 27 type 1 6.000 0.000 0.000 1.00 1.00
ATOM 28 type 1 -7.000 0.000 0.000 1.00 1.00
ATOM 29 type 1 8.000 0.000 0.000 1.00 1.00
ATOM 30 type 1 -9.000 0.000 0.000 1.00 1.00
ATOM 31 type 1 10.000 0.000 0.000 1.00 1.00
ATOM 32 type 1 -11.000 0.000 0.000 1.00 1.00
ATOM 33 type 1 12.000 0.000 0.000 1.00 1.00
ATOM 34 type 1 -13.000 0.000 0.000 1.00 1.00
ATOM 35 type 1 14.000 0.000 0.000 1.00 1.00
ATOM 36 type 1 -15.000 0.000 0.000 1.00 1.00
ATOM 37 type 1 16.000 0.000 0.000 1.00 1.00
ATOM 38 type 1 -17.000 0.000 0.000 1.00 1.00
ATOM 39 type 1 18.000 0.000 0.000 1.00 1.00
ATOM 40 type 1 -19.000 0.000 0.000 1.00 1.00
ATOM 41 type 1 20.000 0.000 0.000 1.00 1.00
ATOM 42 type 1 0.000 -20.000 0.000 1.00 1.00
ATOM 43 type 1 0.000 19.000 0.000 1.00 1.00
ATOM 44 type 1 0.000 -18.000 0.000 1.00 1.00
ATOM 45 type 1 0.000 17.000 0.000 1.00 1.00
ATOM 46 type 1 0.000 -16.000 0.000 1.00 1.00
ATOM 47 type 1 0.000 15.000 0.000 1.00 1.00
ATOM 48 type 1 0.000 -14.000 0.000 1.00 1.00
ATOM 49 type 1 0.000 13.000 0.000 1.00 1.00
ATOM 50 type 1 0.000 -12.000 0.000 1.00 1.00
ATOM 51 type 1 0.000 11.000 0.000 1.00 1.00
ATOM 52 type 1 0.000 -10.000 0.000 1.00 1.00
ATOM 53 type 1 0.000 9.000 0.000 1.00 1.00
ATOM 54 type 1 0.000 -8.000 0.000 1.00 1.00
ATOM 55 type 1 0.000 7.000 0.000 1.00 1.00
ATOM 56 type 1 0.000 -6.000 0.000 1.00 1.00
ATOM 57 type 1 0.000 5.000 0.000 1.00 1.00
ATOM 58 type 1 0.000 -4.000 0.000 1.00 1.00
ATOM 59 type 1 0.000 3.000 0.000 1.00 1.00
ATOM 60 type 1 0.000 -2.000 0.000 1.00 1.00
ATOM 61 type 1 0.000 1.000 0.000 1.00 1.00
ATOM 62 type 1 0.000 0.000 0.000 1.00 1.00
ATOM 63 type 1 0.000 -1.000 0.000 1.00 1.00
ATOM 64 type 1 0.000 2.000 0.000 1.00 1.00
ATOM 65 type 1 0.000 -3.000 0.000 1.00 1.00
ATOM 66 type 1 0.000 4.000 0.000 1.00 1.00
ATOM 67 type 1 0.000 -5.000 0.000 1.00 1.00
ATOM 68 type 1 0.000 6.000 0.000 1.00 1.00
ATOM 69 type 1 0.000 -7.000 0.000 1.00 1.00
ATOM 70 type 1 0.000 8.000 0.000 1.00 1.00
ATOM 71 type 1 0.000 -9.000 0.000 1.00 1.00
ATOM 72 type 1 0.000 10.000 0.000 1.00 1.00
ATOM 73 type 1 0.000 -11.000 0.000 1.00 1.00
ATOM 74 type 1 0.000 12.000 0.000 1.00 1.00
ATOM 75 type 1 0.000 -13.000 0.000 1.00 1.00
ATOM 76 type 1 0.000 14.000 0.000 1.00 1.00
ATOM 77 type 1 0.000 -15.000 0.000 1.00 1.00
ATOM 78 type 1 0.000 16.000 0.000 1.00 1.00
ATOM 79 type 1 0.000 -17.000 0.000 1.00 1.00
ATOM 80 type 1 0.000 18.000 0.000 1.00 1.00
ATOM 81 type 1 0.000 -19.000 0.000 1.00 1.00
ATOM 82 type 1 0.000 20.000 0.000 1.00 1.00
ATOM 83 type 1 0.000 0.000 -20.000 1.00 1.00
ATOM 84 type 1 0.000 0.000 19.000 1.00 1.00
ATOM 85 type 1 0.000 0.000 -18.000 1.00 1.00
ATOM 86 type 1 0.000 0.000 17.000 1.00 1.00
ATOM 87 type 1 0.000 0.000 -16.000 1.00 1.00
ATOM 88 type 1 0.000 0.000 15.000 1.00 1.00
ATOM 89 type 1 0.000 0.000 -14.000 1.00 1.00
ATOM 90 type 1 0.000 0.000 13.000 1.00 1.00
ATOM 91 type 1 0.000 0.000 -12.000 1.00 1.00
ATOM 92 type 1 0.000 0.000 11.000 1.00 1.00
ATOM 93 type 1 0.000 0.000 -10.000 1.00 1.00
ATOM 94 type 1 0.000 0.000 9.000 1.00 1.00
ATOM 95 type 1 0.000 0.000 -8.000 1.00 1.00
ATOM 96 type 1 0.000 0.000 7.000 1.00 1.00
ATOM 97 type 1 0.000 0.000 -6.000 1.00 1.00
ATOM 98 type 1 0.000 0.000 5.000 1.00 1.00
ATOM 99 type 1 0.000 0.000 -4.000 1.00 1.00
ATOM 100 type 1 0.000 0.000 3.000 1.00 1.00
ATOM 101 type 1 0.000 0.000 -2.000 1.00 1.00
ATOM 102 type 1 0.000 0.000 1.000 1.00 1.00
ATOM 103 type 1 0.000 0.000 0.000 1.00 1.00
ATOM 104 type 1 0.000 0.000 -1.000 1.00 1.00
ATOM 105 type 1 0.000 0.000 2.000 1.00 1.00
ATOM 106 type 1 0.000 0.000 -3.000 1.00 1.00
ATOM 107 type 1 0.000 0.000 4.000 1.00 1.00
ATOM 108 type 1 0.000 0.000 -5.000 1.00 1.00
ATOM 109 type 1 0.000 0.000 6.000 1.00 1.00
ATOM 110 type 1 0.000 0.000 -7.000 1.00 1.00
ATOM 111 type 1 0.000 0.000 8.000 1.00 1.00
ATOM 112 type 1 0.000 0.000 -9.000 1.00 1.00
ATOM 113 type 1 0.000 0.000 10.000 1.00 1.00
ATOM 114 type 1 0.000 0.000 -11.000 1.00 1.00
ATOM 115 type 1 0.000 0.000 12.000 1.00 1.00
ATOM 116 type 1 0.000 0.000 -13.000 1.00 1.00
ATOM 117 type 1 0.000 0.000 14.000 1.00 1.00
ATOM 118 type 1 0.000 0.000 -15.000 1.00 1.00
ATOM 119 type 1 0.000 0.000 16.000 1.00 1.00
ATOM 120 type 1 0.000 0.000 -17.000 1.00 1.00
ATOM 121 type 1 0.000 0.000 18.000 1.00 1.00
ATOM 122 type 1 0.000 0.000 -19.000 1.00 1.00
ATOM 123 type 1 0.000 0.000 20.000 1.00 1.00
Loading

1 comment on commit 9ff970d

@PlumedBot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found broken examples in automatic/a-masterclass-22-09.txt
Found broken examples in automatic/a-masterclass-22-11.txt
Found broken examples in automatic/a-masterclass-22-12.txt
Found broken examples in automatic/performance-optimization.txt
Found broken examples in automatic/a-trieste-6.txt
Found broken examples in automatic/munster.txt
Found broken examples in automatic/ANN.tmp
Found broken examples in automatic/EDS.tmp
Found broken examples in automatic/EMMI.tmp
Found broken examples in automatic/ENVIRONMENTSIMILARITY.tmp
Found broken examples in automatic/FOURIER_TRANSFORM.tmp
Found broken examples in automatic/FUNCPATHGENERAL.tmp
Found broken examples in automatic/FUNCPATHMSD.tmp
Found broken examples in automatic/FUNNEL.tmp
Found broken examples in automatic/FUNNEL_PS.tmp
Found broken examples in automatic/GHBFIX.tmp
Found broken examples in automatic/INCLUDE.tmp
Found broken examples in automatic/MAZE_OPTIMIZER_BIAS.tmp
Found broken examples in automatic/MAZE_RANDOM_ACCELERATION_MD.tmp
Found broken examples in automatic/MAZE_SIMULATED_ANNEALING.tmp
Found broken examples in automatic/MAZE_STEERED_MD.tmp
Found broken examples in automatic/PIV.tmp
Found broken examples in automatic/PLUMED.tmp
Found broken examples in MiscelaneousPP.md

Please sign in to comment.