diff --git a/matgendb/query_engine.py b/matgendb/query_engine.py index f95e1ffc..4b28cce0 100644 --- a/matgendb/query_engine.py +++ b/matgendb/query_engine.py @@ -634,19 +634,23 @@ def _mapped_result(self, r): # Map aliased keys back to original key for k, v in self._prop_dict.items(): try: - data = r[v[0]] - for j in range(1, len(v)): - if isinstance(data, list): - data = [d[v[j]] for d in data] - else: - data = data[v[j]] - result[k] = data + result[k] = self._mapped_result_path(v[1:], data=r[v[0]]) except (IndexError, KeyError, ValueError): result[k] = None - - return result + @staticmethod + def _mapped_result_path(path, data=None): + if not path: + return data + if isinstance(data, list): + return [QueryResults._mapped_result_path(path, d) for d in data] + else: + try: + return QueryResults._mapped_result_path(path[1:], data[path[0]]) + except (IndexError, KeyError, ValueError): + return None + def _result_generator(self): for r in self._results: yield self._mapped_result(r) diff --git a/matgendb/tests/common.py b/matgendb/tests/common.py index 4f4969f4..5676d54b 100644 --- a/matgendb/tests/common.py +++ b/matgendb/tests/common.py @@ -22,6 +22,11 @@ _log = logging.getLogger('matgendb.tests') +TEST_FILES_DIR = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), + "test_files") + + def has_mongo(): """Determine if MongoDB is up and usable """ diff --git a/matgendb/tests/test_queryresults.py b/matgendb/tests/test_queryresults.py new file mode 100644 index 00000000..ac5ac343 --- /dev/null +++ b/matgendb/tests/test_queryresults.py @@ -0,0 +1,62 @@ +import os +import uuid +import unittest + +import bson +import pymongo + +from matgendb.query_engine import QueryEngine, QueryResults +from matgendb.tests import common + +has_mongo = common.has_mongo() + + +class QueryResultsTest(unittest.TestCase): + def setUp(self): + if has_mongo: + self.conn = pymongo.MongoClient() + self.db_name = 'test' + self.db = self.conn[self.db_name] + self.coll_name = 'tasks_{}'.format(uuid.uuid4()) + self.coll = self.db[self.coll_name] + with open(os.path.join(common.TEST_FILES_DIR, 'db_test', 'GaLa.task.json')) as f: + doc = bson.json_util.loads(f.read()) + self.coll.insert(doc) + + def tearDown(self): + if has_mongo: + self.db.drop_collection(self.coll_name) + + @unittest.skipUnless(has_mongo, 'requires MongoDB server') + def test_queryresult(self): + qe = QueryEngine( + connection=self.conn, + database=self.db_name, + collection=self.coll_name, + ) + result = qe.query( + criteria={'task_id': 'mp-1002133'}, + properties=[ + 'calcs_reversed.output.ionic_steps.e_0_energy', + 'calcs_reversed.output.ionic_steps.electronic_steps.e_0_energy', + ], + ) + self.assertTrue(isinstance(result, QueryResults)) + print(list(qe.query(criteria={'task_id': 'mp-1002133'}))) + self.assertEqual(len(result), 1) + doc = list(result)[0] + self.assertIn('calcs_reversed.output.ionic_steps.e_0_energy', doc) + v = doc['calcs_reversed.output.ionic_steps.e_0_energy'] + self.assertIsInstance(v, list) + for elt in v: + self.assertIsInstance(elt, list) + for n in elt: + self.assertIsInstance(n, float) + self.assertIn('calcs_reversed.output.ionic_steps.electronic_steps.e_0_energy', doc) + v = doc['calcs_reversed.output.ionic_steps.electronic_steps.e_0_energy'] + for elt in v: + self.assertIsInstance(elt, list) + for _elt in elt: + self.assertIsInstance(_elt, list) + for n in _elt: + self.assertIsInstance(n, float) diff --git a/test_files/db_test/GaLa.task.json b/test_files/db_test/GaLa.task.json new file mode 100644 index 00000000..af0b08b7 --- /dev/null +++ b/test_files/db_test/GaLa.task.json @@ -0,0 +1,2017 @@ +{ + "_id": { + "$oid": "5980fbb8bfaecfc63a0a7a17" + }, + "calcs_reversed": [ + { + "output": { + "ionic_steps": [ + { + "e_fr_energy": -18.30112946, + "e_wo_entrp": -18.29851525, + "e_0_energy": -0.00522842, + "forces": [ + [ + 0.0, + 0.04814989, + 0.0 + ], + [ + -0.0, + -0.04814989, + 0.0 + ], + [ + 0.0, + 0.01870599, + 0.0 + ], + [ + 0.0, + -0.01870599, + 0.0 + ] + ], + "stress": [ + [ + -1.37765423, + 0.0, + 0.0 + ], + [ + 0.0, + 0.90903779, + 0.0 + ], + [ + 0.0, + 0.0, + 2.00113106 + ] + ], + "electronic_steps": [ + { + "alphaZ": 224.82880801, + "ewald": -3781.78831782, + "hartreedc": -1617.6790239, + "XCdc": 185.71488021, + "pawpsdc": 3928.87634284, + "pawaedc": -4639.90947714, + "eentropy": -0.00690662, + "bandstr": 145.75535661, + "atom": 6028.55692818, + "e_fr_energy": 474.34859035, + "e_wo_entrp": 474.35549697, + "e_0_energy": 474.35204366 + }, + { + "e_fr_energy": 67.23759672, + "e_wo_entrp": 67.23862029, + "e_0_energy": 67.23810851 + }, + { + "e_fr_energy": -11.18196357, + "e_wo_entrp": -11.18064393, + "e_0_energy": -11.18130375 + }, + { + "e_fr_energy": -17.43952453, + "e_wo_entrp": -17.43495326, + "e_0_energy": -17.4372389 + }, + { + "e_fr_energy": -18.17293917, + "e_wo_entrp": -18.16771949, + "e_0_energy": -18.17032933 + }, + { + "e_fr_energy": -18.28268013, + "e_wo_entrp": -18.2773891, + "e_0_energy": -18.28003461 + }, + { + "e_fr_energy": -18.29851247, + "e_wo_entrp": -18.293297, + "e_0_energy": -18.29590473 + }, + { + "e_fr_energy": -18.30097759, + "e_wo_entrp": -18.29575427, + "e_0_energy": -18.29836593 + }, + { + "e_fr_energy": -18.3012034, + "e_wo_entrp": -18.29597567, + "e_0_energy": -18.29858953 + }, + { + "alphaZ": 224.82880801, + "ewald": -3781.78831782, + "hartreedc": -1617.61495901, + "XCdc": 185.7291822, + "pawpsdc": 3928.49931727, + "pawaedc": -4639.61203633, + "eentropy": -0.00522842, + "bandstr": -346.89482354, + "atom": 6028.55692818, + "e_fr_energy": -18.30112946, + "e_wo_entrp": -18.29590104, + "e_0_energy": -18.29851525 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.23839358 + ], + [ + 4.60174398, + 0.0, + 0.0 + ], + [ + -2.30087199, + 5.77630373, + 0.0 + ] + ], + "a": 4.23839358, + "b": 4.60174398, + "c": 6.217692232297967, + "alpha": 111.7188495275951, + "beta": 90.0, + "gamma": 90.0, + "volume": 112.66104032065802 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.13970177, + 0.27940353 + ], + "xyz": [ + 2.3008719929329402e-08, + 1.613919652514167, + 1.059598395 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.86029823, + 0.72059647 + ], + "xyz": [ + 2.3008719669912803, + 4.162384077485834, + 3.1787951850000002 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.43150571, + 0.86301143 + ], + "xyz": [ + -2.3008720040351704e-08, + 4.985016142141634, + 1.059598395 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.56849429, + 0.13698857 + ], + "xyz": [ + 2.30087201300872, + 0.7912875878583662, + 3.1787951850000002 + ], + "label": "Ga" + } + ] + } + } + ] + } + }, + { + "output": { + "ionic_steps": [ + { + "e_fr_energy": -18.2396826, + "e_wo_entrp": -18.2370792, + "e_0_energy": -0.00520679, + "forces": [ + [ + 0.0, + 0.21420502, + 0.0 + ], + [ + -0.0, + -0.21420502, + 0.0 + ], + [ + 0.0, + 0.43024413, + 0.0 + ], + [ + -0.0, + -0.43024413, + 0.0 + ] + ], + "stress": [ + [ + 23.5585613, + 0.0, + 0.0 + ], + [ + 0.0, + 3.39167528, + 0.0 + ], + [ + 0.0, + 0.0, + 8.13856757 + ] + ], + "electronic_steps": [ + { + "alphaZ": 227.13424711, + "ewald": -3813.89016011, + "hartreedc": -1605.8459688, + "XCdc": 186.49555055, + "pawpsdc": 3793.40956629, + "pawaedc": -4498.36157787, + "eentropy": -0.00636933, + "bandstr": 158.53729264, + "atom": 6028.55692818, + "e_fr_energy": 476.02950866, + "e_wo_entrp": 476.03587799, + "e_0_energy": 476.03269332 + }, + { + "e_fr_energy": 70.91195147, + "e_wo_entrp": 70.91376134, + "e_0_energy": 70.9128564 + }, + { + "e_fr_energy": -10.89290431, + "e_wo_entrp": -10.89142757, + "e_0_energy": -10.89216594 + }, + { + "e_fr_energy": -17.47975114, + "e_wo_entrp": -17.47718527, + "e_0_energy": -17.4784682 + }, + { + "e_fr_energy": -18.26044191, + "e_wo_entrp": -18.2570055, + "e_0_energy": -18.25872371 + }, + { + "e_fr_energy": -18.19390534, + "e_wo_entrp": -18.18946586, + "e_0_energy": -18.1916856 + }, + { + "e_fr_energy": -18.24028793, + "e_wo_entrp": -18.23521357, + "e_0_energy": -18.23775075 + }, + { + "e_fr_energy": -18.24015624, + "e_wo_entrp": -18.23471229, + "e_0_energy": -18.23743427 + }, + { + "e_fr_energy": -18.23988365, + "e_wo_entrp": -18.23453853, + "e_0_energy": -18.23721109 + }, + { + "e_fr_energy": -18.23968075, + "e_wo_entrp": -18.23439544, + "e_0_energy": -18.2370381 + }, + { + "alphaZ": 227.13424711, + "ewald": -3813.89016011, + "hartreedc": -1592.40721174, + "XCdc": 185.84289047, + "pawpsdc": 3932.17051697, + "pawaedc": -4643.12805317, + "eentropy": -0.00520679, + "bandstr": -342.51363351, + "atom": 6028.55692818, + "e_fr_energy": -18.2396826, + "e_wo_entrp": -18.23447581, + "e_0_energy": -18.2370792 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.2559 + ], + [ + 4.5226, + 0.0, + 0.0 + ], + [ + -2.2613, + 5.7938, + 0.0 + ] + ], + "a": 4.2559, + "b": 4.5226, + "c": 6.21945304106398, + "alpha": 111.32052874475397, + "beta": 90.0, + "gamma": 90.0, + "volume": 111.51751742529198 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.135, + 0.27 + ], + "xyz": [ + 0.0, + 1.564326, + 1.063975 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.865, + 0.73 + ], + "xyz": [ + 2.2613, + 4.229474, + 3.1919249999999995 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.425, + 0.85 + ], + "xyz": [ + 0.0, + 4.92473, + 1.063975 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.575, + 0.15 + ], + "xyz": [ + 2.2612999999999994, + 0.86907, + 3.1919249999999995 + ], + "label": "Ga" + } + ] + } + }, + { + "e_fr_energy": -18.270329, + "e_wo_entrp": -18.26793575, + "e_0_energy": -0.00478651, + "forces": [ + [ + -0.0, + 0.11609359, + 0.0 + ], + [ + 0.0, + -0.11609359, + 0.0 + ], + [ + 0.0, + 0.29065431, + 0.0 + ], + [ + -0.0, + -0.29065431, + 0.0 + ] + ], + "stress": [ + [ + -4.87919031, + 0.0, + 0.0 + ], + [ + 0.0, + -9.17660076, + 0.0 + ], + [ + 0.0, + 0.0, + -10.26296424 + ] + ], + "electronic_steps": [ + { + "alphaZ": 220.58996942, + "ewald": -3771.33787248, + "hartreedc": -1582.5256608, + "XCdc": 183.97966006, + "pawpsdc": 3931.67086936, + "pawaedc": -4642.64626236, + "eentropy": -0.00462421, + "bandstr": -386.84728444, + "atom": 6028.55692818, + "e_fr_energy": -18.56427727, + "e_wo_entrp": -18.55965306, + "e_0_energy": -18.56196516 + }, + { + "e_fr_energy": -18.34778973, + "e_wo_entrp": -18.34282503, + "e_0_energy": -18.34530738 + }, + { + "e_fr_energy": -18.27922703, + "e_wo_entrp": -18.27475198, + "e_0_energy": -18.27698951 + }, + { + "e_fr_energy": -18.27329276, + "e_wo_entrp": -18.26863689, + "e_0_energy": -18.27096483 + }, + { + "e_fr_energy": -18.2704786, + "e_wo_entrp": -18.26563002, + "e_0_energy": -18.26805431 + }, + { + "alphaZ": 220.58996942, + "ewald": -3771.33787248, + "hartreedc": -1615.99906074, + "XCdc": 185.5116467, + "pawpsdc": 3919.67124344, + "pawaedc": -4630.564631, + "eentropy": -0.00478651, + "bandstr": -354.69376601, + "atom": 6028.55692818, + "e_fr_energy": -18.270329, + "e_wo_entrp": -18.26554249, + "e_0_energy": -18.26793575 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.28497657 + ], + [ + 4.61204183, + 0.0, + 0.0 + ], + [ + -2.30602091, + 5.81029611, + 0.0 + ] + ], + "a": 4.28497657, + "b": 4.61204183, + "c": 6.251181754135643, + "alpha": 111.64739859452469, + "beta": 90.0, + "gamma": 90.0, + "volume": 114.82592563525539 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.1358918, + 0.2717836 + ], + "xyz": [ + 1.3589179781448024e-09, + 1.5791431938417961, + 1.0712441425 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.8641082, + 0.7282164 + ], + "xyz": [ + 2.3060209186410816, + 4.231152916158204, + 3.2137324275 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.42679124, + 0.85358247 + ], + "xyz": [ + 2.7328121543490624e-08, + 4.959566905005192, + 1.0712441425 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.57320876, + 0.14641753 + ], + "xyz": [ + 2.3060208926718784, + 0.8507292049948083, + 3.2137324275 + ], + "label": "Ga" + } + ] + } + }, + { + "e_fr_energy": -18.27035119, + "e_wo_entrp": -18.26796403, + "e_0_energy": -0.00477432, + "forces": [ + [ + 0.0, + 0.09403447, + 0.0 + ], + [ + 0.0, + -0.09403447, + 0.0 + ], + [ + -0.0, + 0.23367653, + 0.0 + ], + [ + 0.0, + -0.23367653, + 0.0 + ] + ], + "stress": [ + [ + -3.08270877, + 0.0, + 0.0 + ], + [ + 0.0, + -8.35209822, + 0.0 + ], + [ + 0.0, + 0.0, + -8.94254165 + ] + ], + "electronic_steps": [ + { + "alphaZ": 220.51880188, + "ewald": -3770.86835484, + "hartreedc": -1615.99016497, + "XCdc": 185.49915241, + "pawpsdc": 3919.45178787, + "pawaedc": -4630.29230576, + "eentropy": -0.00476134, + "bandstr": -355.14146633, + "atom": 6028.55692818, + "e_fr_energy": -18.27038291, + "e_wo_entrp": -18.26562157, + "e_0_energy": -18.26800224 + }, + { + "alphaZ": 220.51880188, + "ewald": -3770.86835484, + "hartreedc": -1616.23331456, + "XCdc": 185.51015328, + "pawpsdc": 3919.47313194, + "pawaedc": -4630.38429984, + "eentropy": -0.00477432, + "bandstr": -354.83862289, + "atom": 6028.55692818, + "e_fr_energy": -18.27035119, + "e_wo_entrp": -18.26557687, + "e_0_energy": -18.26796403 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.28529992 + ], + [ + 4.61303649, + 0.0, + 0.0 + ], + [ + -2.30651824, + 5.81047956, + 0.0 + ] + ], + "a": 4.28529992, + "b": 4.61303649, + "c": 6.251535740010649, + "alpha": 111.65101495438259, + "beta": 90.0, + "gamma": 90.0, + "volume": 114.8629829375542 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.13590169, + 0.27180338 + ], + "xyz": [ + 1.3590168990162965e-09, + 1.5793079838289128, + 1.07132498 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.86409831, + 0.72819662 + ], + "xyz": [ + 2.306518248640983, + 4.231171576171087, + 3.21397494 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.4268111, + 0.8536222 + ], + "xyz": [ + 4.268110975758077e-09, + 4.959954345062232, + 1.07132498 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.5731889, + 0.1463778 + ], + "xyz": [ + 2.306518245731889, + 0.850525214937768, + 3.21397494 + ], + "label": "Ga" + } + ] + } + }, + { + "e_fr_energy": -18.28484095, + "e_wo_entrp": -18.28224217, + "e_0_energy": -0.00519758, + "forces": [ + [ + -0.0, + 0.11885395, + 0.0 + ], + [ + 0.0, + -0.11885395, + 0.0 + ], + [ + -0.0, + 0.18106193, + 0.0 + ], + [ + 0.0, + -0.18106193, + -0.0 + ] + ], + "stress": [ + [ + -1.11867647, + 0.0, + 0.0 + ], + [ + 0.0, + -1.42896715, + 0.0 + ], + [ + 0.0, + -0.0, + -2.88226091 + ] + ], + "electronic_steps": [ + { + "alphaZ": 222.80763481, + "ewald": -3778.36116425, + "hartreedc": -1627.28063828, + "XCdc": 186.17988353, + "pawpsdc": 3919.37693593, + "pawaedc": -4630.25976204, + "eentropy": -0.00556872, + "bandstr": -339.33172737, + "atom": 6028.55692818, + "e_fr_energy": -18.31747821, + "e_wo_entrp": -18.31190949, + "e_0_energy": -18.31469385 + }, + { + "e_fr_energy": -18.2978039, + "e_wo_entrp": -18.29260639, + "e_0_energy": -18.29520515 + }, + { + "e_fr_energy": -18.28648784, + "e_wo_entrp": -18.28113807, + "e_0_energy": -18.28381296 + }, + { + "e_fr_energy": -18.28510025, + "e_wo_entrp": -18.27984449, + "e_0_energy": -18.28247237 + }, + { + "e_fr_energy": -18.28487086, + "e_wo_entrp": -18.27967081, + "e_0_energy": -18.28227083 + }, + { + "alphaZ": 222.80763481, + "ewald": -3778.36116425, + "hartreedc": -1615.6133187, + "XCdc": 185.63973655, + "pawpsdc": 3924.27125495, + "pawaedc": -4635.15882109, + "eentropy": -0.00519758, + "bandstr": -350.42189383, + "atom": 6028.55692818, + "e_fr_energy": -18.28484095, + "e_wo_entrp": -18.27964338, + "e_0_energy": -18.28224217 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.25942179 + ], + [ + 4.62355482, + 0.0, + 0.0 + ], + [ + -2.31177741, + 5.77256705, + 0.0 + ] + ], + "a": 4.25942179, + "b": 4.62355482, + "c": 6.2182670528156, + "alpha": 111.82494101497889, + "beta": 90.0, + "gamma": 90.0, + "volume": 113.68303138741695 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.13651557, + 0.27303114 + ], + "xyz": [ + 0.0, + 1.576090562387937, + 1.0648554475 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.86348443, + 0.72696886 + ], + "xyz": [ + 2.3117774099999995, + 4.196476487612063, + 3.1945663425 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.42823052, + 0.85646104 + ], + "xyz": [ + 0.0, + 4.943978779112732, + 1.0648554475 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.57176948, + 0.14353896 + ], + "xyz": [ + 2.3117774100000004, + 0.8285882708872679, + 3.1945663425 + ], + "label": "Ga" + } + ] + } + }, + { + "e_fr_energy": -18.28851747, + "e_wo_entrp": -18.28584256, + "e_0_energy": -0.00534982, + "forces": [ + [ + 0.0, + 0.14043129, + 0.0 + ], + [ + 0.0, + -0.14043129, + 0.0 + ], + [ + 0.0, + 0.12702116, + 0.0 + ], + [ + 0.0, + -0.12702116, + 0.0 + ] + ], + "stress": [ + [ + -0.02556345, + 0.0, + 0.0 + ], + [ + 0.0, + 1.36536564, + 0.0 + ], + [ + 0.0, + 0.0, + -0.07811729 + ] + ], + "electronic_steps": [ + { + "alphaZ": 223.83885616, + "ewald": -3781.64799609, + "hartreedc": -1620.49146757, + "XCdc": 185.93281307, + "pawpsdc": 3924.39359428, + "pawaedc": -4635.31576661, + "eentropy": -0.00551929, + "bandstr": -343.55627079, + "atom": 6028.55692818, + "e_fr_energy": -18.29482867, + "e_wo_entrp": -18.28930938, + "e_0_energy": -18.29206902 + }, + { + "e_fr_energy": -18.29112657, + "e_wo_entrp": -18.28576728, + "e_0_energy": -18.28844693 + }, + { + "e_fr_energy": -18.28886346, + "e_wo_entrp": -18.28344514, + "e_0_energy": -18.2861543 + }, + { + "e_fr_energy": -18.28857668, + "e_wo_entrp": -18.2831975, + "e_0_energy": -18.28588709 + }, + { + "alphaZ": 223.83885616, + "ewald": -3781.64799609, + "hartreedc": -1615.18547152, + "XCdc": 185.68719734, + "pawpsdc": 3926.54019446, + "pawaedc": -4637.4707173, + "eentropy": -0.00534982, + "bandstr": -348.60215887, + "atom": 6028.55692818, + "e_fr_energy": -18.28851747, + "e_wo_entrp": -18.28316765, + "e_0_energy": -18.28584256 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.24791772 + ], + [ + 4.62823072, + 0.0, + 0.0 + ], + [ + -2.31411536, + 5.75571312, + 0.0 + ] + ], + "a": 4.24791772, + "b": 4.62823072, + "c": 6.203496064247004, + "alpha": 111.90285812182428, + "beta": 90.0, + "gamma": 90.0, + "volume": 113.1592958049281 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.13679026, + 0.27358052 + ], + "xyz": [ + 0.0, + 1.5746509883404225, + 1.06197943 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.86320974, + 0.72641948 + ], + "xyz": [ + 2.3141153599999997, + 4.181062131659578, + 3.18593829 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.42886566, + 0.85773132 + ], + "xyz": [ + 0.0, + 4.936855411958918, + 1.06197943 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.57113434, + 0.14226868 + ], + "xyz": [ + 2.3141153599999997, + 0.8188577080410817, + 3.18593829 + ], + "label": "Ga" + } + ] + } + }, + { + "e_fr_energy": -18.29225327, + "e_wo_entrp": -18.28957806, + "e_0_energy": -0.00535043, + "forces": [ + [ + 0.0, + 0.11166138, + 0.0 + ], + [ + 0.0, + -0.11166138, + 0.0 + ], + [ + 0.0, + 0.08244289, + 0.0 + ], + [ + -0.0, + -0.08244289, + 0.0 + ] + ], + "stress": [ + [ + -6.1203954, + 0.0, + 0.0 + ], + [ + 0.0, + 0.24202589, + 0.0 + ], + [ + 0.0, + -0.0, + -4.8298321 + ] + ], + "electronic_steps": [ + { + "alphaZ": 223.58963964, + "ewald": -3778.99599606, + "hartreedc": -1615.74221926, + "XCdc": 185.61037141, + "pawpsdc": 3926.7213569, + "pawaedc": -4637.6857157, + "eentropy": -0.0053412, + "bandstr": -350.33929482, + "atom": 6028.55692818, + "e_fr_energy": -18.29027092, + "e_wo_entrp": -18.28492972, + "e_0_energy": -18.28760032 + }, + { + "e_fr_energy": -18.29236631, + "e_wo_entrp": -18.28697983, + "e_0_energy": -18.28967307 + }, + { + "alphaZ": 223.58963964, + "ewald": -3778.99599606, + "hartreedc": -1616.72531731, + "XCdc": 185.65412142, + "pawpsdc": 3926.72365976, + "pawaedc": -4637.87451106, + "eentropy": -0.00535043, + "bandstr": -349.21542741, + "atom": 6028.55692818, + "e_fr_energy": -18.29225327, + "e_wo_entrp": -18.28690285, + "e_0_energy": -18.28957806 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.24746423 + ], + [ + 4.62818039, + 0.0, + 0.0 + ], + [ + -2.31409019, + 5.76280642, + 0.0 + ] + ], + "a": 4.24746423, + "b": 4.62818039, + "c": 6.210068537612726, + "alpha": 111.87822955100738, + "beta": 90.0, + "gamma": 90.0, + "volume": 113.28542527190677 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.13743604, + 0.27487208 + ], + "xyz": [ + 1.3743604032612211e-09, + 1.584034587302754, + 1.0618660575 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.86256396, + 0.72512792 + ], + "xyz": [ + 2.3140901986256397, + 4.1787718326972465, + 3.1855981725 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.42945471, + 0.85890941 + ], + "xyz": [ + 2.7435449245771792e-08, + 4.949728662146413, + 1.0618660575 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.57054529, + 0.14109059 + ], + "xyz": [ + 2.314090172564551, + 0.8130777578535878, + 3.1855981725 + ], + "label": "Ga" + } + ] + } + }, + { + "e_fr_energy": -18.29769404, + "e_wo_entrp": -18.29504445, + "e_0_energy": -0.00529917, + "forces": [ + [ + -0.0, + 0.04453885, + 0.0 + ], + [ + 0.0, + -0.04453885, + 0.0 + ], + [ + -0.0, + 0.0370633, + 0.0 + ], + [ + 0.0, + -0.0370633, + 0.0 + ] + ], + "stress": [ + [ + -6.29988572, + 0.0, + 0.0 + ], + [ + 0.0, + -1.78494993, + 0.0 + ], + [ + 0.0, + 0.0, + -1.98986501 + ] + ], + "electronic_steps": [ + { + "alphaZ": 222.9427992, + "ewald": -3772.03567457, + "hartreedc": -1618.59151643, + "XCdc": 185.46838956, + "pawpsdc": 3926.49017611, + "pawaedc": -4637.51273, + "eentropy": -0.00521958, + "bandstr": -353.59679148, + "atom": 6028.55692818, + "e_fr_energy": -18.28363902, + "e_wo_entrp": -18.27841944, + "e_0_energy": -18.28102923 + }, + { + "e_fr_energy": -18.29879594, + "e_wo_entrp": -18.29345537, + "e_0_energy": -18.29612566 + }, + { + "e_fr_energy": -18.29804904, + "e_wo_entrp": -18.29280419, + "e_0_energy": -18.29542662 + }, + { + "e_fr_energy": -18.29772223, + "e_wo_entrp": -18.29245066, + "e_0_energy": -18.29508644 + }, + { + "alphaZ": 222.9427992, + "ewald": -3772.03567457, + "hartreedc": -1621.92418706, + "XCdc": 185.61856087, + "pawpsdc": 3925.40454622, + "pawaedc": -4636.40752465, + "eentropy": -0.00529917, + "bandstr": -350.44784304, + "atom": 6028.55692818, + "e_fr_energy": -18.29769404, + "e_wo_entrp": -18.29239487, + "e_0_energy": -18.29504445 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.24628189 + ], + [ + 4.62804917, + 0.0, + 0.0 + ], + [ + -2.31402458, + 5.78129963, + 0.0 + ] + ], + "a": 4.24628189, + "b": 4.62804917, + "c": 6.227209260068455, + "alpha": 111.81426407500507, + "beta": 90.0, + "gamma": 90.0, + "volume": 113.61410828730013 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.13911761, + 0.27823522 + ], + "xyz": [ + 1.3911760632367987e-09, + 1.6085611744389687, + 1.0615704725 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.86088239, + 0.72176478 + ], + "xyz": [ + 2.3140245886088238, + 4.172738455561031, + 3.1847114175 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.43098854, + 0.86197708 + ], + "xyz": [ + 4.309885337505648e-09, + 4.98334777367248, + 1.0615704725 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.56901146, + 0.13802292 + ], + "xyz": [ + 2.3140245856901145, + 0.7979518563275196, + 3.1847114175 + ], + "label": "Ga" + } + ] + } + }, + { + "e_fr_energy": -18.30092547, + "e_wo_entrp": -18.29831499, + "e_0_energy": -0.00522095, + "forces": [ + [ + -0.0, + 0.04951981, + 0.0 + ], + [ + 0.0, + -0.04951981, + 0.0 + ], + [ + 0.0, + 0.01155021, + 0.0 + ], + [ + 0.0, + -0.01155021, + -0.0 + ] + ], + "stress": [ + [ + 0.06236013, + 0.0, + 0.0 + ], + [ + 0.0, + 3.22776051, + 0.0 + ], + [ + 0.0, + -0.0, + 3.82176728 + ] + ], + "electronic_steps": [ + { + "alphaZ": 224.81439369, + "ewald": -3781.71391441, + "hartreedc": -1627.38329611, + "XCdc": 186.15633088, + "pawpsdc": 3925.2734739, + "pawaedc": -4636.24944183, + "eentropy": -0.00532738, + "bandstr": -337.77365801, + "atom": 6028.55692818, + "e_fr_energy": -18.32451109, + "e_wo_entrp": -18.31918371, + "e_0_energy": -18.3218474 + }, + { + "e_fr_energy": -18.30724168, + "e_wo_entrp": -18.30204805, + "e_0_energy": -18.30464486 + }, + { + "e_fr_energy": -18.30161389, + "e_wo_entrp": -18.29632623, + "e_0_energy": -18.29897006 + }, + { + "e_fr_energy": -18.30110167, + "e_wo_entrp": -18.29585228, + "e_0_energy": -18.29847697 + }, + { + "alphaZ": 224.81439369, + "ewald": -3781.71391441, + "hartreedc": -1617.88462421, + "XCdc": 185.72376363, + "pawpsdc": 3928.39403084, + "pawaedc": -4639.32417379, + "eentropy": -0.00522095, + "bandstr": -346.86210844, + "atom": 6028.55692818, + "e_fr_energy": -18.30092547, + "e_wo_entrp": -18.29570452, + "e_0_energy": -18.29831499 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.23845348 + ], + [ + 4.60194375, + 0.0, + 0.0 + ], + [ + -2.30097187, + 5.77634167, + 0.0 + ] + ], + "a": 4.23845348, + "b": 4.60194375, + "c": 6.217764440304062, + "alpha": 111.71957519552075, + "beta": 90.0, + "gamma": 90.0, + "volume": 112.66826343916189 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.13969733, + 0.27939465 + ], + "xyz": [ + 2.440669200076684e-08, + 1.6138789591700655, + 1.05961337 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.86030267, + 0.72060535 + ], + "xyz": [ + 2.300971855593308, + 4.162462710829935, + 3.1788401100000003 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.43150178, + 0.86300356 + ], + "xyz": [ + 4.31501789854849e-09, + 4.9850034249863455, + 1.05961337 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.56849822, + 0.13699644 + ], + "xyz": [ + 2.300971875684983, + 0.7913382450136548, + 3.1788401100000003 + ], + "label": "Ga" + } + ] + } + }, + { + "e_fr_energy": -18.30093624, + "e_wo_entrp": -18.29832429, + "e_0_energy": -0.0052239, + "forces": [ + [ + -0.0, + 0.03504738, + 0.0 + ], + [ + 0.0, + -0.03504738, + 0.0 + ], + [ + -0.0, + -0.00878835, + 0.0 + ], + [ + 0.0, + 0.00878835, + 0.0 + ] + ], + "stress": [ + [ + -2.19702963, + 0.0, + 0.0 + ], + [ + 0.0, + -0.26845678, + 0.0 + ], + [ + 0.0, + 0.0, + 0.63414889 + ] + ], + "electronic_steps": [ + { + "alphaZ": 224.82880801, + "ewald": -3781.78831782, + "hartreedc": -1617.74453443, + "XCdc": 185.71877753, + "pawpsdc": 3928.84837556, + "pawaedc": -4639.88686874, + "eentropy": -0.00522282, + "bandstr": -346.82887969, + "atom": 6028.55692818, + "e_fr_energy": -18.30093421, + "e_wo_entrp": -18.29571139, + "e_0_energy": -18.2983228 + }, + { + "alphaZ": 224.82880801, + "ewald": -3781.78831782, + "hartreedc": -1617.70137255, + "XCdc": 185.71628071, + "pawpsdc": 3928.87021106, + "pawaedc": -4639.90361889, + "eentropy": -0.0052239, + "bandstr": -346.87463103, + "atom": 6028.55692818, + "e_fr_energy": -18.30093624, + "e_wo_entrp": -18.29571233, + "e_0_energy": -18.29832429 + } + ], + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "lattice": { + "matrix": [ + [ + 0.0, + 0.0, + 4.23839358 + ], + [ + 4.60174398, + 0.0, + 0.0 + ], + [ + -2.30087199, + 5.77630373, + 0.0 + ] + ], + "a": 4.23839358, + "b": 4.60174398, + "c": 6.217692232297967, + "alpha": 111.7188495275951, + "beta": 90.0, + "gamma": 90.0, + "volume": 112.66104032065802 + }, + "sites": [ + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.13970177, + 0.27940353 + ], + "xyz": [ + 2.3008719929329402e-08, + 1.613919652514167, + 1.059598395 + ], + "label": "La" + }, + { + "species": [ + { + "element": "La", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.86029823, + 0.72059647 + ], + "xyz": [ + 2.3008719669912803, + 4.162384077485834, + 3.1787951850000002 + ], + "label": "La" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.25, + 0.43150571, + 0.86301143 + ], + "xyz": [ + -2.3008720040351704e-08, + 4.985016142141634, + 1.059598395 + ], + "label": "Ga" + }, + { + "species": [ + { + "element": "Ga", + "occu": 1 + } + ], + "abc": [ + 0.75, + 0.56849429, + 0.13698857 + ], + "xyz": [ + 2.30087201300872, + 0.7912875878583662, + 3.1787951850000002 + ], + "label": "Ga" + } + ] + } + } + ] + } + } + ], + "formula_pretty": "LaGa", + "state": "successful", + "task_id": "mp-1002133" +} \ No newline at end of file