Add Correlator CLI and defaults#388
Conversation
ElliottKasoar
left a comment
There was a problem hiding this comment.
Mostly minor comments/tidying up, but looks good so far, thanks!
3703c08 to
6ec223a
Compare
There was a problem hiding this comment.
A couple of places where I don't think the type hints are needed anymore, but generally looks good.
Could you add an example to the CLI docs (with a line or two describing roughly the composition, since it's not obvious)?
I think we still want a bit more testing on the different ways of specifying things too.
f33fef9 to
75651ab
Compare
|
will be nice to have this in for training |
There was a problem hiding this comment.
In the summary, a couple of the outputs haven't been properly parsed by the tuple and dict conversion utils. Can you try to have a look? E.g.
correlation_kwargs: !!python/object:janus_core.cli.types.TyperDict
value:
vaf:
a: Velocity
a_kwargs: &id001
atoms_slice: !!python/tuple
- 0
- null
- 2
b_kwargs: *id001
points: 100
(Paths should be converted to strings, and tuples to lists, with a couple of functions called in cli/utils/start_summary.)
Also worth rebasing again, to check the output file changes don't clash.
Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
Also copy Observable kwargs if not specified and copying observable
Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
Check for unexpected correlation_kwargs
9bb6473 to
7722414
Compare
Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
janus_core.processing.observables.blocks=1,points=1,averaging=1andupdate_frequency=1injanus_core.processing.correlator.Correlation.Velocity(all components, all atoms)md.py.Last thing to do is add text in the user_guide
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
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]