-
Notifications
You must be signed in to change notification settings - Fork 659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fmt] Format topology module and tests #4849
base: develop
Are you sure you want to change the base?
Conversation
Hello @RMeli! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4849 +/- ##
===========================================
- Coverage 93.65% 93.63% -0.03%
===========================================
Files 177 189 +12
Lines 21779 22845 +1066
Branches 3064 3064
===========================================
+ Hits 20398 21391 +993
- Misses 929 1002 +73
Partials 452 452 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The web UI was really slow with this one. I hope all the review comments were saved.
F_BONDS, F_G96BONDS, F_MORSE, F_CUBICBONDS, | ||
F_CONNBONDS, F_HARMONIC, F_FENEBONDS, F_TABBONDS, | ||
F_TABBONDSNC, F_RESTRBONDS, F_ANGLES, F_G96ANGLES, F_RESTRANGLES, | ||
F_LINEAR_ANGLES, F_CROSS_BOND_BONDS, F_CROSS_BOND_ANGLES, F_UREY_BRADLEY, | ||
F_QUARTIC_ANGLES, F_TABANGLES, F_PDIHS, F_RBDIHS, F_RESTRDIHS, F_CBTDIHS, | ||
F_FOURDIHS, F_IDIHS, F_PIDIHS, F_TABDIHS, | ||
F_CMAP, F_GB12, F_GB13, F_GB14, | ||
F_GBPOL, F_NPSOLVATION, F_LJ14, F_COUL14, | ||
F_LJC14_Q, F_LJC_PAIRS_NB, F_LJ, F_BHAM, | ||
F_LJ_LR, F_BHAM_LR, F_DISPCORR, F_COUL_SR, | ||
F_COUL_LR, F_RF_EXCL, F_COUL_RECIP, F_LJ_RECIP, F_DPD, | ||
F_POLARIZATION, F_WATER_POL, F_THOLE_POL, F_ANHARM_POL, | ||
F_POSRES, F_FBPOSRES, F_DISRES, F_DISRESVIOL, F_ORIRES, | ||
F_ORIRESDEV, F_ANGRES, F_ANGRESZ, F_DIHRES, | ||
F_DIHRESVIOL, F_CONSTR, F_CONSTRNC, F_SETTLE, F_VSITE1, | ||
F_VSITE2, F_VSITE2FD, F_VSITE3, F_VSITE3FD, F_VSITE3FAD, | ||
F_VSITE3OUT, F_VSITE4FD, F_VSITE4FDN, F_VSITEN, | ||
F_COM_PULL, F_DENSITYFITTING, F_EQM, F_EPOT, F_EKIN, | ||
F_ETOT, F_ECONSERVED, F_TEMP, F_VTEMP_NOLONGERUSED, | ||
F_PDISPCORR, F_PRES, F_DHDL_CON, F_DVDL, | ||
F_DKDL, F_DVDL_COUL, F_DVDL_VDW, F_DVDL_BONDED, | ||
F_DVDL_RESTRAINT, F_DVDL_TEMPERATURE, F_NRE) = list(range(95)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does formatting here has a special meaning?
F_DVDL_RESTRAINT, | ||
F_DVDL_TEMPERATURE, | ||
F_NRE, | ||
) = list(range(95)) | ||
|
||
#: Function types from ``<gromacs_dir>/src/gmxlib/tpxio.c`` | ||
ftupd = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does formatting here has a special meaning?
[ | ||
"N", | ||
"C", | ||
"C", | ||
"O", | ||
"C", | ||
"C", | ||
"O", | ||
"N", | ||
"H", | ||
"H", | ||
"H", | ||
"H", | ||
"H", | ||
"H", | ||
"H", | ||
"H", | ||
"Cu", | ||
"Fe", | ||
"Mg", | ||
"Ca", | ||
"S", | ||
"O", | ||
"C", | ||
"C", | ||
"S", | ||
"O", | ||
"C", | ||
"C", | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not great, not terrible.
[ | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
-1, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
1, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not great, not terrible.
[ | ||
"H", | ||
"O", | ||
"C", | ||
"H", | ||
"H", | ||
"C", | ||
"H", | ||
"O", | ||
"C", | ||
"H", | ||
"N", | ||
"C", | ||
"H", | ||
"N", | ||
"C", | ||
"C", | ||
"O", | ||
"N", | ||
"H", | ||
"C", | ||
"N", | ||
"H", | ||
"H", | ||
"N", | ||
"C", | ||
"C", | ||
"H", | ||
"C", | ||
"H", | ||
"H", | ||
"O", | ||
"P", | ||
"O", | ||
"O", | ||
"O", | ||
"C", | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not great, not terrible.
[ | ||
"O", | ||
"H", | ||
"H", | ||
"", | ||
"O", | ||
"H", | ||
"H", | ||
"", | ||
"O", | ||
"H", | ||
"H", | ||
"", | ||
"O", | ||
"H", | ||
"H", | ||
"", | ||
"Na", | ||
"Na", | ||
"Na", | ||
"Na", | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the trick above?
@pytest.fixture(params=[TPR400, TPR402, TPR403, TPR404, TPR405, TPR406, | ||
TPR407, TPR450, TPR451, TPR452, TPR453, TPR454, | ||
TPR455, TPR502, TPR504, TPR505, TPR510, TPR2016, | ||
TPR2018, TPR2019B3, TPR2020, TPR2020Double, | ||
TPR2021, TPR2021Double, TPR2022RC1, TPR2023, | ||
TPR2024]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind, but not everyone will like this.
"H,C,H,H,C,H,H,H,C,H,H,H,C,O,N,H,C,H,C,H,H,C,H,C,H,H,H,C,H,H," | ||
"H,C,O,N,H,C,H,H,C,O,O,O,H,H,,O,H,H,,O,H,H,,O,H,H,,O,H,H,,O,H" | ||
",H,,O,H,H,,O,H,H,,O,H,H,,O,H,H,,O,H,H,,O,H,H,,O,H,H,,O,H,H,," | ||
"O,H,H" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice trick, could be applied elsewhere. Here just list("HCHHC")
should work since they are all single-letter elements, but this will work elsewhere.
TPR400, TPR402, TPR403, TPR404, TPR405, TPR406, TPR407, | ||
TPR450, TPR451, TPR452, TPR453, TPR454, TPR455, TPR455Double, | ||
TPR460, TPR461, TPR502, TPR504, TPR505, TPR510, TPR510_bonded, | ||
TPR2016, TPR2018, TPR2019B3, TPR2020B2, TPR2020, TPR2020Double, | ||
TPR2021, TPR2021Double, TPR2022RC1, TPR2023, TPR2024, | ||
TPR2016_bonded, TPR2018_bonded, TPR2019B3_bonded, | ||
TPR2020B2_bonded, TPR2020_bonded, TPR2020_double_bonded, | ||
TPR2021_bonded, TPR2021_double_bonded, TPR334_bonded, | ||
TPR2022RC1_bonded, TPR2023_bonded, TPR2024_bonded, | ||
TPR_EXTRA_2021, TPR_EXTRA_2020, TPR_EXTRA_2018, | ||
TPR_EXTRA_2016, TPR_EXTRA_407, TPR_EXTRA_2022RC1, | ||
TPR_EXTRA_2023, TPR_EXTRA_2024, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some meaning here?
[ | ||
"C", | ||
"C", | ||
"H", | ||
"C", | ||
"H", | ||
"H", | ||
"O", | ||
"P", | ||
"O", | ||
"O", | ||
"O", | ||
"C", | ||
"H", | ||
"H", | ||
"C", | ||
"H", | ||
"O", | ||
"C", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone judge in terms of LOC, this is a win. =P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blanket LGTM — please merge when you're happy with it @RMeli
🎄 🎁
Format topology module and tests. Some files from active PRs might be excluded (see #4815).
📚 Documentation preview 📚: https://mdanalysis--4849.org.readthedocs.build/en/4849/