-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
47 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ITEM: TIMESTEP | ||
0 | ||
ITEM: NUMBER OF ATOMS | ||
2 | ||
ITEM: BOX BOUNDS xy xz yz pp pp pp | ||
0.0 5.0739861 1.2621856 | ||
0.0 2.7916155 1.2874292 | ||
0.0 2.2254033 0.7485898 | ||
ITEM: ATOMS id type x y z | ||
1 2 0.0 0.0 0.0 | ||
2 1 1.2621856 0.7018028 0.5513885 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# The index should map to that in the dump file | ||
|
||
import os | ||
import numpy as np | ||
import unittest | ||
from context import dpdata | ||
|
||
class TestLmpDumpIdx(unittest.TestCase): | ||
def setUp(self): | ||
self.system = dpdata.System(os.path.join('poscars', 'conf2.dump')) | ||
|
||
def test_coords(self): | ||
np.testing.assert_allclose(self.system['coords'], np.array( | ||
[[[0., 0., 0.], | ||
[1.2621856, 0.7018028, 0.5513885]]] | ||
)) | ||
|
||
def test_type(self): | ||
np.testing.assert_allclose(self.system.get_atom_types(), np.array( | ||
[1, 0], dtype=int, | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters