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 #388

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

Conversation

harveydevereux
Copy link
Collaborator

Still a work in progress.

todo:

  • documentation
  • defaults (and in python interface)
  • example
  • more robust test
  • StressShear and StressHydrostatic
  • the names blocks, points, and averaging could be more descriptive perhaps, they control coarsening in time.

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]

Comment on lines +332 to +335
if name.lower() == "velocity":
return Velocity(**kwargs)
if name.lower() == "stress":
return Stress(**kwargs)
Copy link
Member

Choose a reason for hiding this comment

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

Did we not want getattr here to get anything defined in janus_core.processing.observables, rather than manually listing them?

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