Open kirk0830 opened 4 months ago
Now the rendering of figures is under refactor, a new logic of organizing data is needed for now. Old one is like:
{ "mp-730101.cif: GBRV v1.5 ": { "de": [ 0.013860997587499924, 0.00045393537499904824, 0.00010070378749915676, 7.142224999867608e-05, 6.570483749968048e-05, 6.023726249893002e-05, 4.347770000023843e-05, 2.9336999999074465e-05, 2.69097499998594e-05, 1.931418749911984e-05, 0.0 ], "dp": [ -2.015739, -0.10332100000000022, 0.0006149999999998101, 0.003089999999999815, 0.00332599999999994, -0.000532000000000199, -0.0007270000000003662, 0.0019689999999998875, 0.001042999999999683, 0.0019929999999996895, 0.0 ], "dbs": [ 0.0028276580183703086, 3.2813302093257655e-05, 5.28055468388865e-05, 1.1733835776123594e-05, 8.512287915329846e-05, 8.039449128287346e-05, 1.9697822895521253e-05, 4.6865742849758105e-05, 6.503236572552103e-05, 2.0006503497886892e-05, 0.0 ], "iconv": 2, "ecutwfc": [ 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 150.0, 200.0 ], "zvals": [ 1 ] },
The new one requires data organized as object/instance, therefore for the first obj, all data will be its attributes, thus the key will be changed into:
[ { "system": "mp-730101.cif", "ppcase": "GBRV v1.5", "de": [ 0.013860997587499924, 0.00045393537499904824, 0.00010070378749915676, 7.142224999867608e-05, 6.570483749968048e-05, 6.023726249893002e-05, 4.347770000023843e-05, 2.9336999999074465e-05, 2.69097499998594e-05, 1.931418749911984e-05, 0.0 ], "dp": [ -2.015739, -0.10332100000000022, 0.0006149999999998101, 0.003089999999999815, 0.00332599999999994, -0.000532000000000199, -0.0007270000000003662, 0.0019689999999998875, 0.001042999999999683, 0.0019929999999996895, 0.0 ], "dbs": [ 0.0028276580183703086, 3.2813302093257655e-05, 5.28055468388865e-05, 1.1733835776123594e-05, 8.512287915329846e-05, 8.039449128287346e-05, 1.9697822895521253e-05, 4.6865742849758105e-05, 6.503236572552103e-05, 2.0006503497886892e-05, 0.0 ], "iconv": 2, "ecutwfc": [ 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 150.0, 200.0 ], "zvals": [ 1 ] }, ]
Now the rendering of figures is under refactor, a new logic of organizing data is needed for now. Old one is like:
The new one requires data organized as object/instance, therefore for the first obj, all data will be its attributes, thus the key will be changed into: