Page 1 of 1
Can we give CustomCompoundBondForce a computation cutoff
Posted: Mon Jun 29, 2020 3:07 pm
by luwei0917
Hello,
I want to implement a complex potential for coarse grained simulation.
The potential is a pairwise function, but requires the positions of four atoms.
There is one interaction between each pair of residues. The force is applied to the CB atom of each residues.
the interaction of two CB atoms will be affect the CB of their neighboring residues(neighbor in sequence).
Among all the currently available force template, I think only "CustomCompoundBondForce" can achieve that.
"CustomHbondForce" requires the specification of donor and acceptor, but in my potential, the interacting atoms are the same.
However, the new potential implemented with "CustomCompoundBondForce" would be a bit slow.(n^2).
It will be ideal if we can ignore interaction between those pair that are far away. Like the cutoff in NonBonded forces.
Is there a way to achieve that? thanks.
Re: Can we give CustomCompoundBondForce a computation cutoff
Posted: Mon Jun 29, 2020 3:22 pm
by peastman
Another possibility is CustomManyParticleForce. The best choice really depends on the structure of your interaction. Here are some important factors to consider.
- Is this a bonded or nonbonded force? A bonded force is applied between specific sets of particles that are enumerated in advance. A nonbonded force is applied between arbitrary sets of particles that happen to be close enough together at each moment.
- If it's nonbonded, is it a sum over pairwise terms or a sum over many particle terms? That is, are you adding one energy term for every pair of particles (even if that term also depends on other particles)? Or do you add one term for every unique set of four particles? For the former, the number of terms scales as O(n^2), and for the latter it scales as O(n^4), which usually makes it impractical unless you have a very short cutoff.
The more detail you can provide about the exact form of the interaction the better.
Re: Can we give CustomCompoundBondForce a computation cutoff
Posted: Mon Jun 29, 2020 3:47 pm
by luwei0917
Thanks for the quick reply.
It should be a non-bonded force.
and it is a pairwise term at its core, so it will be n^2. but with some additional information required.
for example, when compute the interaction between residue i and residue j, I want the energy modulated by the distance between the CB of residue i+4 and CB of residue j+4.
Re: Can we give CustomCompoundBondForce a computation cutoff
Posted: Mon Jun 29, 2020 3:50 pm
by peastman
Again, the more detail you can provide the better. You mentioned "the interaction between residue i and residue j". That suggests there's one term for each pair of residues, not one for each pair of atoms? Perhaps this is a coarse grained force field? Can you describe the exact set of terms and give the functional form of each one?
Re: Can we give CustomCompoundBondForce a computation cutoff
Posted: Mon Jun 29, 2020 4:19 pm
by luwei0917
right. It is a coarse grained force field.
Only one term for each pair of residues.
The function will be pairwise between the CB of all residues.(but modulated by the CB of residues near them in sequence)
the term for each pair will be a function depends on r_ij, r_(i+4,j+4) and some parameters where r_ij is the distance between the CB atom of residue i and CB atom of residue j. and r_(I+4,j+4) is the distance between CB of residue i+4 and CB of residue j+4.
so it is a pairwise interaction, but depends on the coordinate of four atoms.
Re: Can we give CustomCompoundBondForce a computation cutoff
Posted: Tue Jun 30, 2020 11:27 am
by peastman
It sounds like CustomHbondForce might be the best choice for this. It's a nonbonded interaction between discrete sites, but allows multiple particles at each site to contribute to the interaction. You can include both a donor and n acceptor on each residue so that every residue will interact with every other. You can use addExclusion() to prevent each donor from interacting with the acceptor on the same residue. Also divide the energy of each interaction by 2, since each residue pair will get included twice (once with the first residue as the donor, and again with the second residue as the donor).
Re: Can we give CustomCompoundBondForce a computation cutoff
Posted: Tue Jun 30, 2020 6:53 pm
by luwei0917
great advice. I didn't realize I could using addExclusion() to prevent the self interaction. I will test it out. Thanks!