Includes and builds on #49, should only be merged after that one.
This adds some reusable parameters (--mol
and --mapper
), as well as a command that outputs the mol1_to_mol2
mapping dict.
The current usage is only intended to be a starting point, which we can improve later. It looks something like this:
$ openfe atommapping --mol "Cc1ccccc1" --mol "CC1CCCCC1" --mapper LomapAtomMapper
{0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6}
Things that aren't ideal there:
- Takes SMILES strings (and only SMILES for now). That can easily be extended. Currently this is also using an ugly workaround to avoid issue in openfreeenergy/lomap#4.
- There's no way to provide options to mapper. ~I'm not sure that there's an easy way to do that, either.~ [EDIT: I came up with an approach that I think will work, but the question whether it's worth it is still on the table.] Perhaps it would make more sense to load from a serialized network and to find the edge(s?) associated with the two molecules -- in this sense, you'd use it to look at the mapping after it has been generated (but before simulating), instead of generating it before. @richardjgowers, you would have better sense on whether that approach would fit with what was requested.
A few corners are still WIP, but the main ideas are here.
- [x]
MOL
parameter
- [x]
MAPPER
parameter
- [x]
atommapping
command
- [x] Tests for everything
- [x] Docstrings for everything