From 49a5ff3769259438cc75d6b14e2e0fad8929d3f5 Mon Sep 17 00:00:00 2001 From: Sebastian Mai Date: Thu, 6 Jun 2024 07:59:25 +0200 Subject: [PATCH 1/4] SHARC_MOLCAS.py: pold keyword in alaska for OpenMolcas >=v24.0 --- bin/SHARC_MOLCAS.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/SHARC_MOLCAS.py b/bin/SHARC_MOLCAS.py index a301f30..9aed423 100755 --- a/bin/SHARC_MOLCAS.py +++ b/bin/SHARC_MOLCAS.py @@ -3173,6 +3173,8 @@ def writeMOLCASinput(tasks, QMin): elif task[0] == 'alaska': string += '&ALASKA\n' + if QMin['version'] >= 24.0: + string+='pold\n' if len(task)==2: string+='root=%i\n' % (task[1]) elif len(task)==3: From 77b6ed209fcd8adfefee869324dbfc23305457dc Mon Sep 17 00:00:00 2001 From: Sebastian Mai Date: Wed, 12 Jun 2024 08:07:13 +0200 Subject: [PATCH 2/4] SHARC_MOLCAS.py: added line to copy Do_Rotate.txt to savedir --- bin/SHARC_MOLCAS.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/SHARC_MOLCAS.py b/bin/SHARC_MOLCAS.py index 9aed423..92a552f 100755 --- a/bin/SHARC_MOLCAS.py +++ b/bin/SHARC_MOLCAS.py @@ -2756,6 +2756,8 @@ def gettasks(QMin): if not 'init' in QMin: tasks.append(['rm', 'JOBOLD']) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + if QMin['method']==5 and QMin['pdft-functional'] > -1: + tasks.append(['copy','Do_Rotate.txt',os.path.join(QMin['savedir'],'Do_Rotate.%i.txt' % (imult+1))]) if 'ion' in QMin: tasks.append(['copy', 'MOLCAS.RasOrb', 'MOLCAS.%i.RasOrb' % (imult + 1)]) if 'molden' in QMin: From 7d871903da88159cb00d0497b3868a2f2c8cb78f Mon Sep 17 00:00:00 2001 From: Sebastian Mai Date: Thu, 20 Jun 2024 08:24:51 +0200 Subject: [PATCH 3/4] QMout_print.py: -L option for one-line print formatting --- bin/QMout_print.py | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/bin/QMout_print.py b/bin/QMout_print.py index 1f12744..25f0b99 100755 --- a/bin/QMout_print.py +++ b/bin/QMout_print.py @@ -285,6 +285,7 @@ def main(): parser.add_option('-D', dest='D', action='store_true', help="Diagonalize") parser.add_option('-S', dest='S', type=int, nargs=1, default=1, help="Initial state (Lowest=1)") parser.add_option('-t', dest='t', type=int, nargs=1, default=0, help="0 (default): for QM.out containing h,dm; 1: for QM.out containing only h") + parser.add_option('-L', dest='L', action='store_true', help="Format in a single line") #parser.add_option('-n', dest='n', type=int, nargs=1, default=3, help="Number of geometries to be generated (integer, default=3)") #parser.add_option('-r', dest='r', type=int, nargs=1, default=16661, help="Seed for the random number generator (integer, default=16661)") @@ -331,11 +332,13 @@ def main(): else: print("Target not defined.") exit() - sys.stderr.write('%s %i %i %s\n' % (qmoutfile, QMin['nmstates'], QMin['natom'], target_list)) + if not options.L: + sys.stderr.write('%s %i %i %s\n' % (qmoutfile, QMin['nmstates'], QMin['natom'], target_list)) QMout = read_QMout(qmoutfile, QMin['nmstates'], QMin['natom'], target_list) - sys.stderr.write('Number of states: %s\n' % (states)) - sys.stderr.write('%5s %11s %16s %12s %12s %6s\n' % ('State', 'Label', 'E (E_h)', 'dE (eV)', 'f_osc', 'Spin')) + if not options.L: + sys.stderr.write('Number of states: %s\n' % (states)) + sys.stderr.write('%5s %11s %16s %12s %12s %6s\n' % ('State', 'Label', 'E (E_h)', 'dE (eV)', 'f_osc', 'Spin')) if options.D: h, dm, U = transform(QMout['h'][0], QMout['dm'], None) @@ -379,7 +382,8 @@ def main(): else: de = (e - energies[0]) * HARTREE_TO_EV string = '%5i %10s%02i %16.10f %12.8f %12.8f %6.4f' % (istate + 1, IToMult[ist[0]][0], ist[1] - (ist[0] <= 2), e, de, fosc[-1], spin) - print(string) + if not options.L: + print(string) else: for istate in range(QMin['nmstates']): e = QMout['h'][0][istate][istate].real @@ -405,8 +409,27 @@ def main(): string = '%5i %10s%02i %16.10f %12.8f %12.8f %6.4f' % (istate + 1, IToMult[m][0], s - (m <= 2), e, de, fosc[-1], m) if istate == initial: string += ' #initial state' - print(string) - + if not options.L: + print(string) + + if options.L: + cwd=os.getcwd().split('/')[-1].split('_')[-1] + + string = '%s ' % (cwd) + for i,e in enumerate(energies): + if not options.D: + m, s, ms = QMin['statemap'][i + 1] + if -2 * ms + 1 != m: + continue + string += '%16.10f ' % e + for i,f in enumerate(fosc): + if not options.D: + m, s, ms = QMin['statemap'][i + 1] + if -2 * ms + 1 != m: + continue + string += '%12.8f ' % f + #string += '\n' + print(string) From 279df910c0816a82d4fd22c168fc48589e9d695f Mon Sep 17 00:00:00 2001 From: Sebastian Mai Date: Mon, 1 Jul 2024 07:54:12 +0200 Subject: [PATCH 4/4] setup_traj.py: fixed second typo for option ngt --- bin/setup_traj.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/setup_traj.py b/bin/setup_traj.py index c4fb59b..d325d2f 100755 --- a/bin/setup_traj.py +++ b/bin/setup_traj.py @@ -1383,7 +1383,7 @@ def get_general(): print('Please input one of the following: %s!' % ([i for i in cando])) INFOS['gradcorrect'] = gct possible = ('nacdr' in Interfaces[INFOS['interface']]['features']) - if GradCorrect[gct]['name'] == 'ngh' and not possible: + if GradCorrect[gct]['name'] == 'ngt' and not possible: print('... but interface cannot provide non-adiabatic coupling vectors, turning option off.') INFOS['gradcorrect'] = 1 else: