maccallumlab / meld

Modeling with limited data
http://meldmd.org
Other
54 stars 28 forks source link

Revise indexing #117

Closed jlmaccal closed 2 years ago

jlmaccal commented 2 years ago

The current indexing code uses ParmEd and relies on the fact that we have historically used only Amber force fields. With the plan to use Martini in the future, we need to revise the indexing code to be more flexible. The most obvious way to do this is to rely on the OpenMM topology as this contains all of the information needed (atom numbers, names, residue numbers, resnames, etc).

jlmaccal commented 2 years ago

If we look at how a system is currently built, it is here:

https://github.com/maccallumlab/meld/blob/95d50d49102fd95459a69675f52acbfde4733385/meld/system/meld_system.py#L251

The actual MELD system is created here: https://github.com/maccallumlab/meld/blob/95d50d49102fd95459a69675f52acbfde4733385/meld/system/meld_system.py#L53

It takes the top string, mdcrd string, and an indexer as arguments. I think this should be changed to take an OpenMM System object so that there is nothing Amber-related within the MELD system object.

The indexing would then be setup within the MELD system using the topology from OpenMM.

jlmaccal commented 2 years ago

I created a de-parmed-ify branch for this.

jlmaccal commented 2 years ago

I added a bunch of TODOs for stuff that needs to change.