learningmatter-mit/NeuralForceField

CHGNet wrapper for pretrained models does not load the correct path when NFF is installed using pip

xiaochendu opened this issue · 0 comments

In nff/nn/models/chgnet.py it assumes the pretrained CHGNet models in ./models are installed in addition to ./nff, which is not the case. Currently pip only installs ./nff as a package.

   @classmethod
    def load(cls, model_name: str = "0.3.0", **kwargs) -> CHGNetNFF:
...
        try:
            checkpoint_path = {
                "0.3.0": "../../../models/foundation_models/chgnet/0.3.0/chgnet_0.3.0_e29f68s314m37.pth.tar",
                "0.2.0": "../../..models/foundation_models/chgnet/0.2.0/chgnet_0.2.0_e30f77s348m32.pth.tar",
            }[model_name]
...