source: tests/regression/Options/Session/pre/complexwait.py@ d6d2129

Action_Thermostats Add_AtomRandomPerturbation Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChangeBugEmailaddress ChemicalSpaceEvaluator EmpiricalPotential_contain_HomologyGraph_documentation Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph Fix_Verbose_Codepatterns ForceAnnealing_oldresults ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps
Last change on this file since d6d2129 was 415ddd, checked in by Frederik Heber <heber@…>, 11 years ago

ActionQueue now contains a run thread.

  • otherwise the progress bar of the QtMainWindow cannot be seen as waitForResults() takes up all of the executing thread.
  • added mutex for operations modifying the queue.
  • added ActionQueue::run() and ::stop(), used by friend stopQueue().
  • insertAction() now makes use of a tempqueue that is added to true queue during run() instead of calling the actions directly.
  • new stopQueue() in cleanUp.hpp is used by module_exit in pyMoleCuilder and in main() before saveAll().
  • cleanup: printTiming() requires now list of action tokens and added new stopAndPurgeQueue() to place waiting for Actions to end into extra function.
  • added ActionQueue::wait() which allows for synchronization in python scripts, is ignored in session python scripts. Otherwise we wait for ActionQueue's queue to empty during execution of load-session which hangs.
  • DOCU: added note to python documentation.
  • added waitQueue() also to purgeStaticInstances().
  • static UIFactory::isFactoryPresent() added that allows checking whether we have a UI or are executed within a python script (i.e. pyMoleCuilder).
  • DOCU: Extended docu on threads and who this affects python scripts.
  • TESTFIX: changed regression tests on storing python sessions.
  • Property mode set to 100644
File size: 912 bytes
Line 
1import pyMoleCuilder
2# ========================== Stored Session BEGIN ==========================
3i=1
4print "wait1 begin"
5pyMoleCuilder.wait()
6i=2
7print "wait1 end"
8pyMoleCuilder.CommandVerbose(str(i))
9pyMoleCuilder.ParserSetOutputFormats("mpqc tremolo")
10print "wait2 begin"
11pyMoleCuilder.wait()
12i=i+1
13print "wait2 end"
14pyMoleCuilder.CommandSetRandomNumbersDistribution("uniform_int", "p=1;")
15pyMoleCuilder.WorldChangeBox("20,0,0,20,0,20")
16pyMoleCuilder.AtomAdd("1", "1,1,1")
17pyMoleCuilder.SelectionAtomById("0 0")
18print "wait3 begin"
19pyMoleCuilder.wait()
20i=i+1
21print "wait3 end"
22pyMoleCuilder.GraphSubgraphDissection()
23pyMoleCuilder.SelectionMoleculeOfAtom()
24pyMoleCuilder.FillRegularGrid("3 3 3", "0.5,0.5,0.5", "1", "0", "0", "0", "0")
25pyMoleCuilder.CommandVersion()
26print "wait4 begin"
27pyMoleCuilder.wait()
28i=i+1
29print "wait4 end"
30# =========================== Stored Session END ===========================
Note: See TracBrowser for help on using the repository browser.