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".Pages: 1
Dear MOLCAS users,
I have performed rigid scan calculations using the ZMAT input for the geometry specifications, varying one of the bond lengths using a shell variable named $BOND. Thus, my gateway section of my inputs looks like this:
&gateway
RICD
expert
XBAS=ANO-RCC-VTZP
ZMAT
Hg1
Br2 1 $BOND
X3 1 1.00000 2 90.000
Br4 1 2.42700 3 90.000 2 180.000
End of z-matrix
AngMom
0.00 0.00 0.00
AMFI
Then, I have a loop of this kind in my submission script
for BOND in $(LANG=en_US; seq 2.427 0.1 4.027); do
export BOND
pymolcas $HomeDir/$Project.inp > $WorkDir/${Project}_${BOND}.log 2> $TempDir/${Project}_${BOND}.err
cp $WorkDir/${Project}_${BOND}.log $HomeDir
done
In principle, this has worked fine for me, and the resulting output shows the correct Hg-Br distance passed through the shell variable. However, as I was checking the ZMAT keyword in the manual, i found the following sentence:
"Only numerical values must be used (no variable names) and ångströms and degrees are assumed as units."
I just wanted to ask if this refers to variables as when you define z-matrixes in other softwares in which you use b1, a1, b2, a2, which you define after, or if there is any problem on using also shell variables (or using EMIL commands) with ZMAT.
Thank you beforehand and best regards,
Javier
Last edited by jacarga (2024-03-06 15:46:28)
Offline
As far as I know, it refers to proper in-program variables, and not environment variables. Environment variables are replaced by the driver before GATEWAY (or any other program) can see them.
Offline
Thank you Ignacio for clarifying it!
Offline
jacarga, there are several Z-matrix formats. Gaussian Z-matrix allows to use variables, but Molcas implementation - does not, only numbers.
Ignacio, strictly speaking, EMIL substitutes, not only environment variables, but also variables, defined in EMIL itself
In the example below, neither A, or B is an environment variable
>export A=7
>eval B=$A+7
>echo $B
Offline
Thank you very much Valera for the clarification. I was a bit confused on which type of "variables" the manual referred to, but it is clear now that variables defined within EMIL and environment variables, if they hold numbers, can be used on the Z-matrix definition as they will be replaced before GATEWAY reads them.
Thank you again and best regards
Javier
Offline
Pages: 1