<div dir="ltr">Dear Pavan,<div><br></div><div>probably, the right place is 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>понедельник, 3 декабря 2018 г., 10:31:13 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 dir="ltr"><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">Hello CP2K developers,</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 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 orbitals. 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="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)">CALL force_env_get(force_env=force_<wbr>env%sub_force_env(1)%force_<wbr>env, qs_env=qs_env_a)</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">
<div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">CALL force_env_get(force_env=force_<wbr>env%sub_force_env(2)%force_<wbr>env, qs_env=qs_env_b)</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"></div>

</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">CALL mos_analysis(qs_env_a, qs_env_b)<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)">When I access <i>qs_env_a</i> in mos_analysis subroutine I am ending up with CPASSERT failed error in qs_environment_types. <br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"> *****************************<wbr>******************************<wbr>********************<br> *   ___                           <wbr>                              <wbr>              *<br> *  /   \                             <wbr>                              <wbr>           *<br> * [ABORT]                       <wbr>                              <wbr>                *<br> *  \___/                         <wbr>    CPASSERT failed                        <wbr>  *<br> *    |                             <wbr>                              <wbr>             *<br> *  O/|                           <wbr>                              <wbr>               *<br> * /| |                             <wbr>                              <wbr>             *<br> * / \                             <wbr>                 qs_environment_types.F:640 *<br> *****************************<wbr>******************************<wbr>********************<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)">My question is how to access the two qs_env and all info associated with it (mos, rho, ks_matrix, etc.) post-scf, in a multiple force_eval calculation before deallocating everything. <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)">Thank you very much for your help.</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><br></div></div></div>
</blockquote></div></div>