Open a ptraj.in
and add the following lines:
trajin rec.all.mdcrd
strip :WAT,Na+,Cl-
trajout rec.mdnw.mdcrd
Now enter ptraj rec.top < ptraj.in
But do you need some waters around your ligand or QMMM region (highly advisable)? No problem! Forget 'strip' and add these lines to your ptraj.in:
solvent byres :WAT
closestwater 20 :464 first (Up to 20 WAT molecules around residue 464 will be preserved)