mosdef-hub / foyer

A package for atom-typing as well as applying and disseminating forcefields
https://foyer.mosdef.org
MIT License
119 stars 77 forks source link

GetParameters for a specific Force in Foyer ForceField #381

Closed umesh-timalsina closed 3 years ago

umesh-timalsina commented 3 years ago

Describe the behavior you would like added to Foyer While Solving for https://github.com/openforcefield/openff-system/pull/114, we have relied on bunch of internal methods from an OpenMM ForceField, This is not Ideal, as this is assuming that the OpenMM API will be unchanged and always be used with Foyer. However, we might consider an alternative like as suggested by @mattwthompson here. This will be generic for a foyer/gmso forcefield for that matter.

Describe the solution you'd like Something like the following API endpoint for the current version of the Forcefield class.

import foyer

oplsaa = foyer.Forcefield(name="oplsaa")
oplsaa.get_parameters(group="Atoms", key="opls_151")  # arguments should be named differently
# prints something containing values of sigma/espilon/q
oplsaa.get_parameters(group="Bonds", key=["CT", "CT"])
# prints something containing k, length

Describe alternatives you've considered N/A

umesh-timalsina commented 3 years ago

Closed by #382.