File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 32
32
from turbomoleio .core .molecule import MoleculeSystem
33
33
from turbomoleio .core .datagroups import DataGroups
34
34
35
+ try :
36
+ from pymatgen .core .periodic_table import DummySpecies
37
+ except ImportError :
38
+ DummySpecies = None
39
+
35
40
36
41
replace_comments_re = re .compile (r"^\s*#.*?$" , flags = re .MULTILINE )
37
42
@@ -460,7 +465,11 @@ def test_to_coord_string(self, molecule):
460
465
def test_dummy_atoms (self , molecule_filepath ):
461
466
ms = MoleculeSystem .from_file (molecule_filepath , fmt = "coord" )
462
467
mol = ms .molecule
463
- assert isinstance (mol [- 1 ].specie , DummySpecie )
468
+ print (mol [- 1 ].specie )
469
+ print (mol [- 1 ].specie .__class__ )
470
+ # Pymatgen's Specie and DummySpecie have been changed to Species and
471
+ # DummySpecies in v2020.10.9. We keep testing both for backward compatibility.
472
+ assert isinstance (mol [- 1 ].specie , (DummySpecies , DummySpecie ))
464
473
assert mol [- 1 ].specie .symbol == "Q"
465
474
466
475
You can’t perform that action at this time.
0 commit comments