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 2024-03-06 15:38:07

jacarga
Member
Registered: 2024-02-06
Posts: 6

Question regarding variables in ZMAT input

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

#2 2024-03-06 16:51:41

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

Re: Question regarding variables in ZMAT input

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

#3 2024-03-06 18:26:28

jacarga
Member
Registered: 2024-02-06
Posts: 6

Re: Question regarding variables in ZMAT input

Thank you Ignacio for clarifying it!

Offline

#4 2024-03-18 15:39:14

valera
Administrator
Registered: 2015-11-03
Posts: 124

Re: Question regarding variables in ZMAT input

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 smile

 >export A=7
 >eval B=$A+7
 >echo $B

Offline

#5 2024-03-20 11:01:39

jacarga
Member
Registered: 2024-02-06
Posts: 6

Re: Question regarding variables in ZMAT input

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 smile
Javier

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 09:10:02