Skip to content

Commit

Permalink
fix bug with dislocation triples
Browse files Browse the repository at this point in the history
  • Loading branch information
srmnitc committed Jun 25, 2024
1 parent da30919 commit f70380e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions atomrdf/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1998,10 +1998,12 @@ def add_dislocation(self, disl_dict):
self.graph.add((slip_direction, CMSO.hasComponent_y, Literal(disl_dict['SlipDirection'][1], datatype=XSD.float)))
self.graph.add((slip_direction, CMSO.hasComponent_z, Literal(disl_dict['SlipDirection'][2], datatype=XSD.float)))

slip_plane = self.graph.create_node(f"{self._name}_DislocationSlipPlane", LDO.NormalVector)
self.graph.add((slip_plane, CMSO.hasComponent_x, Literal(disl_dict['SlipPlane'][0], datatype=XSD.float)))
self.graph.add((slip_plane, CMSO.hasComponent_y, Literal(disl_dict['SlipPlane'][1], datatype=XSD.float)))
self.graph.add((slip_plane, CMSO.hasComponent_z, Literal(disl_dict['SlipPlane'][2], datatype=XSD.float)))
slip_plane = self.graph.create_node(f"{self._name}_DislocationSlipPlane", LDO.SlipPlane)
normal_vector = self.graph.create_node(f"{self._name}_DislocationNormalVector", LDO.NormalVector)
self.graph.add((normal_vector, CMSO.hasComponent_x, Literal(disl_dict['SlipPlane'][0], datatype=XSD.float)))
self.graph.add((normal_vector, CMSO.hasComponent_y, Literal(disl_dict['SlipPlane'][1], datatype=XSD.float)))
self.graph.add((normal_vector, CMSO.hasComponent_z, Literal(disl_dict['SlipPlane'][2], datatype=XSD.float)))
self.graph.add((slip_plane, LDO.hasNormalVector, normal_vector))

slip_system = self.graph.create_node(f"{self._name}_DislocationSlipSystem", LDO.SlipSystem)
self.graph.add((slip_direction, LDO.belongsToSystem, slip_system))
Expand Down

0 comments on commit f70380e

Please sign in to comment.