Skip to content
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

Deep CNS scripts checking and example cleaning #763

Merged
merged 11 commits into from
Dec 22, 2023
Merged

Deep CNS scripts checking and example cleaning #763

merged 11 commits into from
Dec 22, 2023

Conversation

amjjbonvin
Copy link
Member

@amjjbonvin amjjbonvin commented Dec 20, 2023

You are about to submit a new Pull Request. Before continuing make sure you read the contributing guidelines and that you comply with the following criteria:

  • You have sticked to Python. Please talk to us before adding other programming languages to HADDOCK3
  • Your PR is about CNS
  • Your code is well documented: proper docstrings and explanatory comments for those tricky parts
  • You structured the code into small functions as much as possible. You can use classes if there is a (state) purpose
  • Your code follows our coding style
  • You wrote tests for the new code
  • tox tests pass. Run tox command inside the repository folder
  • -test.cfg examples execute without errors. Inside examples/ run python run_tests.py -b
  • PR does not add any dependencies, unless permission granted by the HADDOCK team
  • PR does not break licensing
  • Your PR is about writing documentation for already existing code 🔥
  • Your PR is about writing tests for already existing code :godmode:

A careful check of all output files of the various examples revealed several small issues like duplication of some parameters, missing variables in some CNS scripts, inconsistencies between files (format mainly) and example config files.

This pull request resolves all those issues.

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (18a5528) 72.54% compared to head (a0515fc) 72.55%.

Files Patch % Lines
src/haddock/libs/libparallel.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #763   +/-   ##
=======================================
  Coverage   72.54%   72.55%           
=======================================
  Files          80       80           
  Lines        7566     7571    +5     
=======================================
+ Hits         5489     5493    +4     
- Misses       2077     2078    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amjjbonvin
Copy link
Member Author

@rvhonorato - tests are failing on my mac because of a difference in the 15th digit in the contacts module test...
May-be an overkill? I did not touch that module. They do pass here however.

========================================================================================== FAILURES ==========================================================================================
______________________________________________________________________________ test_make_ideogram_arc_moduloAB _______________________________________________________________________________

    def test_make_ideogram_arc_moduloAB():
        """Test usage of moduloAB while providing outranged angle values."""
        nb_points = 2
        arc_positions = make_ideogram_arc(1.1, (1, -1), nb_points=nb_points)
        excpected_output = np.array([
            0.5943325364549538 + 0.9256180832886862j,
            0.5943325364549535 - 0.9256180832886863j,
            ])
        assert arc_positions.shape == excpected_output.shape
        for i in range(nb_points):
>           assert arc_positions[i] == excpected_output[i]
E           assert (0.5943325364549534-0.9256180832886863j) == (0.5943325364549535-0.9256180832886863j)

As for the alascan integration test, if might need to be revisited...

@rvhonorato
Copy link
Member

This test is wrong, looks like we missed it during #731. It's comparing two arrays down to its numeric precision - should be using numpy.isclose.

git blame says @VGPReys added it, could you open another PR and change it?

@rvhonorato rvhonorato self-requested a review December 21, 2023 08:09
@rvhonorato rvhonorato added m|emscoring Related to emscoring module execution Related to execution modes, such as GRID, HPC, local, etc. m|emref emref module m|flexref flexref module m|mdref mdref module m|rigidbody rigidbody sampling m|topoaa topoaa module examples end-to-end tests / workflow examples m|mdscoring mdscoring module CNS Improvements in the CNS engine parameters-topologies Issues/feature requests related to the force field labels Dec 21, 2023
@rvhonorato rvhonorato assigned amjjbonvin and unassigned amjjbonvin Dec 21, 2023
Copy link
Member Author

@amjjbonvin amjjbonvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this pull request might appear rather large, the changes are somewhat limited:

  • 54 of 98 files are cleaned config file examples (harmonisation and cleaning unneeded paramters/steps)

  • 26 files are topo/param files, mainly with harmonised CNS verbosity settings.

  • A few files from the toppar directory have large differences because their line endings were corrected from Windows to Linux. Their content is further the same.

  • Most of the remaining files are CNS scripts with rather minor corrections to remove error messages (e.g. correcting a variable name). Some missing in a module were added.

@rvhonorato rvhonorato removed their request for review December 22, 2023 08:38
@rvhonorato
Copy link
Member

It's impossible for me to review 1.000+ lines, if you think its ok just go ahead and merge it!

@amjjbonvin
Copy link
Member Author

amjjbonvin commented Dec 22, 2023 via email

@amjjbonvin amjjbonvin merged commit 09f9d70 into main Dec 22, 2023
6 checks passed
@amjjbonvin amjjbonvin deleted the deepCNS branch December 22, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CNS Improvements in the CNS engine examples end-to-end tests / workflow examples execution Related to execution modes, such as GRID, HPC, local, etc. m|emref emref module m|emscoring Related to emscoring module m|flexref flexref module m|mdref mdref module m|mdscoring mdscoring module m|rigidbody rigidbody sampling m|topoaa topoaa module parameters-topologies Issues/feature requests related to the force field
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants