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

Update polymer.py to add clarity to the docs for persistent length #4901

Merged
merged 4 commits into from
Feb 7, 2025

Conversation

tanishy7777
Copy link
Contributor

@tanishy7777 tanishy7777 commented Feb 1, 2025

Fixes #4900

Changes made in this Pull Request:
Adds

.. math::

   C(n) = \langle \cos\theta_{i, i+n} \rangle =
           \langle \mathbf{a_i} \cdot \mathbf{a_{i+n}} \rangle
           
where :math:`\mathbf{a}_i \text{ and } \mathbf{a}_{i+n}` are unit vectors
along the bonds. (Because for two vectors a and b, 
:math:`\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}| |\mathbf{b}| \cos{\alpha}`)
– see 
`Wikipedia <https://en.wikipedia.org/wiki/Dot_product#Geometric_definition>`_.

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

Developers certificate of origin


📚 Documentation preview 📚: https://mdanalysis--4901.org.readthedocs.build/en/4901/

Copy link

codecov bot commented Feb 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.63%. Comparing base (f260c4a) to head (6fda256).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4901      +/-   ##
===========================================
- Coverage    93.65%   93.63%   -0.03%     
===========================================
  Files          177      189      +12     
  Lines        21795    22861    +1066     
  Branches      3067     3067              
===========================================
+ Hits         20413    21406     +993     
- Misses         931     1004      +73     
  Partials       451      451              

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

Copy link
Member

@RMeli RMeli left a comment

Choose a reason for hiding this comment

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

Can you please merge develop into your branch, to make the linter check happy again (hopefully)?

@tanishy7777
Copy link
Contributor Author

tanishy7777 commented Feb 4, 2025

Can you please merge develop into your branch, to make the linter check happy again (hopefully)?

I tried merging develop but it was showing Already up to date. So I ran black and flake8 on package and testsuite. I think it's fixed now.

darker -r upstream/develop package/MDAnalysis -L flake8
darker -r upstream/develop testsuite/MDAnalysisTests -L flake8

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the docs. Please see comment inline.

Comment on lines 128 to 130
along the bonds. (Because for two vectors :math:`\mathbf{a}` and :math:`\mathbf{b}`,
:math:`\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}| |\mathbf{b}| \cos{\alpha}`,
where :math:`\alpha` is the angle between the two vectors.)
Copy link
Member

Choose a reason for hiding this comment

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

We don't need the wikipedia link in the docs – I know that I had that in our discussion on discord but it's really elementary. Just remove the sentence with (Because ... .).

Copy link
Contributor Author

@tanishy7777 tanishy7777 Feb 7, 2025

Choose a reason for hiding this comment

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

We don't need the wikipedia link in the docs – I know that I had that in our discussion on discord but it's really elementary. Just remove the sentence with (Because ... .).

yeah it felt basic but I though I would add it for the sake of completeness, but yeah its probably not needed.

@orbeckst orbeckst enabled auto-merge (squash) February 7, 2025 16:47
Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thank you!

@RMeli I enabled auto-merge.

@orbeckst orbeckst merged commit 084b8cc into MDAnalysis:develop Feb 7, 2025
23 of 24 checks passed
amruthesht pushed a commit to amruthesht/mdanalysis that referenced this pull request Feb 19, 2025
…DAnalysis#4901)

* Fixes MDAnalysis#4900
* Update doc string in polymer.py: make clear that we are using unit vectors along bonds

---------

Co-authored-by: Rocco Meli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the docs for Persistent length more clear
3 participants