Skip to content

Volume RDF implementation#1

Open
francesshei wants to merge 8 commits intoHelveg:mainfrom
francesshei:main
Open

Volume RDF implementation#1
francesshei wants to merge 8 commits intoHelveg:mainfrom
francesshei:main

Conversation

@francesshei
Copy link

RDF computation changes: volume_rdf function now computes the RD as the averaged fraction of number of particles over the number of grid points in a sphere of increasing radius (dr) surrounding each particle.

ISSUE on line 97: bin[1] contains values equal to 0, resulting in 'NaN' - 'Inf' densities.
TODO:

  • find better way to exclude origin point from neighbors (line 82 - 83)

francesshei and others added 5 commits September 27, 2021 17:50
RDF computation changes: the volume_rdf function now computes the RD as the averaged fraction of number of particles over the number of grid points  in a sphere of increasing radius (dr) surrounding each particle
Improved 'volume_rdf' computation by using shells

Co-authored-by: Robin De Schepper <Helveg@users.noreply.github.com>
Comment on lines 19 to 20
a0 = next(b, None)
yield 0, a0
Copy link
Owner

Choose a reason for hiding this comment

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

This should be reduced to yield 0, next(b):

  1. Shorter 😇
  2. If iterable is empty a StopIteration should be raised, in the current form we'll yield (0, None) before a StopIteration.

Copy link
Author

Choose a reason for hiding this comment

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

Ok, I will change it and run the test!

@Helveg
Copy link
Owner

Helveg commented Oct 6, 2021

Can you merge in master and rename the test folder to the tests folder? When you push the Continuous Integration here on GitHub should start running the tests :)

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