Re: [AMBER] {SPAM?} Re: CPPTRAJ, how to write first solvent shell trajectory

From: Matthew Guberman-Pfeffer <matthew.guberman-pfeffer.uconn.edu>
Date: Sat, 9 Apr 2022 21:26:17 -0400

Hi Dan,

Thanks! Your suggestion to use two consecutive closest commands worked perfectly for my purpose.

Best,
Matthew


> On Apr 9, 2022, at 10:33 AM, Daniel Roe <daniel.r.roe.gmail.com> wrote:
>
> *Message sent from a system outside of UConn.*
>
>
> Hi,
>
> On Sat, Apr 9, 2022 at 5:59 AM Matthew Guberman-Pfeffer
> <matthew.guberman-pfeffer.uconn.edu> wrote:
>> I want to write a trajectory where I only retain the WAT and Na+ residues within the first salvation shell.
>
> As you've discovered you cannot do this with a single 'closest'
> command, the reason being that if you have two different types of
> "solvent" molecule and a single target number, the number of atoms
> could change from frame to frame (e.g. 3000 WAT plus 412 Na+ is a
> different number of atoms than 3200 WAT and 212 Na+, etc).
>
> You can do something like what you want with separate 'closest'
> commands. You can run one 'watershell' command to see how many waters
> are in the first solvation shell, then a second 'watershell' command
> to do the same for Na+. Then say you want to keep the 3400 closest WAT
> and 12 closest Na+, you can use something like:
>
> # Closest 3400 waters to molecule 1
> closest 3400 ^1
> # Closest 12 Na+ to molecule 1
> closest 12 ^1 solventmask :Na+ parmout closest.parm7
> trajout closest.nc
>
> Hope this helps,
>
> -Dan
>
>> I’ve used the watershell command in CPPTRAJ to figure out that there are 3412 :WAT or :Na+ molecules within 3.4 Å on average.
>> I then tried to use the solvent command and the closest command, but it complained that the solvent (defined as :WAT,Na+) was not all of the same size.
>> I’m now thinking of directly using the strip command, but my understanding is that it will not update a distance-based selection for the solvent on each new frame. Is that right?
>> How can I write a trajectory that retains only the waters and Na+ ions within the first salvation shell?
>>
>> Best,
>> Matthew
>>
>>
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.ambermd.org%2Fmailman%2Flistinfo%2Famber&amp;data=04%7C01%7C%7Cc7b865ad19bf4d27234708da1a360f73%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C637851116733286596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=2spVyd2kUECdX%2FHBNDIx7AV2ugX4h0mNKhgtW%2F2PzV8%3D&amp;reserved=0
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.ambermd.org%2Fmailman%2Flistinfo%2Famber&amp;data=04%7C01%7C%7Cc7b865ad19bf4d27234708da1a360f73%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C637851116733286596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=2spVyd2kUECdX%2FHBNDIx7AV2ugX4h0mNKhgtW%2F2PzV8%3D&amp;reserved=0


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sat Apr 09 2022 - 18:30:02 PDT
Custom Search