Molcas Forum

Support and discussions for Molcas and OpenMolcas users and developers

You are not logged in.

Announcement

Welcome to the Molcas forum.

Please note: The forum's URL has changed. The new URL is: https://molcasforum.univie.ac.at. Please update your bookmarks!

You can choose an avatar and change the default style by going to "Profile" → "Personality" or "Display".

#1 2025-06-17 21:29:50

andrewshyichuk
Member
Registered: 2020-02-13
Posts: 93

Run pymolcas without validation?

Dear Community,

I sometimes use oddly huge inputs with millions of charges - which results in pymolcas running for hours.
That is especially funny if my calculation will be running much shorter than that.

In case I know my input is correct - I'd like to be able to skip whatever pymolcas is doing and just send the input to parnell.

Any way to do that?

Thank you

Best regards

Offline

#2 2025-06-18 08:35:34

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,124

Re: Run pymolcas without validation?

Not directly. It's not really validation that slows things down, but just parsing the input to figure out where each program input starts and end, EMIL commands, loops, etc.

If your charges are in an XFIELD keyword, the easiest is simply putting them in a file, and passing the file name as the keyword value (i.e. XFIELD = filename). You'll have to specify the file location ($CurrDir probably) or copy the file to $WorkDir, and remove comments inside.

You could also try a not fully developed feature that allows you to use an input file in Python format. Something like:

rc = MOLCAS.run_module('gateway','''
  Coord = 2

    H 0.0 0.0 0.0
    H 0.7 0.0 0.0
  Basis = STO-3G
  Group = NoSym
''')

with MOLCAS.Loop():
  repeat = True
  while (repeat):
    rc = MOLCAS.run_module('seward','')
    rc = MOLCAS.run_module('scf','')
    rc = MOLCAS.run_module('slapaf','')
    repeat = (MOLCAS.rc_to_name(rc) == '_RC_CONTINUE_LOOP_')

which is roughly equivalent to:

&GATEWAY
  Coord = 2

    H 0.0 0.0 0.0
    H 0.7 0.0 0.0
  Basis = STO-3G
  Group = NoSym

>>> DoWhile
&SEWARD
&SCF
&SLAPAF
>>> EndDo

Just use the above input as a normal input file (e.g. "pymolcas -f H2.py"). If you have comments in your input file, you may need to rewrite them as Python comments instead of EMIL comments.

Eventually, you can also run the programs (seward.exe, scf.exe, etc.) manually, but then you're responsible for setting the environment correctly (MOLCAS, MOLCAS_MEM, WorkDir, etc.), and putting the right files in the right places.

Offline

#3 2025-06-18 10:07:18

andrewshyichuk
Member
Registered: 2020-02-13
Posts: 93

Re: Run pymolcas without validation?

Thank you, this is great!
Works with $CurrDir/<xf_file>, no pymolcas delay.

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 23:19:32