Conversation
|
(Noting that the tests involving ANI2x seem a bit flaky) |
Great - I don't have a strong opinion, but I think stick with ANI2x for the moment for consistency |
| return OMMMLPotential(cls.name) | ||
|
|
||
| @staticmethod | ||
| def _check_available() -> None: |
There was a problem hiding this comment.
standardise and move this to superclass
There was a problem hiding this comment.
I've added _check_available to the superclass. I've not made it an abstract method, rather left it empty in the superclass so that MLPs like ANI2x which are always available don't have to define the method.
fegrow/mlp.py
Outdated
| _check_mace_installed() | ||
|
|
||
|
|
||
| _MLFF_NAME_TO_CLASS: dict[AVAILABLE_ML_FORCE_FIELDS, type[_MLForceField]] = { |
There was a problem hiding this comment.
similarly, nice functionality, no need for _, we'd want other to use this interface if they want to, also maybe MLFF_CLASS, so you can say MLFF_CLASS['ani2x']
There was a problem hiding this comment.
I've renamed to AVAILABLE_ML_FORCE_FIELD_CLASSES to be as explicit as possible -- please also comment below.
fegrow/mlp.py
Outdated
| "eb1037d48712462e4ce61c1518f/compiled_models/EGRET_1.model" | ||
| ) | ||
|
|
||
| AVAILABLE_ML_FORCE_FIELDS = Literal[ |
There was a problem hiding this comment.
Literal is not very extendable, but I guess for now we're not autodetecting available MLP classes
There was a problem hiding this comment.
maybe Enum so you can later say mlp in AVAILABLE_ML_FORCE_FIELDS
There was a problem hiding this comment.
Thanks. The case for having a literal is that this makes type hinting much easier without forcing the user to supply enums as arguments everywhere, but I think my original naming was misleading. I've renamed the Literal to MLForceFieldName and changed _MLFF_NAME_TO_CLASS to AVAILABLE_ML_FORCE_FIELD_CLASSES so the user can now run mlp in AVAILABLE_ML_FORCE_FIELD_CLASSES. Let me know if that's a reasonable solution
|
Nice job, I am happy with everything here, the comments are optional, thanks |
|
Thanks for the review and sorry for the slow response @bieniekmateusz! I've tried to address all of your comments.
An error is now raised, and I've corrected the tests as required -- this seems to have fixed the flaky tests.
I've updated to raise an error if Thanks. |
This resolves #102 by adding support for MACE-OFF models (and Egret-1) through OpenMMML.
I've just noticed that MACE is in fact available through conda forge (https://anaconda.org/conda-forge/pymace/files/manage) so I'll update to use this.
As well as general comments, it would be great to have comments on:
use_anikwarg and replaced with a more generalligand_intramolecular_mlpkwarg. Consistent with this, I've bumped the version to 3.0.0. Is this acceptable or do we want to try and avoid breaking changes? Any suggestions for how to implement these changes if so? Thanksprocesses = False. This results in segfaults as is already warned with ANI2x. Should we directly raise an error if users try to run withprocesses = Falseand an MLP, rather than waiting for them to hit a segfault?Thanks!