Format of OFILE in PCA output

53 views
Skip to first unread message

Luke Lin

unread,
Jun 3, 2018, 12:01:50 AM6/3/18
to PLUMED users
Hi,

I came across one question for the PCA output of OFILE. It seems that the x coordinate starts from column 30, instead of 31 as required in PDB format:

Here is one example of PCA output pca-comp.pdb:

ATOM     2  X    RES     1   -23.615   2.802  -0.228  0.01  0.01

As you can see, the x coordinate starts from column 30 instead of 31. Is that correct?

Thanks,
Luke
 

Giovanni Bussi

unread,
Jun 4, 2018, 9:35:18 AM6/4/18
to plumed...@googlegroups.com
Hi

I think there is a bug at this line:

Can you try if this fixes the problem?

Change this:
ofile.printf("ATOM %4d X RES %4u %8.3f%8.3f%8.3f%6.2f%6.2f\n",
To this:
ofile.printf("ATOM %5d X RES %4u %8.3f%8.3f%8.3f%6.2f%6.2f\n",
Giovanni



--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To post to this group, send email to plumed...@googlegroups.com.
Visit this group at https://groups.google.com/group/plumed-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/plumed-users/4edc20d0-f17d-4596-89ac-71cb464135bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luke Lin

unread,
Jun 10, 2018, 11:42:03 PM6/10/18
to PLUMED users
Hi, 

Thanks. That fixes it. But I think even in the previous case, the PCA calculation should be correct? Because it uses the same format in script to read in and output the PDB?

Best,
Luke

Giovanni Bussi

unread,
Jun 11, 2018, 2:42:21 AM6/11/18
to plumed...@googlegroups.com
Hi,

I am afraid the answer is no. If I look at the current regtests:

output (analysis/rt-pca/pca-comp.pdb.reference)
REMARK TYPE=OPTIMAL
ATOM     1  X    RES     0    -3.002  -0.303   1.042  0.05  0.05
ATOM     2  X    RES     1    -3.375  -0.131   1.046  0.05  0.05

input (mapping/rt-pca/reference.pdb)
ATOM      2  CH3 ACE     1      12.932 -14.718  -6.016  1.00  1.00
ATOM      5  C   ACE     1      21.312  -9.928  -5.946  1.00  1.00
ATOM      9  CA  ALA     2      19.462 -11.088  -8.986  1.00  1.00

Only the latter has the correct format. This means that PCAVARS uses the common PDB reader implemented in PLUMED, that expects the correct columns, whereas PCA writes with the incorrect columns

Giovanni


Giovanni






Luke Lin

unread,
Jun 11, 2018, 9:11:00 PM6/11/18
to PLUMED users
Thanks, Giovanni! It may be too much to ask, but I was using PCARMSD with the PCs calculated from the uncorrected version of Plumed. Do you think the format issue will cause any problem? I am worried about if the reading is incorrect, the X coordinates being read in may lose some minus signs. This is what I observed when I converted the PDBs into Gro files using the Gromacs command trjconv

Thanks,

Luke

Giovanni Bussi

unread,
Jun 12, 2018, 5:27:36 AM6/12/18
to plumed...@googlegroups.com
I am afraid it will affect what you are doing. The best thing that you can do is to try to compute PCARMSD along a trajectory with the wrong pdb and with the right pdb and see if you obtain different values.

Notice that the problem is fixed now (in 2.3/2.4/master branches) so it will be fixed in the forthcoming releases (due in a few days)

Giovanni


Luke Lin

unread,
Jun 21, 2018, 2:19:59 PM6/21/18
to PLUMED users
Thanks, Giovanni. I tested it. It is as what you said. Good to find it out!

Luke
Reply all
Reply to author
Forward
0 new messages