-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support of all lammps dump coordinate style (#179)
* Update dump.py * Create test_lammps_dump_unfold.py * Create conf_unfold.dump * Update dump.py * Create conf_s_su.dump * Create test_lammps_dump_s_su.py * Update dump.py * Update conf_unfold.dump * Update dump.py
- Loading branch information
Showing
5 changed files
with
125 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
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 xs ys zs | ||
1 1 0.0 0.0 0.0 | ||
2 2 0.2472745002 0.2527254533 0.2477701458 | ||
ITEM: TIMESTEP | ||
1 | ||
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 xsu ysu zsu | ||
1 1 0.0 0.0 0.0 | ||
2 2 1.2472745002 1.2527254533 1.2477701458 |
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,22 @@ | ||
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 xu yu zu | ||
1 1 5.073986099999999944e+00 2.791615499999999805e+00 2.225403299999999973e+00 | ||
2 2 6.336171700000000406e+00 3.493418300000000087e+00 2.776791800099999818e+00 | ||
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 | ||
1.0 3.2254033 0.7485898 | ||
ITEM: ATOMS id type xu yu zu | ||
1 1 5.073986099999999944e+00 2.791615499999999805e+00 3.225403299999999973e+00 | ||
2 2 6.336171700000000406e+00 3.493418300000000087e+00 3.776791800099999818e+00 |
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,26 @@ | ||
import os | ||
import numpy as np | ||
import unittest | ||
from context import dpdata | ||
from poscars.poscar_ref_oh import TestPOSCARoh | ||
|
||
class TestDump(unittest.TestCase, TestPOSCARoh): | ||
|
||
def setUp(self): | ||
self.system = dpdata.System(os.path.join('poscars', 'conf_s_su.dump'), | ||
type_map = ['O', 'H']) | ||
|
||
class TestDump2(unittest.TestCase, TestPOSCARoh): | ||
|
||
def setUp(self): | ||
self.tmp_system = dpdata.System(os.path.join('poscars', 'conf_s_su.dump'), | ||
type_map = ['O', 'H']) | ||
self.system = self.tmp_system.sub_system([1]) | ||
|
||
def test_nframes (self) : | ||
self.assertEqual(self.tmp_system.get_nframes(), 2) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() | ||
|
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,26 @@ | ||
import os | ||
import numpy as np | ||
import unittest | ||
from context import dpdata | ||
from poscars.poscar_ref_oh import TestPOSCARoh | ||
|
||
class TestDump(unittest.TestCase, TestPOSCARoh): | ||
|
||
def setUp(self): | ||
self.system = dpdata.System(os.path.join('poscars', 'conf_unfold.dump'), | ||
type_map = ['O', 'H']) | ||
|
||
class TestDump2(unittest.TestCase, TestPOSCARoh): | ||
|
||
def setUp(self): | ||
self.tmp_system = dpdata.System(os.path.join('poscars', 'conf_unfold.dump'), | ||
type_map = ['O', 'H']) | ||
self.system = self.tmp_system.sub_system([1]) | ||
|
||
def test_nframes (self) : | ||
self.assertEqual(self.tmp_system.get_nframes(), 2) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() | ||
|