openforcefield / openff-sage

Scripts, inputs and the results generated as part of the training the Sage line of OpenFF force fields.
MIT License
20 stars 3 forks source link

Add script to renumber parameter ids #1

Closed SimonBoothroyd closed 3 years ago

SimonBoothroyd commented 3 years ago

Description

This PR adds a new script that will re-number the parameter ids in a force field.

Examples

python ./scripts/renumber-parameters.py -i openff-2.0.0-rc.2.offxml -o openff-2.0.0-rc.3.offxml
python ./scripts/renumber-parameters.py -i openff_unconstrained-2.0.0-rc.2.offxml -o openff_unconstrained-2.0.0-rc.3.offxml

Because openff-2.0.0-*.offxml contains parameters with duplicate ids (e.g. two c1 parameters) due to the addition of TIP3P, the id map should be constructed using openff-1.3.0.offxml:

python ./scripts/renumber-parameters.py -i openff-1.3.0.offxml -o openff-1.3.0-renumbered.offxml
cat id-map.json

Status

SimonBoothroyd commented 3 years ago

@j-wags should be done in a4c2aea

j-wags commented 2 years ago

@SimonBoothroyd Do you recall if we stored the id_map.json artifact anywhere? @ldamore was just looking for it, and I can't find it either. If you still have it handy, could you attach it as an asset to the openff-forcefields 2.0.0 release?

davidlmobley commented 2 years ago

Huh, here's the script, but I thought he'd deposited the file too... https://github.com/openforcefield/openff-sage/blob/main/scripts/renumber-parameters.py

j-wags commented 2 years ago

I can imagine this being a case of Simon asking where the file should go, me saying "oh well there are so many repos with stuff in their git trees, and different stuff in their artifacts, and this is just a metadata update, so let me think about what's the optimal thing to do...", then getting distracted by a fire and never answering him. So there's a good chance it's my fault.

j-wags commented 2 years ago

Ah, Simon indeed HAD sent me this file back in August, and I just never uploaded it. Apologies for losing track of this. I've added the file to the release assets of the openff-forcefields 2.0.0 release.