<div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">Hello CP2K developers,</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">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)" class="gmail_default"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">CALL force_env_get(force_env=force_env%sub_force_env(1)%force_env, qs_env=qs_env_a)</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">
<div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">CALL force_env_get(force_env=force_env%sub_force_env(2)%force_env, qs_env=qs_env_b)</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default"></div>
</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">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)" class="gmail_default"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">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)" class="gmail_default"> *******************************************************************************<br> * ___ *<br> * / \ *<br> * [ABORT] *<br> * \___/ CPASSERT failed *<br> * | *<br> * O/| *<br> * /| | *<br> * / \ qs_environment_types.F:640 *<br> *******************************************************************************<br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">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)" class="gmail_default"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">Thank you very much for your help.</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default"><br></div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">Best Regards,</div><div style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)" class="gmail_default">Pavan.<br></div><br></div></div></div>