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

Reinventing SiteRDF #1778

Merged
merged 32 commits into from Feb 11, 2024
Merged

Reinventing SiteRDF #1778

merged 32 commits into from Feb 11, 2024

Conversation

jws-1
Copy link
Member

@jws-1 jws-1 commented Jan 28, 2024

This PR implements the SiteRDF module outside of the Procedure framework (similarly to #1747), and works towards #1769. I believe this is working as intended, but will need a more scientific eye to confirm!

As a side, this PR also implements a DataNormaliser1D class for future analysis, with intentions of performing similarly to the operate...Normalise family of nodes.

Some questions before merging can be performed:

  • In the previous implementation, it seems that the instantaneous_ flag is not actually used - is this intentional? If not, then I can update the new analysis code to utilise it.
  • Currently, the DataNormaliser1D methods that operate on Site-based statistics just take the site population as input - which seems OK for now, but is there a better solution that would be more useful in the long term? Also, would it be better to have a DataNormaliserBase, which DataNormaliser1D inherits from, or should we wait until 2/3D variants are needed?
  • I've updated some of the SiteRDF test input files to enable the excludeSameMolecule flag, as it felt like it should be set in some places - is this correct? If not, there is a bigger problem at hand as disabling it causes the tests to fail!

@jws-1 jws-1 requested a review from trisyoungs January 28, 2024 13:42
@jws-1 jws-1 self-assigned this Jan 28, 2024
Copy link
Member

@trisyoungs trisyoungs left a comment

Choose a reason for hiding this comment

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

Excellent. This looks really good - I'm already fully convinced of this new way of writing analysis routines!

Some small comments in the review, and I'll address your questions. I'd like to do some local testing of the module before we merge, particularly the instantaneous option.

src/analyser/dataNormaliser1D.h Outdated Show resolved Hide resolved
src/analyser/dataNormaliser1D.cpp Outdated Show resolved Hide resolved
src/analyser/CMakeLists.txt Outdated Show resolved Hide resolved
@trisyoungs
Copy link
Member

Answers to your questions above:

  1. Instantaneous - yes, you're right. This was left over from when we calculated coordination numbers in the module, so it can be removed in this implementation. It may get reintroduced properly at a later date.

  2. DataNormaliser1D - I think what you've done here is the best route for now. We don't need the class to be very clever, so just taking pure numbers as input is fine. Probably also no need to have a base class since we're using it in code only for now.

  3. excludeSameMolecule flag - again, I believe you're right. In fact I'm surprised that it wasn't enabled by default in the module itself. Hey ho!

jws-1 and others added 2 commits February 1, 2024 17:34
Co-authored-by: Tristan Youngs <tristan.youngs@stfc.ac.uk>
@jws-1 jws-1 mentioned this pull request Feb 4, 2024
@jws-1 jws-1 mentioned this pull request Feb 4, 2024
5 tasks
@jws-1
Copy link
Member Author

jws-1 commented Feb 4, 2024

  1. Instantaneous - yes, you're right. This was left over from when we calculated coordination numbers in the module, so it can be removed in this implementation. It may get reintroduced properly at a later date.

I'm a tad confused! Do we not still calculate coordination numbers in this module?

@trisyoungs
Copy link
Member

  1. Instantaneous - yes, you're right. This was left over from when we calculated coordination numbers in the module, so it can be removed in this implementation. It may get reintroduced properly at a later date.

I'm a tad confused! Do we not still calculate coordination numbers in this module?

Hah. Not as confused as me apparently! The CN calculation is still there, of course!

Incidentally we have been talking about recombining HistogramCN into SiteRDF since it kinda makes sense to do so, but we can leave that as an additional refactoring afterwards (I see you have #1788 in).

@trisyoungs
Copy link
Member

Further to this, I just did a crude benchmark of the old vs new versions of the module and the gains are...... modest to say the least, with the old version clocking at 0.007 s/iter on my machine vs 0.0068 (at best) for the new. We can take positives in the fact that the old node-base system wasn't a complete overhead penalty, and the fact that we can easily go back in after all the modules are refactored and implement true parallelism.

@jws-1 jws-1 merged commit 2919e3d into develop Feb 11, 2024
10 checks passed
@jws-1 jws-1 deleted the siterdf-dev-analysis branch February 11, 2024 10:48
rprospero pushed a commit that referenced this pull request Mar 11, 2024
Co-authored-by: Tristan Youngs <tristan.youngs@stfc.ac.uk>
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.

None yet

2 participants