Hi OpenMM,
I want to analyze the potential energies due to some atoms in the system but not the rest. As in, if atom A is in the included group, all its interactions are counted toward the energy, including those with atoms B which may not be in the included group. Is there a way to do this without having to go into the internals of OpenMM?
I know there is a way to break down the energy into bonded, angles, etc. is there a way to do what I'm asking? It might involve breaking down the energy by individual bonds, angles, and dihedrals then building up the included group from those. Is there a way to do this?
Thank you!
Dan
get energy of part of the system
- Daniel Konstantinovsky
- Posts: 77
- Joined: Tue Jun 11, 2019 12:21 pm
- Peter Eastman
- Posts: 2588
- Joined: Thu Aug 09, 2007 1:25 pm
Re: get energy of part of the system
It depends on exactly what you want to do.
- Which energy terms do you want to compute?
- What do you want to do with energy terms that involve more than two atoms, such as angles and dihedrals? (If you use implicit solvent or a polarizable force field, even nonbonded terms are multibody.)
- Is there just a single division of atoms you can define in advance, or will you want to compute energies for many different sets of atoms?
- How frequently do you want to compute the energy of the isolated group? There are methods that would be very slow if you need to compute it every step, but fine if you only do it infrequently.
- How many atoms are in the group, and how many in the complete system?
- Which energy terms do you want to compute?
- What do you want to do with energy terms that involve more than two atoms, such as angles and dihedrals? (If you use implicit solvent or a polarizable force field, even nonbonded terms are multibody.)
- Is there just a single division of atoms you can define in advance, or will you want to compute energies for many different sets of atoms?
- How frequently do you want to compute the energy of the isolated group? There are methods that would be very slow if you need to compute it every step, but fine if you only do it infrequently.
- How many atoms are in the group, and how many in the complete system?
- Daniel Konstantinovsky
- Posts: 77
- Joined: Tue Jun 11, 2019 12:21 pm
Re: get energy of part of the system
I want to compute the potential energy due to a subset of water molecules in the system, maybe a couple hundred of them. I wouldn't need to do it at every MD step, just occasionally (this is to calculate thermo quantities so I just need good enough sampling). For one of the things I want to do I can define the group beforehand (just "all the water molecules"). For another type of calculation I would need to redefine the group every time because stuff moves around. The whole system has 1400 water molecules and a small protein.
With bonds and angles, if the atom in the group is in the bond or angle, that energy should be counted I think, although it's just a matter of convention (how I define "the group"). I use a nonpolarizable force field (Amber ff14sb and tip4p-ew).
With bonds and angles, if the atom in the group is in the bond or angle, that energy should be counted I think, although it's just a matter of convention (how I define "the group"). I use a nonpolarizable force field (Amber ff14sb and tip4p-ew).
- Peter Eastman
- Posts: 2588
- Joined: Thu Aug 09, 2007 1:25 pm
Re: get energy of part of the system
A very similar question came up recently on github: https://github.com/openmm/openmm/issues/3746. Would the approach described there work for you?
- Daniel Konstantinovsky
- Posts: 77
- Joined: Tue Jun 11, 2019 12:21 pm
Re: get energy of part of the system
yes, I think so. Thank you!