Skip to content

Commit

Permalink
Merge pull request #358 from deepmodeling/devel
Browse files Browse the repository at this point in the history
Solve the comparability issue of the pymatgen v2022.0.*
  • Loading branch information
amcadmus authored Mar 24, 2021
2 parents 769ccf4 + f0963ef commit b4e7264
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dpgen/auto_test/mpdb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from dpgen import dlog
from pymatgen import MPRester,Structure
from pymatgen.ext.matproj import MPRestError
from pymatgen.ext.matproj import MPRester, MPRestError
from pymatgen.core import Structure

web="materials.org"

Expand Down
2 changes: 1 addition & 1 deletion dpgen/data/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import dpgen.data.tools.diamond as diamond
import dpgen.data.tools.sc as sc
from dpgen.generator.lib.vasp import incar_upper
from pymatgen import Structure
from pymatgen.core import Structure
from pymatgen.io.vasp import Incar
from dpgen.remote.decide_machine import decide_fp_machine
from dpgen import ROOT_PATH
Expand Down
2 changes: 1 addition & 1 deletion dpgen/data/surf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from dpgen.dispatcher.Dispatcher import Dispatcher, make_dispatcher
#-----PMG---------
from pymatgen.io.vasp import Poscar
from pymatgen import Structure,Element
from pymatgen.core import Structure, Element
from pymatgen.io.ase import AseAtomsAdaptor
#-----ASE-------
from ase.io import read
Expand Down
2 changes: 1 addition & 1 deletion dpgen/dispatcher/LSF.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def check_status(self):
except:
return JobStatus.terminated
if job_id == "" :
raise RuntimeError("job %s is has not been submitted" % self.remote_root)
raise RuntimeError("job %s has not been submitted" % self.context.remote_root)
ret, stdin, stdout, stderr\
= self.context.block_call ("bjobs " + job_id)
err_str = stderr.read().decode('utf-8')
Expand Down
2 changes: 1 addition & 1 deletion tests/auto_test/test_elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import dpdata
from monty.serialization import loadfn, dumpfn
from pymatgen.analysis.elasticity.strain import Strain, Deformation
from pymatgen import Structure
from pymatgen.core import Structure
from pymatgen.io.vasp import Incar

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
Expand Down
2 changes: 1 addition & 1 deletion tests/auto_test/test_mpdb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import sys
import unittest
from pymatgen import Structure
from pymatgen.core import Structure
from pymatgen.analysis.structure_matcher import StructureMatcher
from monty.serialization import loadfn,dumpfn

Expand Down
2 changes: 1 addition & 1 deletion tests/auto_test/test_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import unittest
import dpdata
from monty.serialization import loadfn, dumpfn
from pymatgen import Structure
from pymatgen.core import Structure
from pymatgen.io.vasp import Incar
from pymatgen.core.surface import SlabGenerator

Expand Down
2 changes: 1 addition & 1 deletion tests/auto_test/test_vacancy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import unittest
import dpdata
from monty.serialization import loadfn, dumpfn
from pymatgen import Structure
from pymatgen.core import Structure
from pymatgen.io.vasp import Incar
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.analysis.defects.core import Vacancy as pmg_Vacancy
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_gen_bulk.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os,sys,json,glob,shutil
import unittest
from pymatgen import Structure,Composition
from pymatgen.core import Structure, Composition

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
__package__ = 'data'
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_gen_surf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os,sys,json,glob,shutil
import unittest
from pymatgen import Structure,Element
from pymatgen.core import Structure, Element

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
__package__ = 'data'
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_gen_surf_poscar.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os,sys,json,glob,shutil
import unittest
from pymatgen import Structure,Element
from pymatgen.core import Structure, Element

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
__package__ = 'data'
Expand Down

0 comments on commit b4e7264

Please sign in to comment.