Skip to content

Commit

Permalink
m3gnet 0.0.6 enables verbosity control
Browse files Browse the repository at this point in the history
  • Loading branch information
sgbaird committed Jun 17, 2022
1 parent 11ed56f commit 1eadcc1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/xtal2png/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

from xtal2png import __version__
from xtal2png.utils.data import dummy_structures, rgb_scaler, rgb_unscaler
from xtal2png.utils.logging_filter import Filter

# from sklearn.preprocessing import MinMaxScaler

Expand Down Expand Up @@ -846,7 +845,6 @@ def arrays_to_structures(

if self.relax_on_decode:
if not self.verbose:
sys.stdout = Filter(sys.stdout, r"^FIRE:| Step Time Energy fmax|\*Force-consistent energies used in optimization.") # type: ignore # noqa: E501
tf.get_logger().setLevel(logging.ERROR)
relaxer = Relaxer() # This loads the default pre-trained model

Expand All @@ -872,7 +870,8 @@ def arrays_to_structures(

# REVIEW: round fractional coordinates to nearest multiple?
if self.relax_on_decode:
structure = relaxer.relax(structure)["final_structure"]
relaxed_results = relaxer.relax(structure, verbose=self.verbose)
structure = relaxed_results["final_structure"]

# relax_results = relaxer.relax()
# final_structure = relax_results["final_structure"]
Expand Down

0 comments on commit 1eadcc1

Please sign in to comment.