Skip to content

Commit

Permalink
Merge pull request #93 from pyscal/fix_89
Browse files Browse the repository at this point in the history
Fix 89
  • Loading branch information
srmnitc authored Apr 19, 2024
2 parents d81f518 + 1df9c04 commit 564dd1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions atomrdf/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,8 @@ def get_system_from_sample(self, sample):
sys = System()
sys.box = cell_vectors
sys.atoms = at
sys.sample = sample
sys.graph = self
return sys

def to_file(self, sample, filename=None, format="poscar"):
Expand Down
1 change: 1 addition & 0 deletions tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def test_extract_sample():

struct = kg.get_system_from_sample(struct_Fe.sample)
assert len(struct.atoms.positions) == 2
assert struct.graph is not None

kg.to_file(struct_Fe.sample, filename='POSCAR')
assert os.path.exists('POSCAR')
Expand Down

0 comments on commit 564dd1f

Please sign in to comment.