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 2015-12-09 16:04:01

wangjun
Member
Registered: 2015-12-09
Posts: 26

[SOLVED] error of non-adiabatic dynamics

Hi, all. 

I am new to MOLCAS. I am trying to use DYNAMIX module to do non-adiabatic dynamics now.  The job was terminated after serval time steps.
The error information is,

       
MATRIX ELEMENTS WILL BE COMPUTED FOR THE FOLLOWING ONE-ELECTRON OPERATORS, UNLESS ZERO BY SYMMETRY.
   (Herm=Hermitian, Anti=Antihermitian, Sing=Singlet operator, Trip=Triplet operator)
     MLTPL  1   1 (HERMSING)     MLTPL  1   2 (HERMSING)     MLTPL  1   3 (HERMSING)
  A Hamiltonian matrix over spin-free states will be computed.

       EIGENSTATES OF SPIN-FREE HAMILTONIAN WILL BE COMPUTED
  SO coupling elements will be added.
       EIGENSTATES OF SPIN-ORBIT HAMILTONIAN WILL BE COMPUTED
        MATRIX ELEMENTS OVER SPIN EIGENSTATES FOR:
     MLTPL  1   1 (HERMSING)     MLTPL  1   2 (HERMSING)     MLTPL  1   3 (HERMSING)

  Nr of states:                    2

   State:       1  2
  JobIph:       1  1
 Root nr:       1  2
Cho_X_RdRst: #Cholesky vectors (sym. 1):         32
Cho_X_RdRst: ....and from restart file:         31
Cho_X_RdRst: refusing to read more restart info!


Cho_X_Init: WARNING: error reading restart info!
Cho_X_Init: return code from read:     6


 TrInt: Cho_X_Init returns error code                     2

And the input file is

&GATEWAY
  COORD = CH4.xyz
  BASIS=  STO-3G
  GROUP=  nosym

>>  FOREACH  ITER  in  (1  ..  150)

&SEWARD
  CHOLESKY = LOW

>>  IF  (  $ITER  =  1  )

&RASSCF
  LUMORB
  FileOrb=  $Project.GssOrb
  Symmetry= 1
  Spin=  1
  nActEl=  8  0  0
  Inactive=  1
  RAS2=  8
  CIroot=  2  2  1

&GRID_IT
  NAME = new motor

>>  COPY  $Project.JobIph  $Project.JobOld

>>  ENDIF

&RASSCF
  JOBIPH;  CIRESTART
  Symmetry= 1
  Spin=  1
  nActEl=  8  0  0
  Inactive=  1
  RAS2=  8
  CIroot=  2  2  1
  MDRLXR=  2

>>  COPY  $Project.JobIph  $Project.JobOld

&ALASKA

>>> Export MOLCAS_TRAP=ON

&DYNAMIX
  VELVer
  DT=  40.0
  VELO=  0
  THER=  0
  HOP=  1

Could you help me how to solve this problem?

Thank you in advance!

Offline

#2 2015-12-10 09:57:52

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

Re: [SOLVED] error of non-adiabatic dynamics

You are using "cholesky" in SEWARD. With this option, analytical SA-CASSCF gradients are not implemented, and the calculation will use numerical gradients (check the output). There is a bug/limitation with numerical gradients in 8.0 (and before) that may cause problems like yours, try adding another &SEWARD (with the same options) after &ALASKA. Or use conventional integrals (remove "cholesky") to get analytical gradients.

Offline

#3 2015-12-10 11:06:39

wangjun
Member
Registered: 2015-12-09
Posts: 26

Re: [SOLVED] error of non-adiabatic dynamics

Thank you very much, Ignacio. When I add &SEWARD  cholesky low after &ALASKA, the job has problem 'Some internal inconsistency of the code was detected'. But when I remove 'cholesky', the job runs successfully. For a small system, I do not need 'cholesky' keyword. But for a large system, the calculation speed is low without 'cholesky'. Do you have advise about this?


Ignacio wrote:

You are using "cholesky" in SEWARD. With this option, analytical SA-CASSCF gradients are not implemented, and the calculation will use numerical gradients (check the output). There is a bug/limitation with numerical gradients in 8.0 (and before) that may cause problems like yours, try adding another &SEWARD (with the same options) after &ALASKA. Or use conventional integrals (remove "cholesky") to get analytical gradients.

Offline

#4 2015-12-10 11:16:01

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

Re: [SOLVED] error of non-adiabatic dynamics

wangjun wrote:

For a small system, I do not need 'cholesky' keyword. But for a large system, the calculation speed is low without 'cholesky'. Do you have advise about this?

The recommended way to use Cholesky decomposition is simply specifying "RICD" in GATEWAY. Even then, analytical gradients for SA-CASSCF are not officially enabled yet, but you can get them by adding the temporary "DoAnalytical" keyword to SEWARD. Just note that in future versions this keyword will not be needed.

Offline

#5 2015-12-10 11:43:46

wangjun
Member
Registered: 2015-12-09
Posts: 26

Re: [SOLVED] error of non-adiabatic dynamics

Thank you very much. I will try to use 'RICD' keyword.


Ignacio wrote:
wangjun wrote:

For a small system, I do not need 'cholesky' keyword. But for a large system, the calculation speed is low without 'cholesky'. Do you have advise about this?

The recommended way to use Cholesky decomposition is simply specifying "RICD" in GATEWAY. Even then, analytical gradients for SA-CASSCF are not officially enabled yet, but you can get them by adding the temporary "DoAnalytical" keyword to SEWARD. Just note that in future versions this keyword will not be needed.

Offline

#6 2015-12-11 16:04:50

wangjun
Member
Registered: 2015-12-09
Posts: 26

Re: [SOLVED] error of non-adiabatic dynamics

Using 'RICD' keyword can speed up the dynamics calculation. I also tried to specify VELO=  1 which means that the velocities are read from the file $Project.velocity.xyz in $WorkDir. I prepare the velocity file and put the velocity file in the current directory. I also set the $WorkDir in the current directory. But the job has some error information,

ERROR IN GET_F: TRYING TO READ   2 VALUES
 5                                                                                                                                                             
 ###############################################################################
 ###############################################################################
 ###                                                                         ###
 ###                                                                         ###
 ###    FindErrorLine: Error in input was not located                        ###
 ###      Please, check it manually!                                         ###
 ###                                                                         ###
 ###                                                                         ###
 ###############################################################################
 ###############################################################################
 ###############################################################################
 ###############################################################################
 ###                                                                         ###
 ###                                                                         ###
 ###    Error in Get_F                                                       ###
 ###                                                                         ###
 ###                                                                         ###
 ###############################################################################
 ###############################################################################
--- Stop Module:  dynamix at Fri Dec 11 15:53:10 2015 /rc= _INPUT_ERROR_ ---
Non-zero return code - check program input/output
--- Stop Module:  auto at Fri Dec 11 15:53:10 2015 /rc= _INPUT_ERROR_ ---
have to quit

    User input error

    ...................................................................................................
    ...................................................................................................
    .....Sorry to interrupt the festivities, Dave, but I think we've got a problem.....................
    .....It can only be attributable to human error....................................................
    ...................................................................................................

--- Stop Module:  auto at Fri Dec 11 15:53:10 2015 /rc= _INPUT_ERROR_ ---

Is there something wrong?

the script is,

#!/bin/bash
#SBATCH -n 1
#SBATCH --ntasks-per-node=1
#SBATCH -t 1:00:00
#SBATCH -J nad10_sto
#SBATCH --exclusive
#SBATCH -A snic2015-1-419

WD=$(pwd)
JOB=nad

module load molcas/8.0_sp1
#Trap SIGTERM and copy the larger files from $SNIC_TMP if the job hits the walltime limit 
trap 'cp ${SNIC_TMP}/* ${WD}/; echo "SIGTERM was trapped"' SIGTERM

SCRATCH=$PWD
export WorkDir=$SCRATCH

molcas.run ${JOB}.input > ${JOB}.log 2> ${JOB}.err
exit_status=$?

cp ${$SNIC_TMP}/* ${WD}/

if (( $exit_status != 0 )); then
    echo "Molcas exited with error status $exit_status"
else
    echo "Molcas exited successfully."
fi

exit $exit_status

Offline

#7 2015-12-11 17:02:10

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

Re: [SOLVED] error of non-adiabatic dynamics

wangjun wrote:
ERROR IN GET_F: TRYING TO READ   2 VALUES

This points to an error in the input (or in the program trying to read some file). If it only happens with you use "VELO=1", it's probably in the velocity.xyz file. Without seeing your file, but from the error message and test files in the development version, I guess you are using a full "xyz" file, with number of atoms, comment line, and then atom symbols and x,y,z components, but the program expects the file to contain only the x,y,z values (no "header" lines, no atom names). Yes, the documentation is misleading and it should be fixed.

Offline

#8 2015-12-11 18:05:22

wangjun
Member
Registered: 2015-12-09
Posts: 26

Re: [SOLVED] error of non-adiabatic dynamics

Thane a lot, Ignacio. Yes, if the file only contains x,y,z values, there is no problem. I want to ask another question. If I do not set the WORKDIR in the current directory, how to copy the velcoity file to WORKDIR?  I use the '>> COPY $project.velocity.xyz  $WorkDir', it do not work.

Ignacio wrote:
wangjun wrote:
ERROR IN GET_F: TRYING TO READ   2 VALUES

This points to an error in the input (or in the program trying to read some file). If it only happens with you use "VELO=1", it's probably in the velocity.xyz file. Without seeing your file, but from the error message and test files in the development version, I guess you are using a full "xyz" file, with number of atoms, comment line, and then atom symbols and x,y,z components, but the program expects the file to contain only the x,y,z values (no "header" lines, no atom names). Yes, the documentation is misleading and it should be fixed.

Offline

#9 2015-12-11 18:14:47

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

Re: [SOLVED] error of non-adiabatic dynamics

wangjun wrote:

If I do not set the WORKDIR in the current directory, how to copy the velcoity file to WORKDIR?  I use the '>> COPY $project.velocity.xyz  $WorkDir', it do not work.

It does not work because the "COPY" is executed from the WorkDir itself, try:

>> COPY $CurrDir/$Project.velocity.xyz .

(Note the dot at the end, meaning "here", which in this case in the WorkDir. Note also the capital P in $Project.)

$CurrDir is the directory from which you launch molcas, usually where you have the input file. You can also use the full absolute path.

PS. There's no need to quote the full previous message when replying, please don't do it, it only adds clutter.

Offline

#10 2015-12-12 18:27:17

wangjun
Member
Registered: 2015-12-09
Posts: 26

Re: [SOLVED] error of non-adiabatic dynamics

Thanks a lot, Ignacio. The job can work now.

Offline

#11 2015-12-15 11:20:54

wangjun
Member
Registered: 2015-12-09
Posts: 26

Re: [SOLVED] error of non-adiabatic dynamics

Due to the time limit in the supercomputer, the dynamics was terminated. I want to restart the dynamics from the time 800 a.u.. I add one line in the dynamix module,
'restart= 800'. and set the VELO=1. The job can run. But I am not sure whether it is right. Because I think restart calculation means that the dynamics will continue to run using the coordinates and velocity at the time 800 a.u. But I check the output $project.md.energy,

   time          Epot                       Ekin                               Etot
   80.00  -0.389873919032D+02   0.000000000000D+00  -0.389873919032D+02  -0.398021341340D+02  -0.389873919032D+02
  120.00  -0.390524697277D+02   0.585304805576D-01  -0.389939392471D+02  -0.398055621857D+02  -0.390524697277D+02
  160.00  -0.391655460476D+02   0.166751234190D+00  -0.389987948134D+02  -0.397668681561D+02  -0.391655460476D+02
  200.00  -0.392364237951D+02   0.237666286944D+00  -0.389987575082D+02  -0.396659862996D+02  -0.392364237951D+02
  240.00  -0.392522173951D+02   0.257147970325D+00  -0.389950694248D+02  -0.395562300322D+02  -0.392522173951D+02
  280.00  -0.392492960359D+02   0.255752002332D+00  -0.389935440336D+02  -0.394748939927D+02  -0.392492960359D+02
  320.00  -0.392473122340D+02   0.253930942059D+00  -0.389933812920D+02  -0.394230248998D+02  -0.392473122340D+02
  360.00  -0.392490986830D+02   0.255624259645D+00  -0.389934744233D+02  -0.393886647650D+02  -0.392490986830D+02
  400.00  -0.392532623446D+02   0.259712767051D+00  -0.389935495776D+02  -0.393633694354D+02  -0.392532623446D+02
...

the dynamics restart at 80 a.u., it is good but Ekin is zero which means there is no velocity at this time step.

Could you tell me whether the restart calculation like this is right?

Best wishes,

Offline

#12 2015-12-15 15:00:21

Alessio Valentini
Member
Registered: 2015-11-09
Posts: 6

Re: [SOLVED] error of non-adiabatic dynamics

No. Unfortunately, the Dynamix module cannot perform a smooth restart like that.

Using the HOP keyword you have to manually restart a trajectory from the desired initial condition. This means that you have to select a step N and copy the N-th geometry and N-th velocity in formatted $project.velocity.xyz and $project.xyz files. It is the only way.

I suggest you to save the orbitals in the current folder every time you copy them as JobOld after rasscf:

>>  COPY  $Project.JobIph  $Project.JobOld
>>  COPY  $Project.JobIph  $CurrDir/$Project.JobOld           <---- add this line

In this way you will always have the last orbitals used backup'd in the current folder. So you'll be able to restart the trajectory using as a guess the orbitals of your last step. This is usually the right way to proceed.

I also suggest to check out the SURFACEHOP module for nonadiabatic MD.

Offline

#13 2015-12-15 15:23:24

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

Re: [SOLVED] error of non-adiabatic dynamics

Alessio Valentini wrote:

I also suggest to check out the SURFACEHOP module for nonadiabatic MD.

I don't think there's such a thing in 8.0 or earlier wink

Offline

#14 2015-12-16 11:53:54

wangjun
Member
Registered: 2015-12-09
Posts: 26

Re: [SOLVED] error of non-adiabatic dynamics

Thanks a lot for the discussions of Alessio and Ignacio.

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 00:49:17