Adds post-process cli guide, specifying vafs by element name#400
Adds post-process cli guide, specifying vafs by element name#400ElliottKasoar merged 15 commits intostfc:mainfrom
Conversation
There was a problem hiding this comment.
Looks helpful, thanks! The documentation is great!
Added a few minor comments from a quick first look.
Quick question that's related, but not new to this: do you think we may want to rename filter_atoms to atoms_filter? To me, filter_atoms sounds more like a boolean.
Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
I can see that yes so might as well unless anyone can think of a better name |
Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
ElliottKasoar
left a comment
There was a problem hiding this comment.
I think we might want to handle invalid symbols more nicely. If I ask for "abc" instead of "Cl":
janus md --ensemble nve --struct tests/data/NaCl.cif --steps 100 --traj-every 10 --post-process-kwargs "{'vaf_compute': True, 'vaf_atoms': (('abc',), ('Cl',)), 'vaf_output_files': ('vaf_na.dat', 'vaf_cl.dat')}"I get TypeError: 'numpy.float64' object is not iterable, which is quite strange.
harveydevereux
left a comment
There was a problem hiding this comment.
fix user guide typos
fix user guide typos Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
now checked, and also in tests should recieve ValueError: {'abc'} not allowed in VAF, allowed symbols are {'Cl', 'Na'} |
I found I could not easily request partial VAFs on the CLI by element names (or StartStopStep likes). But instead would have to write all the indices down, which can be automated in shell but is quite unwieldy. So I implemented selecting vaf atoms by element name. Hopefully a useful addition.
Partial VAFs can be obtained in the CLI like so,
janus md --ensemble nve --struct tests/data/NaCl.cif --steps 100 --traj-every 10\ --post-process-kwargs "{'vaf_compute': True, 'vaf_atoms': (('Na',), ('Cl',)), 'vaf_output_files': ('vaf_na.dat', 'vaf_cl.dat')}"where 'Na' and 'Cl' are expanded to indices of those elements in the trajectory.
Also add some documentation for post-processing.