# merge solute, ions, solvent together
# author: mengen
#
# usage: ./modar step4_merge_all.inp
#
#load force field
include "loadff.inc"
#load solute with contour ions
loadmsf file="step3_with_ions.msf"
#load water box by appending
loadmsf file="step2_solvbox.msf" append=true
#load PBC crystal setup
include "pbc.inc"
#remove overlaping waters
defcls name=solute select="heavyatom && ! resn TIP*"
delete atom select=".byres. ( around solute cut 2.8 && type O* )"
#resort sequence
atom resortseq start=1 select="resn tip*"
#tell center select=all
#tell size select=all
tell msf_info
echo -hs "| "
echo -hs "| Summary of MD system:"
echo -hs "| number of segments: $nseg"
echo -hs "| number of residues: $nres"
echo -hs "| number of atoms: $natom"
echo -hs "| number of bonds: $nbond"
echo -hs "| number of angles: $nangl"
echo -hs "| number of dihedrals: $ndihe"
echo -hs "| number of impropers: $nimpr"
echo -hs "| number of cross terms: $ncmap"
echo -hs "| net charge: $netcharge"
echo -hs "| total mass: $totmass"
tell boxsize
echo -hs "| PBC box: $boxtype, $boxa x $boxb x $boxc"
echo -hs "| "
#checkmsf
checkmsf
#remove fixes if have
atom fix select="none"
savemsf file="step4_all.msf"
savepdb fmt=pdb file="step4_all.pdb"
echo -hs "| output files:"
echo -hs "| step4_all.msf"
echo -hs "| step4_all.pdb"
echo -hs "| "
echo -hs "| it's time to check the whole MD system by Movar or VMD"
echo -hs "| it's ready to go next step to do minimization: "
echo -hs "| ./modar -nobak step5_do_minimization.inp"
echo -hs "| " |