Re: [AMBER] number of waters near a mask (K+) cpptraj

From: Daniel Roe <>
Date: Thu, 13 Jan 2022 08:43:03 -0500


On Thu, Jan 13, 2022 at 1:39 AM Vaibhav Dixit <> wrote:
> I want to find the number of water molecules that are in direct contact
> with the K+ ions in each frame during the simulation. I think this is not

Off the top of my head, I would try either the 'watershell' command
(which will do a simple distance-cutoff-based count of waters near
specified atoms, in this case your ions) or the 'hbond' command
specifying the ions and using the solventdonor/solventacceptor

> nativecontacts name KWAT :K+ :WAT byresidue out KWATcontacts.dat mindist
> maxdist distance 4.0 first map mapout KWATresmap.gnu
> contactpdb KWATcontactmap.pdb series seriesout KWATnativecontacts.dat
> writecontacts KWATwritecontacts.dat
> Mask [:K+] corresponds to 145 atoms.
> Mask [:WAT] corresponds to 0 atoms.

Are you absolutely certain the topology you have has water in it? And
if so, are you sure it's called WAT? I ask because a mask parser
failure would be very unusual. What happens if you just load the
topology and type "resinfo :WAT"? Also, it would be helpful to know
the version of cpptraj you are using.


AMBER mailing list
Received on Thu Jan 13 2022 - 06:00:02 PST
Custom Search