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 2022-02-03 01:32:23

SSirimatayanant
Member
Registered: 2022-02-02
Posts: 4

[SOLVED] Negative Two-Electron Energy

Hello Molcas users!

I am relatively new to Molcas and have been experiencing issues when running embedding potential calculations for water molecules within my system. For some water molecules the calculation fails with the error 'ERROR: WfCtl_SCF: negative two-electron energy'. I have read on other posts that it could be caused by insufficient memory/nodes allocated but I am not sure. I have tried allocating increasing the ram allocated to ~40GB, but it still fails at the same spot. If anybody could point out where this error comes from, it would be greatly appreciated!

Kind regards,

Saruti

some basic info attached regarding the calculation:

configuration info
------------------
Host name: wn1647 (Linux)
C Compiler ID: GNU
C flags: -std=gnu99
Fortran Compiler ID: GNU
Fortran flags: -fno-aggressive-loop-optimizations -cpp -fdefault-integer-8 -fmax-stack-var-size=1048576
Definitions: _MOLCAS_;_I8_;_LINUX_
Parallel: OFF (GA=OFF)


   -----------------------------------------------------------------------------------------------------
  |
  |              Project: 159_SOL_molcas_loprop.inp
  |       Submitted from: /lustre/scratch/tmp/pbs.3836662.ossachilles
  |         Scratch area: /lustre/scratch/tmp/pbs.3836662.ossachilles
  |      Save outputs to: /home/saruti/rhodopsin/molcas_step/rhod_qmmm_0.3nm-shell/159_SOL_molcas_loprop
  |               Molcas: /home/saruti/Molcas/build
  |
  | Scratch area is empty
  |
  |       MOLCAS_DRIVER = /home/saruti/Molcas/build/pymolcas
  | MOLCAS_NEW_DEFAULTS = YES
  |       MOLCAS_NPROCS = 5
  |         MOLCAS_SAVE = INCR
  |       MOLCAS_SOURCE = /home/saruti/Molcas/OpenMolcas
  |    MOLCAS_STRUCTURE = 0
  |         MOLCAS_TRAP = YES
  |
   -----------------------------------------------------------------------------------------------------

++ ---------   Input file   ---------

&GATEWAY
TITLE = Generated by PyFraME 0.2.0
COORD = 159_SOL_molcas_loprop.xyz
BASIS = ANO-L-VDZP
GROUP = C1

&SEWARD
MULT = 2
MEDI

&SCF
CHARGE = 0
CHOL
KSDFT = B3LYP

&LOPROP
MPPROP = 2
BOND = 0.0

-- ----------------------------------

--- Start Module: gateway at Wed Feb  2 18:07:38 2022 ---

()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()

                                              &GATEWAY

                                   only a single process is used
                       available to each process: 320 MB of memory, 1 thread?
                                             pid: 22889
()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()

Structure:

3
Generated by PyFraME v0.2.0 (fragment charge: 0)
O    25.781000    27.603000   -22.142000
H    24.869000    28.009000   -22.077000
H    25.440000    26.660000   -22.103000

Error:

++ Convergence information
                                   B3LYP      iterations: Energy and convergence statistics

Iter     Tot. B3LYP      One-elec.       Two-elec.     Energy      Max Dij or  Max Fij      DNorm      TNorm      AccCon     Time
         Energy          Energy          Energy        Change      Delta Norm                                                in Sec.
   1  -231.005446406  -128.068430294  -111.748490576   0.00E+00    0.53E+00*   0.58E+02*    0.44E+01   0.33E+03   None         0.
 ###############################################################################
 ###############################################################################
 ###                                                                         ###
 ###                                                                         ###
 ###    ERROR: WfCtl_SCF: negative two-electron energy                       ###
 ###                                                                         ###
 ###                                                                         ###
 ###############################################################################
 ###############################################################################
Two-electron energy E2V=        -1.1174849058D+02
[ process      0]: xquit (rc =    128): _INTERNAL_ERROR_

Offline

#2 2022-02-03 16:28:58

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

Re: [SOLVED] Negative Two-Electron Energy

With those input files I get a successful run and a B3LYP energy of ~ -76.5 Eh.

Offline

#3 2022-02-04 17:12:47

SSirimatayanant
Member
Registered: 2022-02-02
Posts: 4

Re: [SOLVED] Negative Two-Electron Energy

Thank you for your reply! Would you be able to tell me how much resources (nodes/cores/etc) you allocated for your run? And what Molcas build did you use? Im not sure if it would be related neither but perhaps the compiler type/version?

Kind regards,

Saruti

Offline

#4 2022-02-04 18:01:00

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

Re: [SOLVED] Negative Two-Electron Energy

I just ran it on my personal computer, one node, one core, 2GB mem, with the latest (or close) master OpenMolcas.

But my point was that my energy doesn't match yours, and it seems like your calculation had 3 water molecules instead of one. Try cleaning up your scratch directory.

Offline

#5 2022-02-12 10:28:22

SSirimatayanant
Member
Registered: 2022-02-02
Posts: 4

Re: [SOLVED] Negative Two-Electron Energy

Hello!

Thank you for your reply and apologies for my slow response. Past week I've been trying different ways to setup the 'CURDIR' and 'WorkDir' in my queuing script (PBS) but I have been having trouble 'making the CURDIR and WorkDir not the same'. I changed the setting in Molcas according to the 'pymolcas -setup' to clean the WorkDir before every run but I can't seem to figure out how to make the CURDIR and the WorkDir not the same to allow Molcas to actually clean. To my understanding, I have created a new scratch folder with a different name (PBS ID) for every calculation, within my server's scratch directory which is pointed outside of my account's directory (where CURDIR would be located). Below I attach an excerpt from my script, perhaps you could tell me how I'm writing this wrong? I've tried changing the direction of the calculation by starting the run in either CURDIR/WorkDir and pointing the output to the opposite (start in CURDIR point to WorkDir or vice versa), but Molcas still prints at the top of the output '*** WorkDir and CurrDir are the same, not cleaned! ***'.

Kind regards

Saruti

module load binutils/2.25 
module load openmpi/1.8.4-gcc5.1.0
module load mkl/10.3
export CC=mpicc  
export CXX=mpicxx
export F90=mpif90
export F77=mpif77 
export FC=mpif90

export WorkDir=/lustre/scratch/tmp/pbs.\$PBS_JOBID
export MOLCAS_MEM=$(( $mem * 8 / 10 / $cores ))
export Project=$input_f
export MOLCAS=/home/saruti/Molcas/build

rm -rf \$WorkDir

mkdir -p \$WorkDir

cp ${CURDIR}/* \$WorkDir 
cd \$WorkDir

/home/saruti/Molcas/build/pymolcas -np $cores ${CURDIR}/$input_f >& \$WorkDir/${Project}.log

cp *MpProp $CURDIR

tar czf orbitals-results.tar.gz  *log  *molden  *Orb
cp orbitals-results.tar.gz $CURDIR
cd $CURDIR

rm -rf $WorkDir

EOF

Offline

#6 2022-02-12 19:10:45

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

Re: [SOLVED] Negative Two-Electron Energy

CurrDir is the directory from which you launch the calculation. If you do "cd $WorkDir" before running pymolcas, then you're forcing them to be the same. Just run pymolcas from outside $WorkDir. (But I don't know if that will have anything to do with your problem.)

Offline

#7 2022-02-17 16:50:21

SSirimatayanant
Member
Registered: 2022-02-02
Posts: 4

Re: [SOLVED] Negative Two-Electron Energy

Hello again!

Thank you for your suggestion, I have tried changing my script around and I am able to properly clean the WorkDir before calculation. I also tried building Molcas on my home PC which gave me the same results as yours (SCF energy ~-76.5) and terminated normally. So I tried reinstalling Molcas on my University's cluster with newer versions of OpenMpi/Mkl and now it works perfectly fine. Thank you again for your suggestions!

Offline

#8 2022-03-23 20:03:07

blakeadam
Member
Registered: 2022-03-23
Posts: 1

Re: [SOLVED] Negative Two-Electron Energy

I am relatively new to Molcas and have been experiencing issues when running embedding potential calculations for water molecules within my system.
For some water molecules the calculation fails with the error 'ERROR WfCtl_SCF negative two-electron energy.

I have read on other posts that it could be caused by insufficient memory/nodes allocated but I am not sure.
I have tried allocating increasing the ram allocated to ~40GB, but it still fails at the same spot.
If anybody could point out where this error comes from, it would be greatly appreciated.

Last edited by blakeadam (2022-03-23 20:03:23)

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 16:55:48