exa-analytics / exatomic

A unified platform for theoretical and computational chemists
https://exa-analytics.github.io/exatomic
Apache License 2.0
19 stars 12 forks source link

WIP: Atom two frame #212

Closed herbertludowieg closed 2 years ago

herbertludowieg commented 3 years ago

This will close #205 and close #211

This adds some new methods to the atom_two table that will make use of the new frame column and the change to the atom0 and atom1 indexing. The get_bond method will get the bond distance between any two referenced atoms over the different frames. The use of this can be in a geometry optimization to track a bond distance over the course of the optimization.

Things left to do:

For testing:

>>> from exatomic import gaussian
>>> from exatomic.base import resource
>>> uni = gaussian.Output(resource('g16-methyloxirane-def2tzvp-opt.out')).to_universe()
>>> print(uni.atom_two.get_bond(0, 1, unit='Angstrom').to_string())
             dr atom0 atom1  bond    change
frame                                      
0      1.424108     0     1  True  0.000000
1      1.442681     0     1  True  0.018573
2      1.454052     0     1  True  0.011372
3      1.455723     0     1  True  0.001671
4      1.455893     0     1  True  0.000170
5      1.455827     0     1  True -0.000066
6      1.455812     0     1  True -0.000015
7      1.455823     0     1  True  0.000011
8      1.455837     0     1  True  0.000014
9      1.455842     0     1  True  0.000004
10     1.455839     0     1  True -0.000003
11     1.455837     0     1  True -0.000002