Skip to content

Commit

Permalink
drop bush and lewis potential
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielYang59 committed Dec 24, 2024
1 parent 2105fca commit 826b9f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 171 deletions.
79 changes: 0 additions & 79 deletions src/pymatgen/command_line/bush.lib

This file was deleted.

11 changes: 5 additions & 6 deletions src/pymatgen/command_line/gulp_caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
__status__ = "Production"
__date__ = "Jun 22, 2013M"

MODULE_DIR = os.path.dirname(os.path.abspath(__file__))

_anions = set(map(Element, ["O", "S", "F", "Cl", "Br", "N", "P"]))
_cations = set(
map(
Expand Down Expand Up @@ -645,7 +643,7 @@ def __str__(self):


class BuckinghamPotential:
"""Generate the Buckingham Potential Table from the bush.lib and lewis.lib.
"""Generate the Buckingham Potential Table from the bush.lib or lewis.lib.
Ref:
T.S.Bush, J.D.Gale, C.R.A.Catlow and P.D. Battle, J. Mater Chem.,
Expand All @@ -654,15 +652,16 @@ class BuckinghamPotential:
1149-1161 (1985)
"""

def __init__(self, bush_lewis_flag):
def __init__(self, bush_lewis_flag, pot_file):
"""
Args:
bush_lewis_flag (str): Flag for using Bush or Lewis potential.
pot_file: The potential file, either bush.lib or lewis.lib.
"""
if bush_lewis_flag not in {"bush", "lewis"}:
raise ValueError(f"bush_lewis_flag should be bush or lewis, got {bush_lewis_flag}")
pot_file = "bush.lib" if bush_lewis_flag == "bush" else "lewis.lib"
with open(os.path.join(os.environ["GULP_LIB"], pot_file)) as file:

with open(pot_file) as file:
# In lewis.lib there is no shell for cation
species_dict, pot_dict, spring_dict = {}, {}, {}
sp_flg, pot_flg, spring_flg = False, False, False
Expand Down
86 changes: 0 additions & 86 deletions src/pymatgen/command_line/lewis.lib

This file was deleted.

0 comments on commit 826b9f4

Please sign in to comment.