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

Minor addition #50

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

rlaplaza
Copy link

Few minor additions to some core functionalities. Some of them are fully debatable and arguably none of them are really needed whatsoever. Nevertheless, they should not break any backwards compatibility and, if anything, should improve things a tad.

  • Modified utils function to make it slightly faster and add the flexibility of generating boolean or integer masks (for numpy slicing). This should be useful for further development regarding connectivity determination.
  • Vectorized test atom list generation in sasa.py using the aforementioned function with a boolean call. This leads to a negligible speedup due to the bottleneck being in the grid point distance evaluation, but gets rid of a TODO and is, indeed, slightly faster.
  • Added a second method "sobol" to generate exclusively filled sphere points. This method is based on pseudorandom number generation using Sobol sequences. It is thus not very suitable as a default due to lack of reproducibility (the random seed could be fixed to deal with this). However, it gives approximately the same accuracy with significantly less grid points (~half the density). In the very low density regime, it is significantly more accurate. This may come in handy whenever very large spheres are to be used. Therefore, I think its nice to have as a backup.
  • Exposed the method for sphere filling in the buried_volume.py class. Set projection as default throughout. Added it to test_buried_volume.py as well.

rlaplaza and others added 4 commits September 28, 2022 16:33
@@ -393,6 +402,7 @@ def compute_distal_volume(
center=self._sphere.center,
radius=new_radius,
density=self._sphere.density,
method=self._method,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's more consistent to use the same method as when creating the BuriedVolume object?

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.

2 participants