Hi,
Thanks for the files - I think I see your issue now. The problem is
the order in which you are performing the coordinate stripping and
imaging (this wasn't clear from the original input you posted).
If you strip the coordinates to only CA atoms *before* you image them,
since they are no longer bonded to anything they appear to be separate
molecules to cpptraj. This is reflected in the output from the 'strip'
and 'autoimage' commands:
ACTION SETUP FOR PARM 'topology_beforestrip.prmtop' (3 actions):
0: [strip
!.CA]
Stripping 6177 atoms.
Stripped topology: 431 atoms, 431 res, box: Truncated
octahedron, 431 mol
1: [autoimage]
Original box is truncated octahedron, turning on 'familiar'.
Using first molecule as anchor.
430 molecules are mobile.
If you strip the coordinates *after* you image, you don't have this issue:
ACTION SETUP FOR PARM 'topology_beforestrip.prmtop' (3 actions):
0: [autoimage]
Original box is truncated octahedron, turning on 'familiar'.
Using first molecule as anchor.
0 molecules are mobile.
1: [strip !.CA]
Stripping 6177 atoms.
Stripped topology: 431 atoms, 431 res, box: Truncated
octahedron, 431 mol
So try the following input and see if it works the way you expect:
parm topology_beforestrip.prmtop
trajin example_before_strip.nc
autoimage
strip !.CA
rms first .CA
trajout test.image.beforestrip.pdb
run
Let me know if that helps,
-Dan
PS - The case can be made that internally, cpptraj should keep the
same definition of what a "molecule" is despite bond connectivity.
There are pros and cons either way. I'll have to think carefully about
whether it makes sense to do something like that...
On Mon, Sep 27, 2021 at 10:16 AM Daniel Roe <daniel.r.roe.gmail.com> wrote:
>
> Hi,
>
> Are you certain that the coordinates are actually mixed up? You state
> that X should be about 60 or 70 but don't state why you think this
> should be the case. Keep in mind that you're performing two
> significant modifications of the system (imaging followed by
> translation/rotation via coordinate RMS best-fit) which can result in
> coordinates changing values significantly. Is the resulting structure
> distorted somehow? Are there any other indications that the
> coordinates are in fact wrong?
>
> At this point (absent any other information or evidence) I think I
> need to see the actual files themselves. Please send me off-list the
> topology, the first frame of the trajectory in NetCDF format, and the
> problematic PDB file. Or if the trajectory isn't too big (i.e. on the
> order of a few MB) you can send the whole thing. Also, can you state
> which version of cpptraj you are running? Thanks,
>
> -Dan
>
> On Mon, Sep 27, 2021 at 4:50 AM Annabelle Hartt <ah16287.bristol.ac.uk> wrote:
> >
> > Sorry. I have generated this PDB from the 1st frame of the output trajectory so that I could see what was going on using this:
> > parm <stripped.file>.prmtop
> > trajin <output traj file>.nc 1 1
> > autoimage
> > rms first
> > trajout <pdbfile>.pdb
> > run
> >
> > By the coordinates in the wrong column, I mean that CPPTRAJ seems to somehow be mixing up the X, Y and Z coordinate values and printing the Z-coordinate value in place of X, the X-coordinate in place of Y and Y coordinate in place of Z. If you look at the values in the PDB file for residues 127-131 this is shown as the X should be ~60/70 but instead this is in the place of the Z coordinate.
> >
> > ________________________________
> > From: Daniel Roe <daniel.r.roe.gmail.com>
> > Sent: 24 September 2021 16:20
> > To: AMBER Mailing List <amber.ambermd.org>
> > Subject: Re: [AMBER] Co-ordinates switching in CPPTRAJ output
> >
> > Hi,
> >
> > First, it's not clear what you mean by coordinates being in the wrong
> > column. Also, how are you generating the PDB? There is no PDB output
> > in the cpptraj input you posted as far as I can tell.
> >
> > -Dan
> >
> > On Fri, Sep 24, 2021 at 10:37 AM Annabelle Hartt <ah16287.bristol.ac.uk> wrote:
> > >
> > > Hi,
> > >
> > > I have been trying to run a CPPTRAJ script to generate a trajectory with just CA atoms using the following script:
> > > parm <name>.prmtop
> > > trajin nowaters/<name>_nowaters.nc
> > > autoimage
> > > rms first @CA
> > > average crdset AVG
> > > run
> > > rms ref AVG @CA
> > > # strip and output results.
> > > strip !.CA outprefix CA
> > > trajout CA_traj/<name>_CA.nc
> > > run
> > > clear all
> > >
> > > However this was resulting in output trajectories where the X, Y and Z co-ordinates were sometimes in the wrong column as demonstrated by residues 127-131 in this section of a pdb file :
> > > ATOM 123 CA GLN 123 68.309 29.110 1.473 1.00 0.00 C
> > > ATOM 124 CA LEU 124 66.353 31.970 -0.226 1.00 0.00 C
> > > ATOM 125 CA ARG 125 67.566 34.771 -2.529 1.00 0.00 C
> > > ATOM 126 CA ASP 126 67.312 38.488 -2.652 1.00 0.00 C
> > > ATOM 127 CA SER 127 35.179 -2.383 68.197 1.00 0.00 C
> > > ATOM 128 CA LYS 128 37.592 0.697 68.026 1.00 0.00 C
> > > ATOM 129 CA SER 129 40.316 -1.856 66.986 1.00 0.00 C
> > > ATOM 130 CA SER 130 11.099 79.441 67.583 1.00 0.00 C
> > > ATOM 131 CA ASP 131 14.290 80.687 69.232 1.00 0.00 C
> > > ATOM 132 CA LYS 132 72.574 38.092 -1.012 1.00 0.00 C
> > > ATOM 133 CA SER 133 70.558 35.313 0.680 1.00 0.00 C
> > > ATOM 134 CA VAL 134 68.398 34.435 3.699 1.00 0.00 C
> > >
> > > I have not been able to figure out what has caused this – but thought there may be an issue in CPPTRAJ?
> > >
> > > Many thanks,
> > > Annabelle
> > > _______________________________________________
> > > 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
> > _______________________________________________
> > 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 Mon Sep 27 2021 - 09:00:03 PDT