parm ../../../tip3p/ff12sb/run1/build/noWAt.topo.hmr [traj]

strip :WAT,Na+,Cl-

autoimage origin

trajin ../ctraj.c4
rmsd :1,2&!@H= first

nativecontacts :1@N1,C2,N3,C4,C5,C6,N6,N7,C8,N9 :2@N1,C6,C5,C4,O4,N3,C2,O2 mindist
distance COM :1@N1,C2,H2,N3,C4,C5,C6,N6,H61,H62,N7,C8,H8,N9 :2@N1,C6,H6,C5,H5,C4,O4,N3,H3,C2,O2

vector v_base1 :1@N1,C2,N3,C4,C5,C6,N6,N7,C8,N9 corrplane
vector v_base2 :2@N1,C6,C5,C4,O4,N3,C2,O2 corrplane
vectormath name normalangle vec1 v_base1 vec2 v_base2 dotangle


run

writedata criteria-raw.dat Contacts_00002[mindist] COM normalangle
