Skip to content

Commit

Permalink
More refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed May 28, 2022
1 parent d8f6d18 commit 6f23d17
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion m3gnet/graph/_compute.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Computing various graph based operations
"""
Expand Down
2 changes: 1 addition & 1 deletion m3gnet/layers/_atom_ref.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
atomic reference. Used for predicting extensive properties.
"""
# -*- coding: utf-8 -*-

import logging
from typing import List, Optional

Expand Down
3 changes: 1 addition & 2 deletions m3gnet/models/_m3gnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
polynomial,
)
from m3gnet.utils import register_plain
from m3gnet.utils.constants import MODEL_NAME

from ._base import GraphModelMixin

Expand All @@ -50,6 +49,7 @@
For example, MP-2021.2.8-EFS denotes a potential trained on Materials Project energies, forces and stresses as of
2021.2.8.
"""
MODEL_NAME = "m3gnet"

MODEL_PATHS = {"MP-2021.2.8-EFS": os.path.join(CWD, "..", "..", "pretrained", "MP-2021.2.8-EFS")}

Expand Down Expand Up @@ -312,7 +312,6 @@ def save(self, dirname: str):
fname = os.path.join(dirname, MODEL_NAME + ".json")
with open(fname, "w") as f:
json.dump(model_serialized, f)
return True

@classmethod
def from_dir(cls, dirname: str, custom_objects: Optional[dict] = None) -> "M3GNet":
Expand Down
3 changes: 1 addition & 2 deletions m3gnet/type.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
"""Define several typing for convenient use"""
"""Define several types for convenient use"""

from typing import Any, Callable, List, Optional, Union

Expand Down
5 changes: 0 additions & 5 deletions m3gnet/utils/constants.py

This file was deleted.

0 comments on commit 6f23d17

Please sign in to comment.