#!/bin/bash

ptraj_file="tmp.ptraj"
OUT="50ns_5000frames_RMSD"

REF="1XCK_chainA_noWAT.inpcrd"

PRMTOP="1XCK_chainA_noWAT.prmtop"

TRAJIN_PREFIX="500ns_noWAT_5000frames_chain"

DIR="../traj_monomer/"



rm ${ptraj_file}

for index in 1 2 3 4 5 6 7 8 9 10 11 12 13 14;
do
	
        echo 'trajin '${DIR}${TRAJIN_PREFIX}_${index}.nc 1 5000 5 >> ${ptraj_file}
	echo 'reference' ${REF} >> $ptraj_file
        #echo "strip @H*" >> ${ptraj_file}
        echo 'rms reference mass @N,CA,C out '${OUT}_${index}.dat >> $ptraj_file

        ptraj ${PRMTOP} ${ptraj_file}

        rm ${ptraj_file}
done

