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

Print MOLCAS orbitals at each step #162

Open
AlfonsoAnnarelli opened this issue Nov 11, 2024 · 3 comments
Open

Print MOLCAS orbitals at each step #162

AlfonsoAnnarelli opened this issue Nov 11, 2024 · 3 comments

Comments

@AlfonsoAnnarelli
Copy link

Dear developers,
I am running a single trajectory with CASSCF from the Openmolcas interface.
Since the total energy during the dynamics is no longer conserved, I would ask if it is possible to store the Molcas output files (mainly the RasOrb and rasscf.molden files) at each iteration of the dynamics.
Thank you.

@maisebastian
Copy link
Collaborator

Dear Alfonso,
this functionality is unfortunately not directly in the Molcas interface (it will be there in a transparent way in the next release). However, you can relatively easily implement that yourself:

  1. One option is to simply add some Bash code to the QM/runQM.sh script. This script is called in each time step from sharc.x and launches SHARC_MOLCAS.py. You could add some lines after the Python call to, e.g., cp ../restart/*.molden ....
  2. Alternatively, you could add the corresponding code directly to the Python code. I suggest that you place it after https://github.com/sharc-md/sharc/blob/main/bin/SHARC_MOLCAS.py#L3689, because the call to saveJobIphs stores the JobIph and molden files in the savedir.
    In general, note that SHARC does not keep the RasOrb files, but rather the JobIph files, because they contain the wave functions in addition to the orbitals, which are both needed in RASSI, and for RASSCF restarting both types of files could be used.

Best,
Sebastian

@AlfonsoAnnarelli
Copy link
Author

Thank you very much!
Is there also a similar way to access (and store) the MOLCAS.out file created at each iteration in the scratch directory before it is deleted?

@maisebastian
Copy link
Collaborator

That is easier possible from within SHARC_MOLCAS.py. The best point in the code is within the loop in collectOutputs (https://github.com/sharc-md/sharc/blob/main/bin/SHARC_MOLCAS.py#L3722), which processes all the MOLCAS.out files (in SHARC_MOLCAS.py, there might be multiple independent/sequential/parallel calculations to get different multiplicities and gradients).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants