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 2016-09-18 20:23:58

josejc
Member
Registered: 2016-09-18
Posts: 9

how use slapaf with external energy, geometry and gradient data

Hello

Is it possible use the slapaf module, providing the energy, geometry and gradient data manually at each iteration?. My idea is run a bash script after the slapaf module for obtain these quantities (from another program) and arrange them in the proper format.

If the above answer is yes, How I can assign these data to the variables used by slapaf? (Perhaps with a EMIL commands?)


José

Offline

#2 2016-09-19 13:55:21

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

Re: how use slapaf with external energy, geometry and gradient data

No, that's currently not possible. SLAPAF takes the information from the RunFile, it would be possible to write a small program or utility to put it into the RunFile for SLAPAF to read, but there's nothing like that now as far as I know, you'd have to write it yourself or "hire" someone to do it for you wink

Offline

#3 2016-09-19 22:40:10

josejc
Member
Registered: 2016-09-18
Posts: 9

Re: how use slapaf with external energy, geometry and gradient data

Thank you very much for your reply. Looking in the "scr" molcas folder (molcas80/scr), i found that it's possible enter the energy and gradient data in the RunFile through the routines "Put_Grad" and "Put_dScalar" (molcas80/src/runfile_util). Assume the following input:

&GATEWAY
coord=example.xyz
basis=STO-3G
Group=Nosym
&SEWARD
> ./initial_energy_grad.o

>>  FOREACH  ITER  in  (1  ..  1000)
   &SLAPAF
   MEP-search
   MEPStep=0.02

   > ./update_energy_grad.o
>  EndDo

Where "./update_geo_grad.o" and "update_energy_grad.o" are the executables that introduce in the RunFile the energy and gradients data obtained by an external program. If the above input is correct, the problem is reduced to define the arrays and variables that contain the data and introduce them to the routines "Put_Grad" and "Put_dScalar" defined in "update_energy_grad.o", etc.

My questions are:
1) is the above procedure correct?, or, there are more variables that must be defined in the RunFile between each slapaf invocation?

2) In case of be wrong, what would be the right way to enter these variables in the RunFile ?.

3) Is there any way to get the RunFile as a plain text file? (I guess it's printed as unformatted data with fortran), because thereby would be possible see it's structure and may be easier to modify.

Last edited by josejc (2016-09-19 22:42:16)

Offline

#4 2016-09-20 09:20:44

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

Re: how use slapaf with external energy, geometry and gradient data

josejc wrote:

1) is the above procedure correct?, or, there are more variables that must be defined in the RunFile between each slapaf invocation?

I'd use a different structure:

&GATEWAY
coord=example.xyz
basis=STO-3G
Group=Nosym
&SEWARD

>>  EXPORT MOLCAS_MAXITER = 1000
>>  DoWhile

   > UNIX ./update_energy_grad.exe

   &SLAPAF
   MEP-search
   MEPStep=0.02

>  EndDo

Use a DoWhile loop for optimizations, use the "UNIX" EMIL command for executing external commands (deprecated in future versions, use EXEC or SHELL there, and note that the command is run from $WorkDir), leave SLAPAF as the last thing before EndDo (it signals convergence), "update_energy_grad.exe" should read the geometry from the RunFile and write energy and gradient.

This is all theoretical and untested, there may be other things needed and other gotchas...

2) In case of be wrong, what would be the right way to enter these variables in the RunFile ?.

"Put_*Scalar" and "Put_*Array" are the generic routines you could use to store data in the RunFile, "Put_Grad" is simply a convenience wrapper.

3) Is there any way to get the RunFile as a plain text file? (I guess it's printed as unformatted data with fortran), because thereby would be possible see it's structure and may be easier to modify.

There is a rf2asc directory in Tools, but it is unmaintained and will probably not work out of the box...

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 13:49:48