parm ../../../tip3p/ff12sb/run1/build/noWAt.topo.hmr

trajin ../ctraj.c4

reference ../../../A-form.pdb [a-form]

rmsd rms_2_aform :1,2&!@H= ref [a-form] mass 

distance dist_sugar_ox :1@O2' :2@O4' 
distance dist_N3-O5p :1@N3 :1@O5'
distance COM :2@N1,C2,H2,N3,C4,C5,C6,N6,H61,H62,N7,C8,H8,N9 :1@N1,C6,H6,C5,H5,C4,O4,N3,H3,C2,O2

dihedral g1 :1@O5' :1@C5' :1@C4' :1@C3'  type gamma
dihedral d1 :1@C5' :1@C4' :1@C3' :1@O3'  type delta
dihedral e1 :1@C4' :1@C3' :1@O3' :2@P    type epsilon
dihedral z1 :1@C3' :1@O3' :2@P   :2@O5'  type zeta
dihedral c1 :1@O4' :1@C1' :1@N1  :1@C2   type chi

dihedral a2 :1@O3' :2@P   :2@O5' :2@C5'  type alpha
dihedral b2 :2@P   :2@O5' :2@C5' :2@C4'  type beta
dihedral g2 :2@O5' :2@C5' :2@C4' :2@C3'  type gamma
dihedral d2 :2@C5' :2@C4' :2@C3' :2@O3'  type delta
dihedral c2 :2@O4' :2@C1' :2@N9  :2@C4   type chi
run

avg rms_2_aform out avg-rmsd-all.dat
hist rms_2_aform,0,5,0.1 out rmsd-hist.dat name RMSD norm
hist COM,0,10,0.1 out COM-hist.dat name CoM norm
hist dist_sugar_ox,0,10,0.1 out distO2O4-hist.dat norm
hist dist_N3-O5p,0,10,0.1 out distN3-O5p-hist.dat norm
hist rms_2_aform,0,5,0.1 dist_sugar_ox,0,10,0.1 out 2dhist_rms-dist.gnu norm
hist g1,-180,180,1 out dihed_g1-hist.dat name gamma_1 norm
hist d1,-180,180,1 out dihed_d1-hist.dat name delta_1 norm
hist e1,-180,180,1 out dihed_e1-hist.dat name epsilon_1 norm
hist z1,-180,180,1 out dihed_z1-hist.dat name zeta_1 norm
hist c1,-180,180,1 out dihed_c1-hist.dat name chi_1 norm
hist a2,-180,180,1 out dihed_a2-hist.dat name alpha_2 norm
hist b2,-180,180,1 out dihed_b2-hist.dat name beta_2 norm
hist g2,-180,180,1 out dihed_g2-hist.dat name gamma_2 norm
hist d2,-180,180,1 out dihed_d2-hist.dat name delta_2 norm
hist c2,-180,180,1 out dihed_c2-hist.dat name chi_2 norm
