Support and discussions for Molcas and OpenMolcas users and developers
You are not logged in.
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".Dear OpenMolcas experts,
I would like to seek advice on how to properly combine two separate RasOrb files (e.g., from two ethylene monomers, each with a CAS(2,2) active space) into a single RasOrb file representing the dimer system. My goal is to study intermolecular interactions in larger dimer systems using GASSCF, where I aim to control the states of individual molecules (e.g., keeping one molecule in the ground state while exciting the other to S2). For large molecular dimers, selecting an active space can be a tedious and challenging task. In contrast, constructing the orbitals needed for GASSCF by combining the orbitals and active spaces of individual monomers seems far more convenient.
Specifically, I would like to know:
1. Pre-existing Methods: Does OpenMolcas provide built-in tools to merge RasOrb files for such purposes?
2. Custom Solutions: If no direct method exists, what would be a feasible implementation approach? I have basic Fortran programming skills and some familiarity with OpenMolcas’s codebase.
I greatly appreciate any guidance or references to relevant documentation. Thank you for your time and expertise!
Best regards,
Shuo
Offline
Not specifically merging RasOrb, but you can use the mort.py tool (in the Tools/mort directory, make sure you compile with TOOLS=ON). It can handle .h5 files to (a) translate/rotate monomer orbitals to a different orientation, and (b) transfer/project the orbitals from one basis set to another (this includes from the basis set of a monomer to the basis set of the dimer). A proof of concept:
&GATEWAY
Coord = 6
C 0.6579 -0.0045 0.0639
C -0.6579 0.0045 -0.0639
H 1.1610 0.0661 1.0238
H 1.3352 -0.0830 -0.7815
H -1.3355 0.0830 0.7812
H -1.1608 -0.0661 -1.0239
Basis = cc-pVDZ
Group = NoSym
RICD
&SEWARD
&RASSCF
Charge = 0
NActEl = 2
RAS2 = 2
> copy $Project.rasscf.h5 monomer.h5
&GATEWAY
Coord = 12
C 1.66084955 0.76988634 7.38142447
C 0.80774430 1.03922409 6.40807351
H 2.69236080 1.10968867 7.37685544
H 1.39460180 0.18824222 8.25914935
H 1.07359436 1.62078215 5.53022843
H -0.22372613 0.69931399 6.41283417
C 1.88250567 5.01510993 3.14583080
C 2.91234615 4.24860252 3.46148639
H 1.94853255 6.09670574 3.07307822
H 0.89250279 4.62104294 2.93558280
H 3.90244345 4.64226314 3.67181152
H 2.84610042 3.16702142 3.53419547
Basis = ANO-R2
Group = NoSym
RICD
&SEWARD
> copy $Project.guessorb.h5 dimer.h5
* Rotate and translate monomer 1
> shell $MOLCAS/Tools/mort/mort.py --rotate 0.57797866 0.32712949 0.74761418 -0.26357313 -0.79220056 0.55040665 0.77231462 -0.51517431 -0.37165248 --translate 2.33248314 1.70936161 13.0291873 monomer.h5 mono1.h5
* Rotate and translate monomer 2
> shell $MOLCAS/Tools/mort/mort.py --rotate -0.83439905 -0.18376450 0.51962374 0.50056636 0.14191785 0.85398632 -0.23067626 0.97267154 -0.02642980 --translate 4.53047838 8.75293971 6.24300995 monomer.h5 mono2.h5
* Transfer orbitals from monomer 1
> shell $MOLCAS/Tools/mort/mort.py --transfer occupied mono1.h5 dimer.h5
* Transfer orbitals from monomer 1
> shell $MOLCAS/Tools/mort/mort.py --transfer occupied mono2.h5 dimer.h5
&RASSCF
File = dimer.h5
Charge = 0
NActEl = 4
Unfortunately, the code is a bit (numerically) fragile and will complain about the orbitals not being orthonormal here. I had to disable the lines (in the Python code) that interrupt the calculation (replacing some "sys.exit" with "print"). If you have already individual calculations of the monomers in the final orientation and position, you may skip the first steps, and if they're all with the same basis set it may be more stable.
Offline
Dear Ignacio,
Thank you very much for your detailed guidance on handling orbital combination using the mort.py tool.
Best regards,
Shuo
Offline
In the latest version you can pass "--orth 1e-4" to the mort.py calls to avoid the errors.
Offline