sharc-md / sharc

The SHARC molecular dynamics (MD) program suite is an ab initio MD software package developed to study the excited-state dynamics of molecules.
https://www.sharc-md.org
GNU General Public License v3.0
59 stars 31 forks source link

Error using theodor #125

Open jakobcasa opened 5 days ago

jakobcasa commented 5 days ago

Dear all

I tried to use Theodor with SHARC, and with this, I have one question and one error to report: Question: Is it possible to use Theodore with LVC? As far as I understand, it is not possible in the NetCDF, but I am not sure when I used to print out the output normally (I know it is slower).

Error:

I am calculating the ICOND_00000, and the following error occurs:

Traceback (most recent call last): File "/storage/homefs/jc22p286/applications/sharc/bin/SHARC_ORCA.py", line 5289, in main() File "/storage/homefs/jc22p286/applications/sharc/bin/SHARC_ORCA.py", line 5244, in main QMin = readQMin(QMinfilename) ^^^^^^^^^^^^^^^^^^^^^^ File "/storage/homefs/jc22p286/applications/sharc/bin/SHARC_ORCA.py", line 2146, in readQMin QMin['theodir'] = get_sh2Orca_environ(sh2Orca, 'theodir', False, False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/storage/homefs/jc22p286/applications/sharc/bin/SHARC_ORCA.py", line 1720, in get_sh2Orca_environ LINE = line[1]


IndexError: list index out of range

Is there an easy fix for this? If you want to have a look at the folder, I'm happy to share it with you

Thank you, have a nice evening

Best Jakob
maisebastian commented 5 days ago

Hi Jakob, in SHARC 3, it is not possible to use TheoDORE with LVC. This is because it is somewhat complicated to do a basis transformation with the TheoDORE descriptors (e.g., from the diabatic parametrization basis to the current adiabatic basis). This might be a future feature, though.

About your error message, this appears to be a problem in getting the environment variable for $THEODIR. I recommend to explicitly add the path to the ORCA.resource file as theodir /your/path/to/theodore or theodir $THEODIR if you source TheoDORE's setpaths.bash before starting SHARC.

Best, Sebastian

jakobcasa commented 5 days ago

Dear Sebastian

Thank you for the information. Concerning the error I did this already here is the ORCA.reasources

orcadir /software.9/software/ORCA/5.0.3-gompi-2021b/bin/ scratchdir ./SCR/ICOND_00000// ncpu 16 schedule_scaling 0.800000 memory 4000 wfoverlap $SHARC/wfoverlap.x wfthres 0.998000 theodir /storage/homefs/jc22p286/TheoDORE/TheoDORE_3.1.1 theodore_prop ['Om', 'PRNTO', 'S_HE', 'Z_HE', 'RMSeh'] theodore_fragment []

But when I use $THEODIR the following Theodor error appears: Traceback (most recent call last): File "/storage/homefs/jc22p286/TheoDORE/TheoDORE_3.1.1/bin/analyze_tden.py", line 3, in from .theotools import timeit ImportError: attempted relative import with no known parent package

which tells me that the path is not quite correctly set, but when I do $THEODIR it shows me the same directory as above, also when I do theodore -h in the terminal it does give my:

================================================================================ TheoDORE 3.1.1 Theoretical Density, Orbital Relaxation and Exciton analysis
Author: Felix Plasser
Contributions by: L. Stojanovic, G. Hermann, S. Mai,
M.F.S.J. Menger, P. Kimber

References for the modules used (see also http://theodore-qc.sourceforge.net/literature.html)
Program citation:
F. Plasser, J. Chem. Phys. (2020), 152, 084108.

================================================================================

So, I assume it works fine, I also loaded the same modules in the submission script.

Best Jakob

maisebastian commented 5 days ago

I am not sure right now whether TheoDORE 3 will correctly work with SHARC. This is because in TheoDORE 3, all program features are called through theodore something rather than calling something.py itself. You might want to try to change the hardcoded call to analyze_tden.py at https://github.com/sharc-md/sharc/blob/3141f685b39c2546877859717035755b44387a73/bin/SHARC_ORCA.py#L4226 to the correct call. If that works, we can adapt the code to automatically detect the TheoDORE version and the calls in affected interfaces.

Best, Sebastian

jakobcasa commented 4 days ago

Dear Sebastian

Well, the file analyze_tden.py is in Theodore 3 in the following folder TheoDORE/TheoDORE_3.1.1/theodore/actions/

But what I did initially is just copying the "analyze_tden.py" into the bin directory since the, from there the import .action ... is working fine, instead of changing the path

I don't know if this helps. Which version was the last one that worked fine? Then I will download this one!

Best Jakob

maisebastian commented 4 days ago

Any TheoDORE 2.X should work with our interfaces. So I suggest you try the 2.4 that is on github.

Best, Sebastian

jakobcasa commented 4 days ago

Dear Sebastian

Thank you best, have a nice weekend

Jakob