IF statement doesn't work.

24 views
Skip to first unread message

Youmu

unread,
Sep 2, 2022, 4:18:17 AM9/2/22
to cp2k
Dear CP2K all,
I want to make a template .inp file taking the advantage of the IF statement, but it seems that I haven't found the right way to use it.
Below is part of my test input file, and the output file showed the OPTIMIZER used in the GEO_OPT was BFGS even if I had set ${opt_algo} to CG.
Snipaste_2022-09-02_16-06-07.png
Can anyone tell me how to use IF statement correctly in CP2K .inp file?
I am using CP2K v7.1 and any reply will be helpful!
Here I attached my test input and output files.

Yours,
Nie
H2O.inp
H2O.out

Krack Matthias (PSI)

unread,
Sep 5, 2022, 3:47:03 AM9/5/22
to cp...@googlegroups.com

Hi Nie

 

Remove the comment “# or CG”, i.e. everything after “@SET opt_algo CG” in line 1 and try again.

 

HTH

 

Matthias

 

From: "cp...@googlegroups.com" <cp...@googlegroups.com> on behalf of Youmu <youmus...@gmail.com>
Reply to: "cp...@googlegroups.com" <cp...@googlegroups.com>
Date: Friday, 2 September 2022 at 10:18
To: "cp...@googlegroups.com" <cp...@googlegroups.com>
Subject: [CP2K:17589] IF statement doesn't work.

 

Dear CP2K all,

I want to make a template .inp file taking the advantage of the IF statement, but it seems that I haven't found the right way to use it.

Below is part of my test input file, and the output file showed the OPTIMIZER used in the GEO_OPT was BFGS even if I had set ${opt_algo} to CG.

Can anyone tell me how to use IF statement correctly in CP2K .inp file?

I am using CP2K v7.1 and any reply will be helpful!

Here I attached my test input and output files.

 

Yours,

Nie

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/aa1b22ba-9beb-4bd3-a0c9-d520b8f10e3dn%40googlegroups.com.

Youmu

unread,
Sep 5, 2022, 11:44:06 AM9/5/22
to cp...@googlegroups.com
Dear  Matthias,

Thanks for your kind help, it works!

Do have a nice day!

Nie

Krack Matthias (PSI) <matthia...@psi.ch> 于2022年9月5日周一 15:47写道:
Reply all
Reply to author
Forward
0 new messages