Skip to content

Commit

Permalink
corrected cell vector association (with primitive not crystallograpic)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Aug 27, 2018
1 parent df5c4d0 commit 9781949
Show file tree
Hide file tree
Showing 11 changed files with 8,161 additions and 8,143 deletions.
2 changes: 1 addition & 1 deletion ejplugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ def load_all_encoders():
return plugins.load_plugin_classes([Encode_Pymatgen, Encode_ASE])


__version__ = "0.9.5"
__version__ = "0.9.6"
2 changes: 1 addition & 1 deletion ejplugins/crystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def get_geometry(dct, i, line, lines, startline=0):
"b": {"units": "angstrom", "magnitude": split_numbers(lines[i + 3])},
"c": {"units": "angstrom", "magnitude": split_numbers(lines[i + 4])}}

dct["crystallographic_cell"]["cell_vectors"] = vectors
dct["primitive_cell"]["cell_vectors"] = vectors


def read_init(lines, startline):
Expand Down
5 changes: 3 additions & 2 deletions ejplugins/pymatgen_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def from_json(self, obj):
raise ValueError("the module {0} does not have the required class {1}".format(modname, classname))

def to_str(self, obj):
return "SymOp({})".format(
str(obj).replace("\n", " ").replace("Rot: ", "R=").replace(" tau ", ", T=").replace("] [", "],["))
outstr = str(obj).replace("\n", " ").replace("Rot: ", "R=").replace(" tau ", ", T=").replace("] [", "],[")
outstr = outstr.replace(" ", " ").replace("[ ", "[")
return "SymOp({})".format(outstr)

10 changes: 2 additions & 8 deletions ejplugins/schema/crystal_out.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,7 @@
"c"
]
}
},
"required": [
"cell_vectors"
]
}
},
"scf": {
"type": "array",
Expand Down Expand Up @@ -1367,10 +1364,7 @@
"c"
]
}
},
"required": [
"cell_vectors"
]
}
},
"energy": {
"type": "object",
Expand Down
106 changes: 52 additions & 54 deletions ejplugins/test_files/crystal17_spin_opt.crystal.out.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,33 +95,6 @@
true,
true
],
"ccoords": {
"units": "angstrom",
"magnitude": [
[
0.0,
0.0,
0.0
],
[
1.775572805,
1.775572805,
0.0
],
[
-1.110223024625e-16,
1.775572805,
1.393426779074
],
[
1.775572805,
7.885127240037e-16,
-1.393426779074
]
]
}
},
"crystallographic_cell": {
"cell_vectors": {
"a": {
"units": "angstrom",
Expand All @@ -147,8 +120,34 @@
5.35521437
]
}
},
"ccoords": {
"units": "angstrom",
"magnitude": [
[
0.0,
0.0,
0.0
],
[
1.775572805,
1.775572805,
0.0
],
[
-1.110223024625e-16,
1.775572805,
1.393426779074
],
[
1.775572805,
7.885127240037e-16,
-1.393426779074
]
]
}
},
"crystallographic_cell": {},
"scf": [
{
"charge_normalization_factor": 1.0,
Expand Down Expand Up @@ -2516,33 +2515,6 @@
true,
true
],
"ccoords": {
"units": "angstrom",
"magnitude": [
[
0.0,
0.0,
0.0
],
[
1.999303727667,
1.999303727667,
0.0
],
[
-1.250116596416e-16,
1.999303727667,
1.214222603621
],
[
1.999303727667,
8.878692126701e-16,
-1.214222603621
]
]
}
},
"crystallographic_cell": {
"cell_vectors": {
"a": {
"units": "angstrom",
Expand All @@ -2568,8 +2540,34 @@
4.62794929904
]
}
},
"ccoords": {
"units": "angstrom",
"magnitude": [
[
0.0,
0.0,
0.0
],
[
1.999303727667,
1.999303727667,
0.0
],
[
-1.250116596416e-16,
1.999303727667,
1.214222603621
],
[
1.999303727667,
8.878692126701e-16,
-1.214222603621
]
]
}
},
"crystallographic_cell": {},
"band_gaps": {
"alpha": {
"magnitude": 2.4142,
Expand Down
108 changes: 54 additions & 54 deletions ejplugins/test_files/opt_merge_scflog.crystal.out.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,32 @@
true,
true
],
"cell_vectors": {
"a": {
"units": "angstrom",
"magnitude": [
-1.433,
1.433,
1.433
]
},
"b": {
"units": "angstrom",
"magnitude": [
1.433,
-1.433,
1.433
]
},
"c": {
"units": "angstrom",
"magnitude": [
1.433,
1.433,
-1.433
]
}
},
"ccoords": {
"units": "angstrom",
"magnitude": [
Expand Down Expand Up @@ -130,33 +156,7 @@
true,
true,
true
],
"cell_vectors": {
"a": {
"units": "angstrom",
"magnitude": [
-1.433,
1.433,
1.433
]
},
"b": {
"units": "angstrom",
"magnitude": [
1.433,
-1.433,
1.433
]
},
"c": {
"units": "angstrom",
"magnitude": [
1.433,
1.433,
-1.433
]
}
}
]
},
"scf": [
{
Expand Down Expand Up @@ -10252,6 +10252,32 @@
true,
true
],
"cell_vectors": {
"a": {
"units": "angstrom",
"magnitude": [
-1.39664802344,
1.39664802344,
1.39664802344
]
},
"b": {
"units": "angstrom",
"magnitude": [
1.39664802344,
-1.39664802344,
1.39664802344
]
},
"c": {
"units": "angstrom",
"magnitude": [
1.39664802344,
1.39664802344,
-1.39664802344
]
}
},
"ccoords": {
"units": "angstrom",
"magnitude": [
Expand Down Expand Up @@ -10313,33 +10339,7 @@
true,
true,
true
],
"cell_vectors": {
"a": {
"units": "angstrom",
"magnitude": [
-1.39664802344,
1.39664802344,
1.39664802344
]
},
"b": {
"units": "angstrom",
"magnitude": [
1.39664802344,
-1.39664802344,
1.39664802344
]
},
"c": {
"units": "angstrom",
"magnitude": [
1.39664802344,
1.39664802344,
-1.39664802344
]
}
}
]
},
"energy": {
"total_corrected": {
Expand Down
Loading

0 comments on commit 9781949

Please sign in to comment.