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

69 read general orca data such as file structure input settings version etc #71

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
94a3caf
Started working on reading ORCA calculations. Currently supports read…
YHordijk Dec 10, 2023
8db5307
Added reading of calculation status, should be expanded later
YHordijk Dec 10, 2023
75ece3d
Reading molecules now too, both input and output
YHordijk Dec 10, 2023
4368551
fixing ruff errors
YHordijk Dec 10, 2023
c5890b9
Added reading of ORCA by calling TCutility.result.read
YHordijk Dec 10, 2023
19487a5
Added reading of energies
YHordijk Dec 10, 2023
c6b8d21
Fixed an issue with reading calculations using xyzfile
YHordijk Dec 10, 2023
9b32077
Added reading of vibrational data
YHordijk Dec 10, 2023
cb93695
Formatting changes
YHordijk Dec 10, 2023
8e82f08
Ignoring a ruff error
YHordijk Dec 10, 2023
8e38fc1
Ignoring a ruff error
YHordijk Dec 10, 2023
6b63eb9
Merge pull request #70 from TheoChem-VU/main
YHordijk Dec 10, 2023
3b607e8
Now determining level of theory from an ORCA calculation
YHordijk Dec 11, 2023
6c26fbb
Added some calculation settings for orca specifically
YHordijk Dec 11, 2023
b517246
Added some calculation settings for orca specifically
YHordijk Dec 11, 2023
d07227c
Added test-cases for reading of ORCA calculations
YHordijk Dec 11, 2023
e7bad81
Added check before trying to read vibrational data
YHordijk Dec 11, 2023
414fdaa
Added calculation of spin-contamination
YHordijk Dec 11, 2023
83eafda
Changed removeprefix to strip to support python 3.8 and 3.7
YHordijk Dec 11, 2023
95da442
Added documentation to all functions
YHordijk Dec 11, 2023
cfe054a
Added documentation to all functions
YHordijk Dec 11, 2023
cb8c345
Fixed some function descriptions
YHordijk Dec 12, 2023
3d8d0dd
Fixed an issue where molecules were not being read
YHordijk Dec 12, 2023
ce7851e
Fixed an issue where molecules were not being read
YHordijk Dec 12, 2023
0ca5b71
Removed cc-pVSZ and added cc-pV5Z
YHordijk Dec 12, 2023
d78a0f0
If the job does not construct a new output molecule, simply set it as…
YHordijk Dec 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions TCutility/results/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,22 @@
from . import result
Result = result.Result

from . import adf, dftb, ams, cache # noqa: E402
from . import adf, dftb, ams, orca, cache # noqa: E402
import os # noqa: E402


def get_info(calc_dir: str):
try:
return ams.get_ams_info(calc_dir)
except: # noqa
pass

try:
return orca.get_info(calc_dir)
except: # noqa
raise


def read(calc_dir: str) -> Result:
'''Master function for reading data from calculations. It reads general information as well as engine-specific information.

Expand All @@ -25,16 +37,24 @@ def read(calc_dir: str) -> Result:
dictionary containing information about the calculation
'''
ret = Result()
ret.update(ams.get_ams_info(calc_dir))
ret.update(get_info(calc_dir))
if ret.engine == 'adf':
ret.adf = adf.get_calc_settings(ret)
ret.properties = adf.get_properties(ret)
ret.level = adf.get_level_of_theory(ret)
elif ret.engine == 'dftb':
ret.dftb = dftb.get_calc_settings(ret)
ret.properties = dftb.get_properties(ret)
elif ret.engine == 'orca':
ret.orca = orca.get_calc_settings(ret)
ret.properties = orca.get_properties(ret)

# unload cached KFReaders associated with this calc_dir
to_delete = [key for key in cache._cache if key.startswith(os.path.abspath(calc_dir))]
[cache.unload(key) for key in to_delete]
return ret


if __name__ == '__main__':
res = read('/Users/yumanhordijk/Library/CloudStorage/OneDrive-VrijeUniversiteitAmsterdam/RadicalAdditionBenchmark/data/abinitio/P_C2H2_NH2/OPT_pVTZ')
print(res.molecule)
Loading