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

Fix issues 381, 382, and add a Mass type #385

Merged
merged 7 commits into from
Jan 29, 2025
Merged

Fix issues 381, 382, and add a Mass type #385

merged 7 commits into from
Jan 29, 2025

Conversation

lohedges
Copy link
Contributor

This PR closes #381 by adding a ._to_default_unit() method to the internal GeneralUnit class. This simply returns self, since they are by definition in internal default units.

The PR also closes #382 by clarifying the use of the explicit_dummies kwarg in the Process.Amber constructor docstring.

The PR also adds support for a new Mass type, a Mass requirement for nodes, and Mass unit convenience classes.

  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): [y]
  • I confirm that I have added a test for any new functionality in this pull request: [y]
  • I confirm that I have added documentation (e.g. a new tutorial page or detailed guide) for any new functionality in this pull request: [y]
  • I confirm that I have permission to release this code under the GPL3 license: [y]

@lohedges lohedges added bug Something isn't working enhancement New feature or request labels Jan 27, 2025
@lohedges lohedges temporarily deployed to biosimspace-build January 27, 2025 16:39 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build January 27, 2025 16:40 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build January 27, 2025 16:40 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build January 27, 2025 16:40 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build January 27, 2025 16:40 — with GitHub Actions Inactive
Copy link
Contributor

@mb2055 mb2055 left a comment

Choose a reason for hiding this comment

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

Everything seems to work, just a few doc changes

Comment on lines 124 to 132
>>> length = BSS.Types.Length(12, "G")
>>> print(length.kilograms())

The same as above, except passing a string representation of the
length to the constructor.

>>> import BioSimSpace as BSS
>>> length = BSS.Types.Length("12 G")
>>> print(length.kilograms())
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the docstring here is wrong. Presumably it should be something like

mass = BSS.Types.Mass(12,"G")
print(mass.kilogram())
...
mass = BSS.Types.Length("12 G")
print(mass.kilogram())

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, looks like the function .kilogram() not .kilograms()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will fix this now. I think I copied the previous class template over, but clearly forgot to modify all of the docstring.

Comment on lines 123 to 132
>>> import BioSimSpace as BSS
>>> length = BSS.Types.Length(12, "G")
>>> print(length.kilograms())

The same as above, except passing a string representation of the
length to the constructor.

>>> import BioSimSpace as BSS
>>> length = BSS.Types.Length("12 G")
>>> print(length.kilograms())
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, docstring needs to be changed

mb2055
mb2055 previously approved these changes Jan 29, 2025
Copy link
Contributor

@mb2055 mb2055 left a comment

Choose a reason for hiding this comment

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

All good 👍

@lohedges lohedges merged commit f3e3a9c into devel Jan 29, 2025
@lohedges lohedges deleted the fix_381 branch January 29, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
2 participants