mdanalysis icon indicating copy to clipboard operation
mdanalysis copied to clipboard

Extend lammpsdump to accept arbitrary columns

Open pstaerk opened this issue 2 years ago • 6 comments

Fixes #

Changes made in this Pull Request:

  • This updates the lammpsdump Parser to be able to parse arbitrary data columns such as charge etc.

This handles issues #3504 and addresses PR #3448.

PR Checklist

  • [x] Tests?
  • [ ] Docs?
  • [ ] CHANGELOG updated?
  • [x] Issue raised/referenced?

pstaerk avatar Apr 06 '22 14:04 pstaerk

Hello @pstaerk! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 159:80: E501 line too long (85 > 79 characters) Line 170:80: E501 line too long (106 > 79 characters) Line 557:80: E501 line too long (89 > 79 characters) Line 558:80: E501 line too long (94 > 79 characters)

Comment last updated at 2024-02-29 13:52:10 UTC

pep8speaks avatar Apr 06 '22 14:04 pep8speaks

Codecov Report

Merging #3608 (d5e0310) into develop (95791dd) will increase coverage by 1.07%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #3608      +/-   ##
===========================================
+ Coverage    93.04%   94.12%   +1.07%     
===========================================
  Files          172      190      +18     
  Lines        22731    24675    +1944     
  Branches      3308     3327      +19     
===========================================
+ Hits         21150    23225    +2075     
- Misses        1028     1388     +360     
+ Partials       553       62     -491     
Impacted Files Coverage Δ
package/MDAnalysis/coordinates/LAMMPS.py 96.29% <100.00%> (+6.61%) :arrow_up:
package/MDAnalysis/lib/NeighborSearch.py 96.42% <0.00%> (-3.58%) :arrow_down:
package/MDAnalysis/topology/tpr/obj.py 96.96% <0.00%> (-3.04%) :arrow_down:
...onality_reduction/DimensionalityReductionMethod.py 97.05% <0.00%> (-2.95%) :arrow_down:
...sis/analysis/encore/clustering/ClusteringMethod.py 95.45% <0.00%> (-1.43%) :arrow_down:
package/MDAnalysis/converters/RDKitParser.py 96.21% <0.00%> (-0.57%) :arrow_down:
package/MDAnalysis/topology/guessers.py 99.21% <0.00%> (-0.02%) :arrow_down:
package/MDAnalysis/units.py 100.00% <0.00%> (ø)
package/MDAnalysis/lib/_cutil.pyx 100.00% <0.00%> (ø)
package/MDAnalysis/lib/mdamath.py 100.00% <0.00%> (ø)
... and 122 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 95791dd...d5e0310. Read the comment docs.

codecov[bot] avatar Apr 06 '22 14:04 codecov[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.38%. Comparing base (2c1aa4b) to head (bac1f4c).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3608      +/-   ##
===========================================
- Coverage    93.38%   93.38%   -0.01%     
===========================================
  Files          171      183      +12     
  Lines        21744    22843    +1099     
  Branches      4014     4023       +9     
===========================================
+ Hits         20305    21331    +1026     
- Misses         952     1025      +73     
  Partials       487      487              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 06 '22 14:04 codecov[bot]

Also @pstaerk just keep an eye on PEP8

hmacdope avatar Apr 07 '22 09:04 hmacdope

Hello! I have been following this set of issues and PRs that is looking to update the lammps dump readers. I really like this general solution to reading in arbitrary data, and I appreciate that it can auto-detect the columns in the dump file, so that all of them can be read in if needed. Just wanted to drop in and say thanks for your work on this :)

aliehlen avatar May 02 '22 23:05 aliehlen

@pstaerk just ping me when you want a review.

hmacdope avatar May 16 '22 11:05 hmacdope

@hmacdope I hope that with this, I finally have all the things done that are required for the PR :).

pstaerk avatar Nov 08 '22 13:11 pstaerk

Linter Bot Results:

Hi @pstaerk! Thanks for making this PR. We linted your code and found the following:

Some issues were found with the formatting of your code.

Code Location Outcome
main package ⚠️ Possible failure
testsuite ⚠️ Possible failure

Please have a look at the darker-main-code and darker-test-code steps here for more details: https://github.com/MDAnalysis/mdanalysis/actions/runs/8097120276/job/22127421709


Please note: The black linter is purely informational, you can safely ignore these outcomes if there are no flake8 failures!

github-actions[bot] avatar Sep 29 '23 17:09 github-actions[bot]

@orbeckst I implemented the changed discussed offline. None is now the default for additional_columns and True parses all columns that are not parsable already.

@hmacdope maybe you can take another look also.

Docs still need tuning.

hejamu avatar Sep 29 '23 17:09 hejamu

Pinging @hmacdope @orbeckst :)

hejamu avatar Jan 30 '24 16:01 hejamu

Sorry for being so slow @pstaerk, i'll have a look ASAP

hmacdope avatar Jan 30 '24 16:01 hmacdope

Sorry, won’t have time to review over the next few weeks.

orbeckst avatar Jan 30 '24 17:01 orbeckst

Ok, I hope to have addressed all the requested points @hmacdope :) .

pstaerk avatar Feb 26 '24 14:02 pstaerk

Kicking CI

hmacdope avatar Feb 27 '24 23:02 hmacdope

CI is not cooperating, trying again.

hmacdope avatar Mar 01 '24 00:03 hmacdope