<div dir="ltr">Dear Pavan,<div><br></div><div>I am afraid it is difficult to judge without having a piece of code at disposal. I am sure the force_env_methods.F is the right place to look for. Assertion error could be anything, so be careful with syntax. </div><div><br></div><div>Yours,</div><div><br></div><div>Vladimir<br><br>понедельник, 3 декабря 2018 г., 16:06:05 UTC+1 пользователь Pavan Kumar Behara написал:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div dir="ltr"><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Hello Vladimir,</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">I did try to get them in force_env_methods, but when I try to use the passed qs_env variables it gives me an assertion error. Forgive me if this is a trivial fortran pointers question. <br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">I couldn't reply to the original post, so copying the original below.</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Best Regards,</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Pavan.<br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">
<pre>Date: Mon, 3 Dec 2018 02:27:52 -0800 (PST)

From: Vladimir Rybkin <<a>ryb...@gmail.com</a>>

To: cp2k <<a>cp...@googlegroups.com</a>>

Message-Id: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="NVAUsHNUBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">8c7f73cb-285f-426a-a181-<wbr>fa9a07...@googlegroups.com</a>>

In-Reply-To: <CALM+RwduHAT9-<wbr>8BJvHQPcjywJdapaZ3Mq=gtoA=<a href="javascript:" target="_blank" gdf-obfuscated-mailto="NVAUsHNUBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">tn6b<wbr>_rMS...@mail.gmail.com</a>>

References: <CALM+RwduHAT9-<wbr>8BJvHQPcjywJdapaZ3Mq=gtoA=<a href="javascript:" target="_blank" gdf-obfuscated-mailto="NVAUsHNUBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">tn6b<wbr>_rMS...@mail.gmail.com</a>>

Subject: Re: accessing qs_envs in a multiple force_eval run

MIME-Version: 1.0

Content-Type: multipart/mixed; 

        boundary="----=_Part_4061_<wbr>1178495067.1543832872481"



------=_Part_4061_1178495067.<wbr>1543832872481

Content-Type: multipart/alternative; 

        boundary="----=_Part_4062_<wbr>366711711.1543832872482"



------=_Part_4062_366711711.<wbr>1543832872482

Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: quoted-printable



Dear Pavan,



probably, the right place is in force_env_methods.F. There the separate=20

force evaluations are called.



Yours,



Vladimir



=D0=BF=D0=BE=D0=BD=D0=B5=D0=<wbr>B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=<wbr>B8=D0=BA, 3 =D0=

=B4=D0=B5=D0=BA=D0=B0=D0=B1=<wbr>D1=80=D1=8F 2018 =D0=B3., 10:31:13 UTC+1 =D0=BF=

=D0=BE=D0=BB=D1=8C=D0=B7=D0=<wbr>BE=D0=B2=D0=B0=D1=82=D0=B5=D0=<wbr>BB=D1=8C Pavan Ku=

mar=20

Behara =D0=BD=D0=B0=D0=BF=D0=B8=D1=<wbr>81=D0=B0=D0=BB:

>

> Hello CP2K developers,

>

> I want to pass the qs_env of two separate force evaluations in a multiple=

=20

> force_eval calculation to another subroutine where I will do some post=20

> analysis on the molecular orbitals. I am placing a function call inside=

=20

> force_env_methods.F to define the two states qs_env_a and qs_env_b, and=

=20

> passing them to the other subroutine as:=20

>

> CALL force_env_get(force_env=<wbr>3Dforce_env%sub_force_env(1)%<wbr>force_env,=20

> qs_env=3Dqs_env_a)

> CALL force_env_get(force_env=<wbr>3Dforce_env%sub_force_env(2)%<wbr>force_env,=20

> qs_env=3Dqs_env_b)

> CALL mos_analysis(qs_env_a, qs_env_b)

>

> When I access *qs_env_a* in mos_analysis subroutine I am ending up with=

=20

> CPASSERT failed error in qs_environment_types.=20

>

>  ******************************<wbr>******************************<wbr>************=

*******

>  *  =20

> ___                                                                      =

 *

>  *  /  =20

> \                                                                      *

>  *=20

> [ABORT]                                                                  =

  =20

> *

>  *  \___/                             CPASSERT=20

> failed                          *

>  *   =20

> |                                                                        =

*

>  * =20

> O/|                                                                      =

  *

>  * /|=20

> |                                                                        =

*

>  * / \                                             =20

> qs_environment_types.F:640 *

>

>  ******************************<wbr>******************************<wbr>************=

*******

>

> My question is how to access the two qs_env and all info associated with=

=20

> it (mos, rho, ks_matrix, etc.) post-scf, in a multiple force_eval=20

> calculation before deallocating everything.=20

>

> Thank you very much for your help.

>

> Best Regards,

> Pavan.

>

>

------=_Part_4062_366711711.<wbr>1543832872482

Content-Type: text/html; charset=utf-8

Content-Transfer-Encoding: quoted-printable



<div dir=3D"ltr">Dear Pavan,<div><br></div><div><wbr>probably, the right place i=

s in force_env_methods.F. There the separate force evaluations are called.<=

/div><div><br></div><div><wbr>Yours,</div><div><br></div><<wbr>div>Vladimir<br><br>=

=D0=BF=D0=BE=D0=BD=D0=B5=D0=<wbr>B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=<wbr>B8=D0=BA, 3 =D0=

=B4=D0=B5=D0=BA=D0=B0=D0=B1=<wbr>D1=80=D1=8F 2018 =D0=B3., 10:31:13 UTC+1 =D0=BF=

=D0=BE=D0=BB=D1=8C=D0=B7=D0=<wbr>BE=D0=B2=D0=B0=D1=82=D0=B5=D0=<wbr>BB=D1=8C Pavan Ku=

mar Behara =D0=BD=D0=B0=D0=BF=D0=B8=D1=<wbr>81=D0=B0=D0=BB:<blockquote class=3D"=

gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc so=

lid;padding-left: 1ex;"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr">=

<div style=3D"font-family:verdana,<wbr>sans-serif;font-size:small;<wbr>color:rgb(0,0,=

0)">Hello CP2K developers,</div><div style=3D"font-family:verdana,<wbr>sans-seri=

f;font-size:small;color:rgb(0,<wbr>0,0)"><br></div><div style=3D"font-family:ver=

dana,sans-serif;font-size:<wbr>small;color:rgb(0,0,0)">I want to pass the qs_env=

 of two separate force evaluations in a multiple force_eval calculation to =

another subroutine where I will do some post analysis on the molecular orbi=

tals. I am placing a function call inside force_env_methods.F to define the=

 two states qs_env_a and qs_env_b, and passing them to the other subroutine=

 as: <br></div><div style=3D"font-family:verdana,<wbr>sans-serif;font-size:small=

;color:rgb(0,0,0)"><br></div><<wbr>div style=3D"font-family:verdana,<wbr>sans-serif;f=

ont-size:small;color:rgb(0,0,<wbr>0)">CALL force_env_get(force_env=<wbr>3Dforce_<wbr>=

env%sub_force_env(1)%force_<<wbr>wbr>env, qs_env=3Dqs_env_a)</div><div style=3D"=

font-family:verdana,sans-<wbr>serif;font-size:small;color:<wbr>rgb(0,0,0)">

<div style=3D"font-family:verdana,<wbr>sans-serif;font-size:small;<wbr>color:rgb(0,0,=

0)">CALL force_env_get(force_env=<wbr>3Dforce_<wbr>env%sub_force_<wbr>env(2)%force_<w=

br>env, qs_env=3Dqs_env_b)</div><div style=3D"font-family:verdana,<wbr>sans-seri=

f;font-size:small;color:rgb(0,<wbr>0,0)"></div>



</div><div style=3D"font-family:verdana,<wbr>sans-serif;font-size:small;<wbr>color:rg=

b(0,0,0)">CALL mos_analysis(qs_env_a, qs_env_b)<br></div><div style=3D"font=

-family:verdana,sans-serif;<wbr>font-size:small;color:rgb(0,0,<wbr>0)"><br></div><div=

 style=3D"font-family:verdana,<wbr>sans-serif;font-size:small;<wbr>color:rgb(0,0,0)">=

When I access <i>qs_env_a</i> in mos_analysis subroutine I am ending up wit=

h CPASSERT failed error in qs_environment_types. <br></div><div style=3D"fo=

nt-family:verdana,sans-serif;<wbr>font-size:small;color:rgb(0,0,<wbr>0)">=C2=A0******=

***********************<wbr>**<wbr>****************************<<wbr>wbr>************=

********<br>=C2=A0*=C2=A0=C2=<wbr>A0 ___=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=

=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=A0<wbr>=C2=<wbr>A0=C2=A0=C2=A0=C2=

=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=

=A0=C2=A0<wbr>=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=

=C2=A0=C2=A0=C2=A0 *<br>=C2=A0*=C2=A0 /=C2=A0=C2=A0 \=C2=A0=C2=A0=C2=A0=C2=

=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=

=A0<wbr>=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=A0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<wbr>A0=C2=A0=C2=A0=C2=

=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0 *<br>=C2=A0* /| |=C2=A0=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=

=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=

=C2=A0=C2=A0=C2=A0<wbr>=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=

=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=A0=C2=A0<<wbr>wbr>=C2=A0=C2=A0=C2=

=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *<br>=C2=A0* / \=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=<wbr>A0=C2=A0=C2=A0=C2=

=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=

=C2=A0=C2=A0=C2=A0=C2=A0<wbr>=<wbr>C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=

=A0=C2=A0=C2=A0=C2=A0=C2=A0=<wbr>C2=A0=C2=A0=C2=A0=C2=A0 qs_environment_types.F:=

640 *<br>=C2=A0*******************<wbr>**********<wbr>***************<wbr>***********=

****<wbr>********************<<wbr>br></div><div style=3D"font-family:verdana,<wbr>sa=

ns-serif;font-size:small;<wbr>color:rgb(0,0,0)"><br></div><<wbr>div style=3D"font-fam=

ily:verdana,sans-serif;font-<wbr>size:small;color:rgb(0,0,0)"><wbr>My question is how=

 to access the two qs_env and all info associated with it (mos, rho, ks_mat=

rix, etc.) post-scf, in a multiple force_eval calculation before deallocati=

ng everything. <br></div><div style=3D"font-family:verdana,<wbr>sans-serif;font-=

size:small;color:rgb(0,0,0)"><<wbr>br></div><div style=3D"font-family:verdana,<wbr>sa=

ns-serif;font-size:small;<wbr>color:rgb(0,0,0)">Thank you very much for your hel=

p.</div><div style=3D"font-family:verdana,<wbr>sans-serif;font-size:small;<wbr>color:=

rgb(0,0,0)"><br></div><div style=3D"font-family:verdana,<wbr>sans-serif;font-siz=

e:small;color:rgb(0,0,0)">Best Regards,</div><div style=3D"font-family:verd=

ana,sans-serif;font-size:<wbr>small;color:rgb(0,0,0)">Pavan.<wbr><br></div><br></div>=

</div></div>

</blockquote></div></div>

------=_Part_4062_366711711.<wbr>1543832872482--



------=_Part_4061_1178495067.<wbr>1543832872481--
</pre>

</div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div></div>