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

Add Correlator CLI and defaults #388

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

Conversation

harveydevereux
Copy link
Collaborator

@harveydevereux harveydevereux commented Jan 21, 2025

  • Adds CLI arguments for requesting correlations defined in janus_core.processing.observables.
  • Adds default values for blocks=1, points=1, averaging=1 and update_frequency=1 injanus_core.processing.correlator.Correlation.
  • Add default for Velocity (all components, all atoms)
  • Fixes docstring in md.py.

Still a work in progress.

todo:

  • documentation/ example

Currently this is example functionality

janus md \
--ensemble nve --struct tests/data/NaCl.cif \
--steps 10 --correlation-kwargs \
"{'vaf1': {'a': 'velocity', 'points': 10}, 'vaf_x': {'a': 'velocity', 'update_frequency': 2, 'points': 10, 'a_kwargs': {'components': ['x']}, 'b_kwargs': '.'}}"

Syntax

  • If one of 'a' and 'b' is omitted it is duplicated.
  • The special "ditto" kwarg value "." indicates copying the kwargs.
  • 'blocks', 'points' etc have defaults which are not thought out yet.

it results in

cat NaCl-nve-T300.0-cor.dat
vaf1:
  lags: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]
  value: [0.0005823628861742493, 0.0005829660336725057, 0.0005832862278350698, 0.0005833234400626741,
    0.0005830778925578795, 0.0005825500577781349, 0.0005817406577431897, 0.0005806506631988626,
    0.0005792812926375899, 0.0005776340111746314]
vaf_x:
  lags: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0]
  value: [0.0005445815119304412, 0.0005449602181734653, 0.0005449448511073212, 0.0005445360209632227,
    0.0005437350402279519, 0.0005425439175493092]

@ElliottKasoar ElliottKasoar added the enhancement New/improved feature or request label Jan 22, 2025
@ElliottKasoar ElliottKasoar linked an issue Jan 22, 2025 that may be closed by this pull request
@harveydevereux harveydevereux changed the title Add Correlator CLI Add Correlator CLI and defaults Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New/improved feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support the online correlator in the cli
2 participants