-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend lammpsdump to accept arbitrary columns (#3608)
* Extended mdanalysis to accept other attributes as well. * Able to parse arbitrary columns now. * Tried to fix most of the pep8 problems. * First try at testing the additional column part. * Testing multi read columns as well. * Fix the no additional columns case. * Implemented requested changes to docs. * Implemented the requested changes to the tests. * Incorporated the PEP8 comments. * Third round of PEP... * PEP8 ... * Authors and changelog. * Variable renaming issue. * Hopefully fixed documentation. * Sphinx * Hopefully fixed the tests * Implement input from UGM23 * refine tests * Small typo Co-authored-by: Hugo MacDermott-Opeskin <[email protected]> * Removed comment * Addressed hmacdope's comments regarding issue link * Addressed hmacdope's comments regarding file paths. * Added warning if keys are not in lammpsdump file. * Tested the formatting error of additional_columns. * Make changed lines comply with pep8 * 80 is indeed longer than 79... * Fix test * Fix test * Don't format `datafiles.py` * Added test of warning. --------- Co-authored-by: Philipp Stärk <[email protected]> Co-authored-by: hejamu <[email protected]> Co-authored-by: Hugo MacDermott-Opeskin <[email protected]>
- Loading branch information
1 parent
2c1aa4b
commit 3c83b8f
Showing
8 changed files
with
229 additions
and
14 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
29 changes: 29 additions & 0 deletions
29
testsuite/MDAnalysisTests/data/lammps/additional_columns.data
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,29 @@ | ||
LAMMPS data file via write_data, version 24 Mar 2022, timestep = 500 | ||
|
||
10 atoms | ||
1 atom types | ||
|
||
0 42.6 xlo xhi | ||
0 44.2712 ylo yhi | ||
-25.1 25.1 zlo zhi | ||
|
||
Masses | ||
|
||
1 12.011 | ||
|
||
Pair Coeffs # lj/cut/coul/long/omp | ||
|
||
1 0.0663 3.5812 | ||
|
||
Atoms # full | ||
|
||
1 2 1 -0.00706800004577013 2.84 8.17 -25 0 0 0 | ||
2 2 1 0.004078816788554217 7.1 8.17 -25 0 0 0 | ||
3 2 1 -0.005824512619752745 2.13 6.94 -25 0 0 0 | ||
4 2 1 0.002812345167059992 6.39 6.94 -25 0 0 0 | ||
5 2 1 -0.004070019151543417 2.84 5.71 -25 0 0 0 | ||
6 2 1 0.004796116641855679 7.1 5.71 -25 0 0 0 | ||
7 2 1 -0.003217742434809291 2.13 4.48 -25 0 0 0 | ||
8 2 1 0.0008273956785370801 6.39 4.48 -25 0 0 0 | ||
9 2 1 -0.0003942558636157474 2.84 3.25 -25 0 0 0 | ||
10 2 1 0.001288716009147968 7.1 3.25 -25 0 0 0 |
19 changes: 19 additions & 0 deletions
19
testsuite/MDAnalysisTests/data/lammps/additional_columns.lammpstrj
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,19 @@ | ||
ITEM: TIMESTEP | ||
0 | ||
ITEM: NUMBER OF ATOMS | ||
10 | ||
ITEM: BOX BOUNDS pp pp ff | ||
0.0000000000000000e+00 4.2600000000000001e+01 | ||
0.0000000000000000e+00 4.4271200000000000e+01 | ||
-2.5100000000000001e+01 2.5100000000000001e+01 | ||
ITEM: ATOMS id x y z q p | ||
1 2.84 8.17 -25 0.00258855 1.1 | ||
2 7.1 8.17 -25 6.91952e-05 1.2 | ||
3 2.13 6.94 -25 0.0105548 1.1 | ||
4 6.39 6.94 -25 0.00420319 1.2 | ||
5 2.84 5.71 -25 0.00919172 1.1 | ||
6 7.1 5.71 -25 0.00479777 1.2 | ||
7 2.13 4.48 -25 0.000636864 1.1 | ||
8 6.39 4.48 -25 0.00587125 1.2 | ||
9 2.84 3.25 -25 -0.00218125 1.1 | ||
10 7.1 3.25 -25 0.0068891 1.2 |
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