-
Notifications
You must be signed in to change notification settings - Fork 189
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
add an observable for pairwise distance and an accumulator for contact times #5032
base: python
Are you sure you want to change the base?
Conversation
Thank you Pablo. This is a very useful addition.
In my impression, this would allow us to leave the observabl genuinely stateless (and avoid cirumenting teh them being const). All the state would be in the accumulator. Should we do a short video call, to discuss? |
Hi Rudolf! The solution you propose makes sense to me, the "hack" I had to do felt a bit against the current phylosophy of the observable/accumulator framework. I am simply not too familiar with the c++ core of the accumulators/observables so I did not want to tinker with it too much. I think I got myself somewhat familiar now with the observable framework, so I can try to refactor the feature to match what you propose. Regarding the videocall, sounds good. I will send you an e-mail so we can schedule a time 😄 |
@jngrad I have the PR mostly ready for review, but my test is skipped by the CI for some reason. Do you know why?
|
The class is missing a |
a38417e
to
cbea26c
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
cbea26c
to
f1794e6
Compare
@pm-blanco I think something went wrong during the rebase. Could you please try this? git reset --soft upstream/python # rewind changes accidentally taken from the python branch
git commit -m 'Add contact time observable'
git show # here carefully inspect the diff to make sure it only contains your feature
git push -f If this doesn't help, use |
Added:
observables.PairwiseDistances
: an observable that tracks pairwise distances between two sets of particles.accumulators.ContactTimes
: an accumulator that tracks contact times within contact threshold for a set of input distances.samples\contact_time.py
: a sample script showcasing how to use these new features.The contact time is defined as:
where$t_f$ is the last measured time at which those particles were in contact and $t_0$ the first measured time at which those particles were in contact. For example, if two particles have been only in contact during two consecutive configuration then their contact time is $\tau = dt$ , where $dt$ is the time step. If they are only in contact for a single configuration then their contact time is $\tau = 0$ .