[CP2K-user] accessing qs_envs in a multiple force_eval run

Pavan Kumar Behara pava... at buffalo.edu
Mon Dec 3 15:05:52 UTC 2018


Hello Vladimir,

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.

I couldn't reply to the original post, so copying the original below.

Best Regards,
Pavan.

Date: Mon, 3 Dec 2018 02:27:52 -0800 (PST)

From: Vladimir Rybkin <ryb... at gmail.com>

To: cp2k <cp... at googlegroups.com>

Message-Id: <8c7f73cb-285f-426a... at googlegroups.com>

In-Reply-To: <CALM+RwduHAT9-8BJvHQPcjywJdapaZ3Mq=gtoA=tn6b_... at mail.gmail.com>

References: <CALM+RwduHAT9-8BJvHQPcjywJdapaZ3Mq=gtoA=tn6b_... at mail.gmail.com>

Subject: Re: accessing qs_envs in a multiple force_eval run

MIME-Version: 1.0

Content-Type: multipart/mixed;

	boundary="----=_Part_4061_1178495067.1543832872481"



------=_Part_4061_1178495067.1543832872481

Content-Type: multipart/alternative;

	boundary="----=_Part_4062_366711711.1543832872482"



------=_Part_4062_366711711.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=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 3 =D0=

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

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

mar=20

Behara =D0=BD=D0=B0=D0=BF=D0=B8=D1=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=3Dforce_env%sub_force_env(1)%force_env,=20

> qs_env=3Dqs_env_a)

> CALL force_env_get(force_env=3Dforce_env%sub_force_env(2)%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

>

>  ************************************************************************=

*******

>  *  =20

> ___                                                                      =

 *

>  *  /  =20

> \                                                                      *

>  *=20

> [ABORT]                                                                  =

  =20

> *

>  *  \___/                             CPASSERT=20

> failed                          *

>  *   =20

> |                                                                        =

*

>  * =20

> O/|                                                                      =

  *

>  * /|=20

> |                                                                        =

*

>  * / \                                             =20

> qs_environment_types.F:640 *

>

>  ************************************************************************=

*******

>

> 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.1543832872482

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

Content-Transfer-Encoding: quoted-printable



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

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

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

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

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

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

mar Behara =D0=BD=D0=B0=D0=BF=D0=B8=D1=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,sans-serif;font-size:small;color:rgb(0,0,=

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

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

dana,sans-serif;font-size: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,sans-serif;font-size:small=

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

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

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

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

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

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

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

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



</div><div style=3D"font-family:verdana,sans-serif;font-size:small;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;font-size:small;color:rgb(0,0,0)"><br></div><div=

 style=3D"font-family:verdana,sans-serif;font-size:small;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;font-size:small;color:rgb(0,0,0)">=C2=A0******=

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

********<br>=C2=A0*=C2=A0=C2=A0 ___=C2=A0=C2=A0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=

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

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

=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 qs_environment_types.F:=

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

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

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

ily:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">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,sans-serif;font-=

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

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

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

rgb(0,0,0)"><br></div><div style=3D"font-family:verdana,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:small;color:rgb(0,0,0)">Pavan.<br></div><br></div>=

</div></div>

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

------=_Part_4062_366711711.1543832872482--



------=_Part_4061_1178495067.1543832872481--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20181203/a5e0913f/attachment.htm>


More information about the CP2K-user mailing list