Changeset 14de8e1


Ignore:
Timestamp:
Dec 14, 2012, 2:29:09 PM (12 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
7ace68
Parents:
7ef5b9a
git-author:
Frederik Heber <heber@…> (04/13/12 16:41:58)
git-committer:
Frederik Heber <heber@…> (12/14/12 14:29:09)
Message:

Molecuilder parses and executes python script 'molecuilder.py' prior to launch of UIs.

Location:
src
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/Makefile.am

    r7ef5b9a r14de8e1  
    305305
    306306
    307 molecuilder_CPPFLAGS = $(AM_CPPFLAGS) ${QT_CFLAGS}
    308 #molecuilder_CXXFLAGS += -DNO_CACHING
    309 molecuilder_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
     307molecuilder_CPPFLAGS  = $(AM_CPPFLAGS)
     308#molecuilder_CPPFLAGS += -DNO_CACHING
     309molecuilder_LDFLAGS = \
     310        $(AM_LDFLAGS) \
     311        $(BOOST_FILESYSTEM_LDFLAGS) \
     312        $(BOOST_PROGRAM_OPTIONS_LDFLAGS) \
     313        $(BOOST_RANDOM_LDFLAGS) \
     314        $(BOOST_SYSTEM_LDFLAGS) \
     315        $(BOOST_THREAD_LDFLAGS)
    310316molecuilder_SOURCES = \
    311317        builder.cpp \
     
    313319        builder_init.hpp \
    314320        cleanUp.cpp \
    315         cleanUp.hpp
     321        cleanUp.hpp \
     322        PythonScripting.hpp
    316323molecuilder_LDADD = \
    317324        libMolecuilderUI.la
     
    328335        $(BOOST_SYSTEM_LIBS) \
    329336        $(BOOST_FILESYSTEM_LIBS)
     337       
     338if CONDPYTHON
     339molecuilder_SOURCES += \
     340        Actions/Action_impl_python.hpp \
     341        Actions/GlobalListOfActions.hpp
     342molecuilder_CPPFLAGS += -I$(PYTHON_INCLUDE_DIR)
     343molecuilder_LDFLAGS += $(BOOST_PYTHON_LDFLAGS)
     344molecuilder_LDADD += \
     345        $(BOOST_PYTHON_LIBS) \
     346        ${CodePatterns_LIBS} \
     347        -l$(PYTHON_LIB)
     348endif
    330349
    331350#Stuff for building the GUI using Qt
     
    337356        builder_init.hpp \
    338357        cleanUp.cpp \
    339         cleanUp.hpp
    340 molecuildergui_CXXFLAGS = $(AM_CPPFLAGS) -DUSE_GUI_QT
    341 molecuildergui_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
     358        cleanUp.hpp \
     359        PythonScripting.hpp
     360molecuildergui_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_GUI_QT
     361molecuildergui_LDFLAGS = \
     362        $(AM_LDFLAGS) \
     363        $(BOOST_FILESYSTEM_LDFLAGS) \
     364        $(BOOST_PROGRAM_OPTIONS_LDFLAGS) \
     365        $(BOOST_SYSTEM_LDFLAGS) \
     366        $(BOOST_THREAD_LDFLAGS)
    342367molecuildergui_LDADD = \
    343368        libMolecuilderQtUI.la \
     
    356381        $(BOOST_FILESYSTEM_LIBS) \
    357382        $(GUI_LIBS)
     383
     384if CONDPYTHON
     385molecuildergui_SOURCES += \
     386        Actions/Action_impl_python.hpp \
     387        Actions/GlobalListOfActions.hpp
     388molecuildergui_CPPFLAGS += -I$(PYTHON_INCLUDE_DIR)
     389molecuildergui_LDFLAGS += $(BOOST_PYTHON_LDFLAGS)
     390molecuildergui_LDADD += \
     391        $(BOOST_PYTHON_LIBS) \
     392        ${CodePatterns_LIBS} \
     393        -l$(PYTHON_LIB)
     394endif
     395
    358396endif
    359397
    360398joiner_SOURCES = Fragmentation/joiner.cpp Fragmentation/datacreator.cpp Fragmentation/datacreator.hpp
    361 joiner_CXXFLAGS = $(AM_CPPFLAGS)
     399joiner_CPPFLAGS = $(AM_CPPFLAGS)
    362400joiner_LDFLAGS = $(AM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
    363401joiner_LDADD = \
     
    370408
    371409analyzer_SOURCES = Fragmentation/analyzer.cpp Fragmentation/datacreator.cpp Fragmentation/datacreator.hpp
    372 analyzer_CXXFLAGS = $(AM_CPPFLAGS)
     410analyzer_CPPFLAGS = $(AM_CPPFLAGS)
    373411analyzer_LDFLAGS = $(AM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
    374412analyzer_LDADD = \
     
    403441Controller_SOURCES = controller.cpp controller_AddOn_MPQCCommandJob.cpp
    404442Controller_LDFLAGS = $(AM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) ${CodePatterns_LDFLAGS}
    405 Controller_CXXFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
     443Controller_CPPFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
    406444Controller_LDADD = \
    407445        libFragmentationAutomationController.la \
     
    416454PoolWorker_SOURCES = poolworker.cpp
    417455PoolWorker_LDFLAGS = $(AM_LDFLAGS) ${CodePatterns_LDFLAGS}
    418 PoolWorker_CXXFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
     456PoolWorker_CPPFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
    419457PoolWorker_LDADD = \
    420458        libMolecuilderJobs.la \
     
    425463Server_SOURCES = Server.cpp
    426464Server_LDFLAGS = $(AM_LDFLAGS) ${CodePatterns_LDFLAGS}
    427 Server_CXXFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
     465Server_CPPFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
    428466Server_LDADD = \
    429467        libMolecuilderJobs.la \
     
    434472
    435473unity_SOURCES = unity.cpp
    436 unity_CXXFLAGS = $(AM_CPPFLAGS)
     474unity_CPPFLAGS = $(AM_CPPFLAGS)
    437475unity_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
    438476unity_LDADD = \
  • src/builder_init.cpp

    r7ef5b9a r14de8e1  
    3333#endif
    3434
     35// boost::python uses placement new which is incompatible with MemDebug.
     36#ifdef HAVE_PYTHON
     37#include "PythonScripting.hpp"
     38#endif
     39
    3540#include "CodePatterns/MemDebug.hpp"
    3641
     42#include <boost/filesystem.hpp>
     43#include <fstream>
    3744#include <iomanip>
    3845#include <iostream>
     46#include <iterator>
     47#include <string>
    3948
    4049#include "Actions/ActionHistory.hpp"
     
    6574
    6675#include <boost/filesystem.hpp>
    67 
    6876
    6977/** Print some initial information output the program.
     
    122130    input.close();
    123131  }
     132
     133  // if we have python, autoexecute a molecuilder script in current folder
     134#ifdef HAVE_PYTHON
     135  const std::string pythonfilename_string("./molecuilder.py");
     136  executePythonScript(pythonfilename_string);
     137#endif
     138
    124139  // handle remaining arguments by CommandLineParser
    125140  if (argc>1) {
Note: See TracChangeset for help on using the changeset viewer.