Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic writing of coordinates in SI files #65

Closed
YHordijk opened this issue Nov 14, 2023 · 0 comments · Fixed by #67
Closed

Add automatic writing of coordinates in SI files #65

YHordijk opened this issue Nov 14, 2023 · 0 comments · Fixed by #67
Assignees
Labels
enhancement New feature or request

Comments

@YHordijk
Copy link
Contributor

It would be nice to have a function/module for writing results to a word file, for example for supporting information files.
I propose to add a new module, TCutility.report, that will be responsible for generating these files. I think the following syntax would be nice:

from TCutility import report, results

with report.SI('path/to/si.docx', 'w+') as si:
    si.add_section('Description of following systems')
    res = results.read('path/to/calc')
    si.write_xyz(res, 'name of mol')
    res2 = results.read('path/to/second/calc')
    si.write_xyz(res2, 'name of second mol')

It might also be nice to load a calculation if the path is given instead of a Result object:

from TCutility import report, results

with report.SI('path/to/si.docx', 'w+') as si:
    si.add_section('Description of following systems')
    si.write_xyz('path/to/calc', 'name of mol')
    si.write_xyz('path/to/second/calc', 'TS: F— + CH3F')

This should yield something like:

File: path/to/si.docx

Description of following systems

name of mol
E = —639.8 kcal mol—1
G = —632.6 kcal mol—1
H = —612.0 kcal mol—1

C      0.00000000     0.00000000     0.37180722
F     -0.00000000    -0.00000000     1.82698320
H     -0.51522847    -0.89240188     0.02344328
H     -0.51522847     0.89240188     0.02344328
H      1.03045693     0.00000000     0.02344328
F     -0.00000000    -0.00000000    -2.26912024

TS: F + CH3F
E = —631.7 kcal mol—1
G = —623.2 kcal mol—1
H = —605.0 kcal mol—1
νimag = 403i cm—1

C      0.00000000     0.00000000     0.00000000
F     -0.00000000    -0.00000000     1.86154599
H      0.53782492     0.93154009     0.00000000
H      0.53782492    -0.93154009     0.00000000
H     -1.07564984    -0.00000000     0.00000000
F     -0.00000000    -0.00000000    -1.86154599
@YHordijk YHordijk added the enhancement New feature or request label Nov 14, 2023
@YHordijk YHordijk self-assigned this Nov 14, 2023
@YHordijk YHordijk linked a pull request Nov 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant