Closed sameersaurav closed 1 month ago
As a subclass of openmm.CustomNonbondedForce
, NumberOfContacts
can only deal with individual atoms. You can use CentroidFunction, though. The basic idea is the following:
coordination = cvpack.CentroidFunction(
"1/(1+x^6); x=distance(g1,g2)/threshold",
unit.dimensionless,
[g1, g2, g3, g4, ...],
[[0, 1], [0, 2], [0, 3], ...],
threshold=X*unit.nanometers,
)
Here, g1
, g2
, etc are predefined lists of atom indices. This CV will count the contacts between g1
and all other groups, based on their center-of-mass distances.
Thanks a lot.
With best regards, Sameer
I want to use coordination CV around the center of mass of a group. Is it possible to replace g1 in the "Number of Contacts" CV with the center of mass of g1?
With regards, Sameer