[AMBER] Mass-weighted RMSD one-liner with cpptraj - possible?

From: Martin Mielke <m_mlk.yahoo.com>
Date: Mon, 4 May 2020 15:23:09 +0200

Dear all,

I trust this message will find you well.

I am new to AmberTools so please bear with me if this has already been
discussed here. I searched before sending message but I could not find a
straight answer...

There is a Python script which can be used to calculate the RMSD and it
can be found here
https://github.com/charnley/rmsd/tree/master/rmsd if you are curious.
There is another Windows tool called QMol which also calculates the RMSD.

These are the options I get in my current (latest) calculate_rmsd.py:


martin.rigel:~> calculate_rmsd -v
rmsd 1.3.2

See https://github.com/charnley/rmsd for citation information
martin.rigel:~> calculate_rmsd
usage: calculate_rmsd [options] FILE_A FILE_B

Calculate Root-mean-square deviation (RMSD) between structure A and B,
in XYZ
or PDB format, using transformation and rotation.

For more information, usage, example and citation

positional arguments:
  FILE_A                structures in .xyz or .pdb format

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -r METHOD, --rotation METHOD
                        select rotation method. "kabsch" (default),
"quaternion" or "none"
  -e, --reorder         align the atoms of molecules (default: Hungarian)
  --reorder-method METHOD
                        select which reorder method to use; hungarian
(default), brute, distance
  --use-reflections     scan through reflections in planes (eg Y
transformed to -Y -> X, -Y, Z) and axis changes, (eg
                        X and Z coords exchanged -> Z, Y, X). This will
affect stereo-chemistry.
                        scan through reflections in planes (eg Y
transformed to -Y -> X, -Y, Z) and axis changes, (eg
                        X and Z coords exchanged -> Z, Y, X).
Stereo-chemistry will be kept.
  -nh, --no-hydrogen    ignore hydrogens when calculating RMSD
  --remove-idx IDX [IDX ...]
                        index list of atoms NOT to consider
  --add-idx IDX [IDX ...]
                        index list of atoms to consider
  --format FMT          format of input files. valid format are xyz and pdb
  -p, --output, --print
                        print out structure B, centered and rotated unto
structure A's coordinates in XYZ format

There is an option in QMol to also calculate a mass-weighted RMSD which,
as of this writing, it is not yet present in the Python script mentioned
Because the main idea is to batch-process several PDB files, a script is
preferred over a Windows application.

Compared to QMol, it seems like enabling/disabling such an option it
yields different results.

For example:
Both with calculate_rmsd and QMol with "mass weighting" disabled:
01 vs v2  10.902
v1 vs v3  0.179
v1 vs v4  5.950
v1 vs v5  10.929

With QMol and "mass weighting" enabled:
01 vs v2  10.874 <--- different
v1 vs v3  0.179
v1 vs v4  5.933<--- different
v1 vs v5  10.902 <--- different

A few Google searches later, I found AmberTools, pytraj and, later, its
improved version cpptraj.

It seems like calculating a mass-weighted RMSD is possible too, so I was
wondering if someone would point me to the right direction in telling me
how to use cpptraj in a way that it yields the mass-weighted RMSD for 2
given PDB files? All I want is the final value shown on screen, no graph
files etc needed.

For example:
$ cpptraj [options for mass-weighted RMSD here] file1.pdb file2.pdb [hit

Thank you very much in advance!

Please stay safe and healthy!

Best Regards,


AMBER mailing list
Received on Mon May 04 2020 - 06:30:04 PDT
Custom Search