Re: [AMBER] Problem with cpptraj

From: Daniel Roe via AMBER <amber.ambermd.org>
Date: Thu, 16 Oct 2025 21:16:12 -0400

Hi,

On Thu, Oct 16, 2025 at 8:43 PM Osman, Roman via AMBER
<amber.ambermd.org> wrote:
> strip :307-318|!(:1-451.CA,:452.C4,@7090,454.N9) parmout mon_d391_holo_n3.parm7 nobox
>

Wow - that is a wild mask expression :-) At first glance I think the
"454.N9" part might be missing a ':' operator, and is '7090' an atom
name? There might also be other issues. I'll try to give specific
commands below. FYI whenever I want to see what a mask expression will
do I will first use the 'atoms' or 'select' command in cpptraj to see
what is actually selected. For example:

> atoms :TRP.CA,N,C,O
  [atoms :TRP.CA,N,C,O]
16 atoms selected.
#Atom Name #Res Name #Mol Type Charge Mass GBradius El rVDW eVDW
   14 N 2 TRP 1 N -0.4157 14.0100 1.5500 N 1.8240 0.1700
   16 CA 2 TRP 1 CT -0.0275 12.0100 1.7000 C 1.9080 0.1094
   36 C 2 TRP 1 C 0.5973 12.0100 1.7000 C 1.9080 0.0860
   37 O 2 TRP 1 O -0.5679 16.0000 1.5000 O 1.6612 0.2100
   52 N 4 TRP 1 N -0.4157 14.0100 1.5500 N 1.8240 0.1700
   54 CA 4 TRP 1 CT -0.0275 12.0100 1.7000 C 1.9080 0.1094

Because there are so many different things you want to strip, this is
a case where you might want to break it into separate 'strip' and
'keep' commands. I'll try my best to eyeball it but I can't guarantee
results without the topology to test.

# Strip residues 307 to 318
strip :307-318
# Keep the rest of the CA atoms, C4 and 7090 from res 452, and N9 from res 454
keep keepmask :1-451.CA,:452.C4,7090,:454.N9
trajout mon_d391_holo_n3.crd

Hope this helps,

-Dan

>
> trajout mon_d391_holo_n3.crd
>
> The goal is to strip residues 307 to 318 and keep all the rest of the CA atoms and individual atoms as marked.
> A quick calculation gives: 451-12+3= 442 atoms.
> My resulting parm7 has 443 atoms. Examining the parm7 I see an extra atom: (HB in the second row, highlighted in red)
> Is something wrong in my syntax? Or is there a bug in cpptraj?
> Thanks for your help.
>
>
> vi mon_d391_holo_n3.parm7
>
>
> %VERSION VERSION_STAMP = V0001.000 DATE = 10/16/25 20:05:59
>
> %FLAG TITLE
>
> %FORMAT(20a4)
>
> default_name
>
> %FLAG POINTERS
>
> %FORMAT(10I8)
>
> 443 4 0 0 0 0 0 0 0 0
>
> 443 442 0 0 0 0 0 0 61 0
>
> 0 0 0 0 0 0 0 0 2 0
>
> 0
>
> %FLAG ATOM_NAME
>
> %FORMAT(20a4)
>
> CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA
>
> CA CA CA CA CA CA CA CA HB CA CA CA CA CA CA CA CA CA CA CA
>
> CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA
>
> CA CA
>
>
> Roman Osman
>
> Professor
>
> Department of Pharmacological Sciences
>
> Icahn School of Medicine at Mount Sinai
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Oct 16 2025 - 18:30:02 PDT
Custom Search