Energy mismatch when identical particles belong to different types
Posted: Fri Sep 15, 2017 12:50 am
Dear all,
Currently I am trying to do something which involves setting many particles to individual types so that each particle can have unique cross-terms with other particles in a system.
However, there seems to be an issue where if I create a type for each particle, even if the cross-terms for these particles are all equal, the energy is different from if I assigned all particles of equal parameters to one type.
In the files here, OpenMM 7.1 is calculating the energy of an input configuration for the case where there are LJ particles of unique parameters "A", "B", and "C". In 3types.py A, B, and C particles are each assigned to one atom type. In Ntypes.py, A, B, and C particles are each assigned to their own type.
Epsilon and sigma parameters are assigned using a customNonbondedForce with mm.Discrete2DFunction. The initial potential energies and potential energies after minimization are very different.
Am I making some mistake? Is there some issue with how Discrete2DFunctions calculate energy?
Thank you for any insight!
Currently I am trying to do something which involves setting many particles to individual types so that each particle can have unique cross-terms with other particles in a system.
However, there seems to be an issue where if I create a type for each particle, even if the cross-terms for these particles are all equal, the energy is different from if I assigned all particles of equal parameters to one type.
In the files here, OpenMM 7.1 is calculating the energy of an input configuration for the case where there are LJ particles of unique parameters "A", "B", and "C". In 3types.py A, B, and C particles are each assigned to one atom type. In Ntypes.py, A, B, and C particles are each assigned to their own type.
Epsilon and sigma parameters are assigned using a customNonbondedForce with mm.Discrete2DFunction. The initial potential energies and potential energies after minimization are very different.
Am I making some mistake? Is there some issue with how Discrete2DFunctions calculate energy?
Thank you for any insight!