Changeset ecc050


Ignore:
Timestamp:
May 19, 2021, 7:06:29 PM (4 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
923ce2
Parents:
8c9cce
git-author:
Frederik Heber <frederik.heber@…> (04/24/19 21:29:22)
git-committer:
Frederik Heber <frederik.heber@…> (05/19/21 19:06:29)
Message:

pyMoleCuilder's wait() has return value.

  • tells whether actions have been executed successfully or not.
  • DOCU: updated docu
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    r8c9cce recc050  
    16031603          <programlisting>... change-box &quot;20,0,20,0,0,20&quot;</programlisting>
    16041604          <para>As the domain matrix is symmetric, six values suffice to fully
    1605           specify it. We have to give the six components of the lower triangle           matrix. Here, we change the box to a cuboid of equal edge length of
    1606           20.<warning>
    1607               <para>In case of the python interface an upper triangle matrix is given. Hence, the above would read &quot;20,0,0,20,0,20&quot;.</para>
    1608             </warning></para>
     1605          specify it. We have to give the six components of the lower triangle
     1606          matrix. Here, we change the box to a cuboid of equal edge length of
     1607          20.
     1608          <warning>
     1609            <para>In case of the python interface an upper triangle matrix is given. Hence, the above would read &quot;20,0,0,20,0,20&quot;.</para>
     1610          </warning></para>
    16091611        </section>
    16101612        <section xml:id="domain.bound-in-box">
     
    32443246      <programlisting>
    32453247         mol.MoleculeLoad("...")
    3246          mol.wait()
     3248         status = mol.wait()
    32473249      </programlisting>
    3248       <para>This will continue first after the molecule has been fully loaded.
    3249       </para>
     3250      <para>This will continue first only after the molecule has been fully
     3251      loaded. Moreover, wait returns whether the actions contained executed
     3252      succesfully.</para>
    32503253      <warning>These wait()s will have no effect if the python script is loaded
    32513254      via the "load-session" command inside a User Interface (command-line,
  • src/Python/PythonScripting_impl.hpp

    r8c9cce recc050  
    9595      "Reinitializes the internal state of the python module as if it had been freshly imported,saves all input files beforehand."
    9696  );
    97   boost::python::def(
     97  boost::python::def< bool() >(
    9898      "wait",
    9999      MoleCuilder::detail::module_wait,
  • src/Python/modules.hpp

    r8c9cce recc050  
    2525void module_exit();
    2626void module_reinit();
    27 void module_wait();
     27bool module_wait();
    2828
    2929typedef std::vector<atomId_t> atomIdVec;
  • src/Python/wait.cpp

    r8c9cce recc050  
    4242#include "cleanUp.hpp"
    4343
    44 void MoleCuilder::detail::module_wait()
     44bool MoleCuilder::detail::module_wait()
    4545{
     46  bool retval = true;
    4647  // prevent wait() in python scripts in case of present UI (loaded sessions)
    4748#ifdef HAVE_ACTION_THREAD
     
    4950    LOG(0, "Waiting for action queue to idle.");
    5051    waitQueue();
     52    retval = getOkQueue();
    5153  }
    5254#endif
     55  return retval;
    5356}
  • src/cleanUp.cpp

    r8c9cce recc050  
    244244  MoleCuilder::ActionQueue::getInstance().wait();
    245245}
    246 #endif
     246
     247/** Returns whether last action did ok.
     248 *
     249 */
     250bool getOkQueue()
     251{
     252  return MoleCuilder::ActionQueue::getConstInstance().getLastActionOk();
     253}
     254#endif
     255
     256
  • src/cleanUp.hpp

    r8c9cce recc050  
    2222void stopQueue();
    2323void waitQueue();
     24bool getOkQueue();
    2425#endif
    2526
Note: See TracChangeset for help on using the changeset viewer.