@@ -500,7 +500,7 @@ def from_graph(cls, graph, sample):
500500 ]
501501
502502 datadict = {
503- "volume" : {"value" : volume },
503+ "volume" : {"value" : volume , },
504504 "number_of_atoms" : {"value" : int (number_of_atoms )},
505505 "repetitions" : {"value" : repetitions },
506506 "length" : {"value" : length },
@@ -600,10 +600,13 @@ def from_graph(cls, graph, sample):
600600 data = json .load (fin )
601601 positions = data [position_identifier ]["value" ]
602602 species = data [species_identifier ]["value" ]
603-
603+
604+ position = DataProperty (value = positions )
605+ species = DataProperty (value = species )
606+
604607 return cls (
605- position = DataProperty ( value = positions ) ,
606- species = DataProperty ( value = species ) ,
608+ position = position ,
609+ species = species ,
607610 )
608611
609612
@@ -690,7 +693,7 @@ def from_graph(cls, graph, sample_id):
690693 if sample_type is None :
691694 raise ValueError (f"Sample { sample_id } not found in graph." )
692695
693-
696+
694697 # material, simulation_cell, atom_attribute handled separately (if needed)
695698 kwargs ["material" ] = Material .from_graph (graph , sample )
696699 kwargs ["simulation_cell" ] = SimulationCell .from_graph (graph , sample )
0 commit comments