Skip to content

Commit

Permalink
Fixed warning(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm committed Nov 12, 2024
1 parent f7dc29d commit 88bab89
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 7 deletions.
4 changes: 3 additions & 1 deletion ipi/pes/bath.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import numpy as np

from ipi.utils.messages import verbosity, warning

__DRIVER_NAME__ = "bath"
__DRIVER_CLASS__ = "Harmonic_Bath_explicit"

Expand All @@ -10,7 +12,7 @@ class Harmonic_Bath_explicit(object):
"""Explicit description of an Harmonic bath"""

def __init__(self, nbath, m, eta0, eps1, eps2, deltaQ, w_c, *args, **kwargs):
warnings(
warning(
"THIS PES HAS NOT BEEN TESTED FOLLOWING CONVERSION TO THE NEW PES API.",
verbosity.low,
)
Expand Down
5 changes: 4 additions & 1 deletion ipi/pes/driverdipole.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import json
import numpy as np
import warnings

from ipi.utils.messages import verbosity, warning

import importlib
from .dummy import Dummy_driver

Expand Down Expand Up @@ -135,7 +138,7 @@ class driverdipole_driver(Dummy_driver):
}

def __init__(self, *args, **kwargs):
warnings(
warning(
"THIS PES HAS NOT BEEN TESTED FOLLOWING CONVERSION TO THE NEW PES API.",
verbosity.low,
)
Expand Down
4 changes: 3 additions & 1 deletion ipi/pes/elphmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import sys
from .dummy import Dummy_driver

from ipi.utils.messages import verbosity, warning

__DRIVER_NAME__ = "elphmod"
__DRIVER_CLASS__ = "ModelIIIDriver"

Expand All @@ -16,7 +18,7 @@ class ModelIIIDriver(Dummy_driver):

def check_parameters(self):
"""Check arguments and load driver instance."""
warnings(
warning(
"THIS PES HAS NOT BEEN TESTED FOLLOWING CONVERSION TO THE NEW PES API.",
verbosity.low,
)
Expand Down
4 changes: 3 additions & 1 deletion ipi/pes/mace.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from .ase import ASEDriver

from ipi.utils.messages import verbosity, warning

MACECalculator = None

__DRIVER_NAME__ = "mace"
Expand All @@ -25,7 +27,7 @@ class MACE_driver(ASEDriver):
"""

def __init__(self, template, model, device="cpu", *args, **kwargs):
warnings(
warning(
"THIS PES HAS NOT BEEN TESTED FOLLOWING CONVERSION TO THE NEW PES API.",
verbosity.low,
)
Expand Down
3 changes: 2 additions & 1 deletion ipi/pes/rascal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from ipi.utils.mathtools import det_ut3x3
from ipi.utils.units import unit_to_internal, unit_to_user
from ipi.utils.messages import verbosity, warning

RascalCalc = None

Expand All @@ -29,7 +30,7 @@ class Rascal_driver(Dummy_driver):

def __init__(self, model, template, *args, **kwargs):
global RascalCalc
warnings(
warning(
"THIS PES HAS NOT BEEN TESTED FOLLOWING CONVERSION TO THE NEW PES API.",
verbosity.low,
)
Expand Down
3 changes: 2 additions & 1 deletion ipi/pes/so3lr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
""" An interface for the [SO3LR](https://github.com/general-molecular-simulations/so3lr) calculator """

from .ase import ASEDriver
from ipi.utils.messages import verbosity, warning

So3lrCalculator = None

Expand All @@ -18,7 +19,7 @@ class SO3LR_driver(ASEDriver):
"""

def __init__(self, *args, **kwargs):
warnings(
warning(
"THIS PES HAS NOT BEEN TESTED FOLLOWING CONVERSION TO THE NEW PES API.",
verbosity.low,
)
Expand Down
4 changes: 3 additions & 1 deletion ipi/pes/spline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from scipy import interpolate
import json

from ipi.utils.messages import verbosity, warning

"""Spline driver. This is not a serious interpolation, use it if you know what you are doing. """
factor_coord = 5
mass = 1836
Expand All @@ -21,7 +23,7 @@ class Spline_driver(Dummy_driver):
"""\nspline driver requires specification of filename that contains 5 columns (pos, f1,f2,f3,e) to perform 3x1D spline.\nExample: python driver.py -m spline -u -o <filename>\n"""

def __init__(self, data_file, *args, **kwargs):
warnings(
warning(
"THIS PES HAS NOT BEEN TESTED FOLLOWING CONVERSION TO THE NEW PES API.",
verbosity.low,
)
Expand Down

0 comments on commit 88bab89

Please sign in to comment.