nlesc-nano / auto-FOX

A library for analyzing potential energy surfaces (PESs) and using the resulting PES descriptors for constructing forcefield parameters.
GNU Lesser General Public License v3.0
9 stars 8 forks source link

ENH: Add the new `atom_pairs` keyword to `init_rdf` and `init_adf` #257

Closed BvB93 closed 2 years ago

BvB93 commented 2 years ago

cc @RobertaPascazio

Adds the new atom_pairs keyword, which allows one to explicitly specify atom-pairs/-triplets, rather than relying on the combinatorics of atom_subset.

Examples


>>> import FOX

>>> mol = FOX.MultiMolecule.from_xyz(FOX.example_xyz)
>>> rdf = mol.init_rdf(atom_pairs=[("Cd", "Cd"), ("Se", "Se")])

>>> print(rdf)
Atom pairs         Cd Cd     Se Se
r  /  Angstrom                    
0.00            0.000000  0.000000
0.05            0.000000  0.000000
0.10            0.000000  0.000000
0.15            0.000000  0.000000
0.20            0.000000  0.000000
...                  ...       ...
11.80           0.140340  0.339941
11.85           0.128992  0.346705
11.90           0.118136  0.337063
11.95           0.116133  0.339719
12.00           0.109914  0.335965

[241 rows x 2 columns]
codecov[bot] commented 2 years ago

Codecov Report

Merging #257 (1cc3824) into master (3c893ee) will decrease coverage by 0.05%. The diff coverage is 89.79%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #257      +/-   ##
==========================================
- Coverage   75.29%   75.23%   -0.06%     
==========================================
  Files          65       65              
  Lines        6945     6929      -16     
  Branches     1245     1247       +2     
==========================================
- Hits         5229     5213      -16     
+ Misses       1386     1385       -1     
- Partials      330      331       +1     
Impacted Files Coverage Δ
FOX/classes/multi_mol.py 72.23% <89.79%> (-0.55%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3c893ee...1cc3824. Read the comment docs.