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 a new recipe for interconverting between .gro and .xyz #294

Closed BvB93 closed 1 year ago

BvB93 commented 1 year ago

Closes https://github.com/nlesc-nano/auto-FOX/issues/292

Adds a new recipe for converting .xyz to .gro files and vice versa.

Examples

Available under the FOX.recipes namespace:

from FOX.recipes import gro_to_xyz, xyz_to_gro

gro_file: str = ...
xyz_file: str = ...
gro_to_xyz(gro_file, xyz_file)
xyz_to_gro(xyz_file, gro_file)

Also available directly from the command line via the FOX.recipes.xyz_to_gro entry point:

> FOX.recipes.xyz_to_gro file.xyz file.gro
codecov[bot] commented 1 year ago

Codecov Report

Merging #294 (08bb6ad) into master (d567352) will decrease coverage by 0.11%. The diff coverage is 62.33%.

@@            Coverage Diff             @@
##           master     #294      +/-   ##
==========================================
- Coverage   71.52%   71.42%   -0.11%     
==========================================
  Files          68       69       +1     
  Lines        7495     7569      +74     
  Branches     1598     1609      +11     
==========================================
+ Hits         5361     5406      +45     
- Misses       1764     1787      +23     
- Partials      370      376       +6     
Impacted Files Coverage Δ
FOX/recipes/_xyz_to_gro.py 57.50% <57.50%> (ø)
FOX/utils.py 79.00% <62.50%> (-0.77%) :arrow_down:
FOX/classes/multi_mol.py 69.23% <64.00%> (-0.16%) :arrow_down:
FOX/classes/multi_mol_magic.py 88.88% <100.00%> (ø)
FOX/recipes/__init__.py 100.00% <100.00%> (ø)