Re: [AMBER] How to compute pairwise interaction between masks

From: Matthew Guberman-Pfeffer <>
Date: Mon, 13 Sep 2021 05:26:15 -0400

Hello Anselm,

Thanks so much for the suggestion. I didn’t think of the LIE approach; I’ll check it out.

I so far wrote a cpptraj script using the energy function to:
1. Take the energy of the whole system
2. Subtract the energy of region A
3. Subtract the energy of region B
Where B is everything besides region A.
This gives the interaction energy for regions A and B.

I then repeat those three energy commands for a newly loaded topology where the charges and LJ terms for one of the residues in region B have been zeroed.

Finally, I take the difference of these two differences, and call that the contribution of the particular residue to the interaction energy between regions. A and B.

The procedure is rather slow (~6 min per residue), so if the LIE approach is an alternative, that sounds great.
If any one knows tricks with cpptraj to make this procedure more efficient, they are definitely welcomed.


> On Sep 13, 2021, at 5:11 AM, Dr. Anselm Horn <> wrote:
> *Message sent from a system outside of UConn.*
> Dear Mathew,
> maybe the cpptraj-command lie (linear interaction energy) does what you
> want (see p. 703, section 34.11.41 Amber21 manual).
> With lie you can compute the electrostatic and vdW interaction energy
> between two groups of atoms defined by Amber masks. The calculation is
> done in cpptraj and is very fast.
> Alternatively, you maybe could use the cpptra-command energy (see p.
> 689, section 34.11.30 Amber21 manual) to compute the interaction energy
> of your two sets of atoms by hand.
> While I haven't used the energy command so far, I have successfully
> applied the lie feature to compute interaction energies between groups
> of atoms within a system over the course of a trajectory.
> Best,
> Anselm
> On 09/10/2021 11:26 PM, Matthew Guberman-Pfeffer wrote:
>> Dear Amber Community,
>> I want to compute the interaction energy between two masks, not for the atoms within a given mask (i.e. something akin to the PairInteraction feature of NAMD). Is there a way to do this in CPPTRAJ? I’ve looked at the pairwise function, but that feature doesn’t seem to compute the energy between two masks.
>> Best,
>> Matthew
>> _______________________________________________
>> AMBER mailing list
> _______________________________________________
> AMBER mailing list

AMBER mailing list
Received on Mon Sep 13 2021 - 02:30:02 PDT
Custom Search