Changes in / [12a24c:79ac03]


Ignore:
Files:
165 added
17 deleted
77 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    r12a24c r79ac03  
    11ACLOCAL_AMFLAGS = -I m4
    2 SUBDIRS = LinearAlgebra src src/unittests tests utils doc
     2SUBDIRS = LinearAlgebra data/icons src src/unittests tests utils doc
    33
    44AUTOMAKE_OPTIONS = subdir-objects
  • configure.ac

    r12a24c r79ac03  
    33
    44AC_PREREQ(2.59)
    5 AC_INIT(MoleCuilder, 1.3.2, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
     5AC_INIT(MoleCuilder, 1.3.6, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
    66AC_CONFIG_AUX_DIR([build-aux])
    77AC_CONFIG_SRCDIR([src/builder.cpp])
     
    5757                [moc-qt4 moc],
    5858                [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])],
     59                [$have_qtgui_path]
     60        )
     61        AC_PATH_PROGS([QT_RCC],
     62                [rcc-qt4 rcc],
     63                [AC_MSG_ERROR(["Qts rcc not found, please use --with-Qt-bin."])],
    5964                [$have_qtgui_path]
    6065        )
     
    8792# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
    8893AC_SUBST([MOLECUILDER_SO_VERSION], [10:2:0])
    89 AC_SUBST([MOLECUILDER_API_VERSION], [1.3.2])
     94AC_SUBST([MOLECUILDER_API_VERSION], [1.3.6])
    9095
    9196dnl this macro is used to get the arguments supplied
     
    152157BOOST_FOREACH
    153158BOOST_FUNCTION
     159BOOST_FUSION
    154160BOOST_ITERATOR
    155161BOOST_MULTIARRAY
     162BOOST_MPL
    156163BOOST_PREPROCESSOR
    157164BOOST_RANDOM
     
    196203AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"])
    197204
     205# VMG library
     206AC_MSG_CHECKING(whether to compile in long-range support via VMG)
     207AC_ARG_ENABLE(
     208  [vmg],
     209  [AS_HELP_STRING([--enable-vmg], [turn on long-range potential calculation via VMG [default=no]])],
     210  [enable_vmg=$enableval],
     211  enable_vmg="no")
     212AC_MSG_RESULT($enable_vmg)
     213AS_IF([test x"$enable_vmg" != x"no"],[
     214  PKG_CHECK_MODULES(VMG, VMG >= 0.1)
     215  AC_SUBST(VMG_CFLAGS)
     216  AC_SUBST(VMG_LIBS)
     217  AC_DEFINE(HAVE_VMG,1, ["use VMG to calculate long-range contributions."])
     218
     219  # check whether to use mpi
     220  AC_ARG_WITH(
     221      [vmg-mpi],
     222      [AS_HELP_STRING([--with-vmg-mpi], [whether to use MPI for communication in VMGJobs])],
     223      [with_vmg_mpi=yes],
     224      [with_vmg_mpi=no])
     225  AS_IF(
     226    [test "x$with_vmg_mpi" != xno],
     227    [
     228      AC_LANG_SAVE
     229      AC_LANG_CPLUSPLUS
     230      LX_FIND_MPI
     231      AC_LANG_RESTORE
     232      AS_IF([test "x$have_CXX_mpi" = xyes],[
     233            AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings])
     234            AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings])
     235            AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings])
     236            AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings])
     237            AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings])
     238           ])
     239    ],
     240    [])
     241])
     242AM_CONDITIONAL([CONDVMG], [test x"$enable_vmg" = x"yes"])
     243AM_CONDITIONAL([CONDVMGMPI], [test x"$have_CXX_mpi" = x"yes"])
     244
     245
    198246# Checks for header files.
    199247AC_HEADER_STDC
     
    321369        doc/Makefile
    322370        src/Makefile
     371        data/icons/Makefile
    323372        utils/Makefile
    324373])
  • m4/boost.m4

    r12a24c r79ac03  
    571571
    572572
     573# BOOST_FUSION()
     574# ----------------
     575# Look for Boost.Fusion
     576BOOST_DEFUN([Fusion],
     577[BOOST_FIND_HEADER([boost/fusion/sequence.hpp])])
     578
     579
    573580# BOOST_GRAPH([PREFERRED-RT-OPT])
    574581# -------------------------------
     
    652659# Look for Boost.MultiArray
    653660BOOST_DEFUN([MultiArray],
    654 [BOOST_FIND_HEADER([boost/multi_array.hpp])])
    655 
     661[BOOST_FIND_HEADER([boost/mpl/list.hpp])])
     662
     663
     664# BOOST_MMPL()
     665# ------------------
     666# Look for Boost.MPL
     667BOOST_DEFUN([MPL],
     668[BOOST_FIND_HEADER([boost/mpl/for_each.hpp])])
    656669
    657670# BOOST_NUMERIC_CONVERSION()
  • src/Actions/FragmentationAction/FragmentationAutomationAction.cpp

    r12a24c r79ac03  
    3939#include "CodePatterns/MemDebug.hpp"
    4040
     41#include <boost/mpl/remove.hpp>
     42#include <boost/lambda/lambda.hpp>
     43
     44#include "CodePatterns/Assert.hpp"
    4145#include "CodePatterns/Info.hpp"
    4246#include "CodePatterns/Log.hpp"
    43 #include "JobMarket/Controller/FragmentController.hpp"
    4447#include "JobMarket/Jobs/FragmentJob.hpp"
    4548
    46 #include "Atom/atom.hpp"
     49#include "Fragmentation/Automation/createMatrixNrLookup.hpp"
     50#include "Fragmentation/Automation/extractJobIds.hpp"
     51#include "Fragmentation/Automation/FragmentationChargeDensity.hpp"
     52#include "Fragmentation/Automation/FragmentationResults.hpp"
     53#include "Fragmentation/Automation/MPQCFragmentController.hpp"
     54#include "Fragmentation/Automation/VMGDebugGridFragmentController.hpp"
     55#include "Fragmentation/Automation/VMGFragmentController.hpp"
    4756#include "Fragmentation/EnergyMatrix.hpp"
    4857#include "Fragmentation/ForceMatrix.hpp"
    4958#include "Fragmentation/Fragmentation.hpp"
     59#include "Fragmentation/SetValues/Fragment.hpp"
     60#include "Fragmentation/SetValues/Histogram.hpp"
     61#include "Fragmentation/SetValues/IndexedVectors.hpp"
    5062#include "Fragmentation/HydrogenSaturation_enum.hpp"
     63#include "Fragmentation/KeySet.hpp"
    5164#include "Fragmentation/KeySetsContainer.hpp"
     65#include "Fragmentation/Summation/writeTable.hpp"
    5266#include "Graph/DepthFirstSearchAnalysis.hpp"
    53 #include "Jobs/MPQCCommandJob.hpp"
    54 #include "molecule.hpp"
     67#include "Helpers/defs.hpp"
     68#include "Jobs/MPQCJob.hpp"
     69#include "Jobs/MPQCData.hpp"
     70#include "Jobs/MPQCData_printKeyNames.hpp"
     71#ifdef HAVE_VMG
     72#include "Jobs/VMGDebugGridJob.hpp"
     73#include "Jobs/VMGJob.hpp"
     74#include "Jobs/VMGData.hpp"
     75#include "Jobs/VMGDataFused.hpp"
     76#include "Jobs/VMGDataMap.hpp"
     77#include "Jobs/VMGData_printKeyNames.hpp"
     78#endif
    5579#include "World.hpp"
    5680
     81#include <fstream>
    5782#include <iostream>
    5883#include <string>
    5984#include <vector>
     85
     86#include <boost/mpl/for_each.hpp>
    6087
    6188#include "Actions/FragmentationAction/FragmentationAutomationAction.hpp"
     
    74101{
    75102  return NULL;
    76 }
    77 
    78 /** Creates a MPQCCommandJob with argument \a filename.
    79  *
    80  * @param jobs created job is added to this vector
    81  * @param command mpqc command to execute
    82  * @param filename filename being argument to job
    83  * @param nextid id for this job
    84  */
    85 void parsejob(
    86     std::vector<FragmentJob::ptr> &jobs,
    87     const std::string &command,
    88     const std::string &filename,
    89     const JobId_t nextid)
    90 {
    91   std::ifstream file;
    92   file.open(filename.c_str());
    93   ASSERT( file.good(), "parsejob() - file "+filename+" does not exist.");
    94   std::string output((std::istreambuf_iterator<char>(file)),
    95       std::istreambuf_iterator<char>());
    96   FragmentJob::ptr testJob( new MPQCCommandJob(output, nextid, command) );
    97   jobs.push_back(testJob);
    98   file.close();
    99   LOG(1, "INFO: Added MPQCCommandJob from file "+filename+".");
    100103}
    101104
     
    130133
    131134
    132 /** Print MPQCData from received results.
    133  *
    134  * @param results received results to extract MPQCData from
    135  * @param KeySetFilename filename with keysets to associate forces correctly
     135
     136/** Place results from FragmentResult into EnergyMatrix and ForceMatrix.
     137 *
     138 * @param fragmentData MPQCData resulting from the jobs
     139 * @param MatrixNrLookup Lookup up-map from job id to fragment number
     140 * @param FragmentCounter total number of fragments
    136141 * @param NoAtoms total number of atoms
     142 * @param Energy energy matrix to be filled on return
     143 * @param Force force matrix to be filled on return
     144 * @return true - everything ok, false - else
    137145 */
    138 bool printReceivedMPQCResults(
    139     const std::vector<FragmentResult::ptr> &results,
    140     const std::string &KeySetFilename,
    141     size_t NoAtoms)
     146bool putResultsintoMatrices(
     147    const std::map<JobId_t, MPQCData> &fragmentData,
     148    const std::map< JobId_t, size_t > &MatrixNrLookup,
     149    const size_t FragmentCounter,
     150    const size_t NoAtoms,
     151    EnergyMatrix &Energy,
     152    ForceMatrix &Force)
    142153{
    143   EnergyMatrix Energy;
    144   EnergyMatrix EnergyFragments;
    145   ForceMatrix Force;
    146   ForceMatrix ForceFragments;
    147   KeySetsContainer KeySet;
    148 
    149   // align fragments
    150   std::map< JobId_t, size_t > MatrixNrLookup;
    151   size_t FragmentCounter = 0;
    152   {
    153     // bring ids in order ...
    154     typedef std::map< JobId_t, FragmentResult::ptr> IdResultMap_t;
    155     IdResultMap_t IdResultMap;
    156     for (std::vector<FragmentResult::ptr>::const_iterator iter = results.begin();
    157         iter != results.end(); ++iter) {
    158   #ifndef NDEBUG
    159       std::pair< IdResultMap_t::iterator, bool> inserter =
    160   #endif
    161       IdResultMap.insert( make_pair((*iter)->getId(), *iter) );
    162       ASSERT( inserter.second,
    163           "printReceivedMPQCResults() - two results have same id "
    164           +toString((*iter)->getId())+".");
    165     }
    166     // ... and fill lookup
    167     for(IdResultMap_t::const_iterator iter = IdResultMap.begin();
    168         iter != IdResultMap.end(); ++iter)
    169       MatrixNrLookup.insert( make_pair(iter->first, FragmentCounter++) );
    170   }
    171   LOG(1, "INFO: There are " << FragmentCounter << " fragments.");
    172 
    173   // extract results
    174   std::vector<MPQCData> fragmentData(results.size());
    175   MPQCData combinedData;
    176 
    177   LOG(2, "DEBUG: Parsing now through " << results.size() << " results.");
    178   for (std::vector<FragmentResult::ptr>::const_iterator iter = results.begin();
    179       iter != results.end(); ++iter) {
    180     LOG(1, "RESULT: job #"+toString((*iter)->getId())+": "+toString((*iter)->result));
    181     MPQCData extractedData;
    182     std::stringstream inputstream((*iter)->result);
    183     LOG(2, "DEBUG: First 50 characters FragmentResult's string: "+(*iter)->result.substr(0, 50));
    184     boost::archive::text_iarchive ia(inputstream);
    185     ia >> extractedData;
    186     LOG(1, "INFO: extracted data is " << extractedData << ".");
    187 
     154  for (std::map<JobId_t, MPQCData>::const_iterator dataiter = fragmentData.begin();
     155      dataiter != fragmentData.end(); ++dataiter) {
     156    const MPQCData &extractedData = dataiter->second;
     157    const JobId_t &jobid = dataiter->first;
     158    std::map< JobId_t, size_t >::const_iterator nriter = MatrixNrLookup.find(jobid);
     159    ASSERT( nriter != MatrixNrLookup.end(),
     160        "putResultsintoMatrices() - MatrixNrLookup does not contain id "
     161        +toString(jobid)+".");
    188162    // place results into EnergyMatrix ...
    189163    {
    190164      MatrixContainer::MatrixArray matrix;
    191165      matrix.resize(1);
    192       matrix[0].resize(1, extractedData.energy);
     166      matrix[0].resize(1, extractedData.energies.total);
    193167      if (!Energy.AddMatrix(
    194           std::string("MPQCJob ")+toString((*iter)->getId()),
     168          std::string("MPQCJob ")+toString(jobid),
    195169          matrix,
    196           MatrixNrLookup[(*iter)->getId()])) {
     170          nriter->second)) {
    197171        ELOG(1, "Adding energy matrix failed.");
    198172        return false;
     
    213187      }
    214188      if (!Force.AddMatrix(
    215           std::string("MPQCJob ")+toString((*iter)->getId()),
     189          std::string("MPQCJob ")+toString(jobid),
    216190          matrix,
    217           MatrixNrLookup[(*iter)->getId()])) {
     191          nriter->second)) {
    218192        ELOG(1, "Adding force matrix failed.");
    219193        return false;
     
    234208    return false;
    235209
     210  return true;
     211}
     212
     213/** Print MPQCData from received results.
     214 *
     215 * @param fragmentData MPQCData resulting from the jobs, associated to job id
     216 * @param KeySetFilename filename with keysets to associate forces correctly
     217 * @param NoAtoms total number of atoms
     218 * @param full_sample summed up charge from fragments on return
     219 */
     220bool printReceivedMPQCResults(
     221    const std::map<JobId_t, MPQCData> &fragmentData,
     222    const std::string &KeySetFilename,
     223    size_t NoAtoms)
     224{
     225  // create a vector of all job ids
     226  std::vector<JobId_t> jobids;
     227  std::transform(fragmentData.begin(),fragmentData.end(),
     228      std::back_inserter(jobids),
     229      boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )
     230  );
     231
     232  // create lookup from job nr to fragment number
     233  size_t FragmentCounter = 0;
     234  const std::map< JobId_t, size_t > MatrixNrLookup=
     235      createMatrixNrLookup(jobids, FragmentCounter);
     236
     237  // place results into maps
     238  EnergyMatrix Energy;
     239  ForceMatrix Force;
     240  if (!putResultsintoMatrices(fragmentData, MatrixNrLookup, FragmentCounter, NoAtoms, Energy, Force))
     241    return false;
     242
     243  // initialise keysets
     244  KeySetsContainer KeySet;
     245  KeySetsContainer ForceKeySet;
     246  if (!Energy.InitialiseIndices()) return false;
     247
     248  if (!Force.ParseIndices(KeySetFilename.c_str())) return false;
     249
     250  {
     251    // else needs keysets without hydrogens
     252    std::stringstream filename;
     253    filename << FRAGMENTPREFIX << KEYSETFILE;
     254    if (!KeySet.ParseKeySets(KeySetFilename, filename.str(), FragmentCounter)) return false;
     255  }
     256
     257  {
     258    // forces need keysets including hydrogens
     259    std::stringstream filename;
     260    filename << FRAGMENTPREFIX << FORCESFILE;
     261    if (!ForceKeySet.ParseKeySets(KeySetFilename, filename.str(), FragmentCounter)) return false;
     262  }
    236263
    237264  // combine all found data
    238   if (!Energy.InitialiseIndices()) return false;
    239 
    240   if (!Force.ParseIndices(KeySetFilename.c_str())) return false;
    241 
    242   if (!KeySet.ParseKeySets(KeySetFilename.c_str(), Force.RowCounter, Force.MatrixCounter)) return false;
    243 
    244265  if (!KeySet.ParseManyBodyTerms()) return false;
    245266
     267  EnergyMatrix EnergyFragments;
     268  ForceMatrix ForceFragments;
    246269  if (!EnergyFragments.AllocateMatrix(Energy.Header, Energy.MatrixCounter, Energy.RowCounter, Energy.ColumnCounter)) return false;
    247270  if (!ForceFragments.AllocateMatrix(Force.Header, Force.MatrixCounter, Force.RowCounter, Force.ColumnCounter)) return false;
     
    275298}
    276299
     300void writeToFile(const std::string &filename, const std::string contents)
     301{
     302  std::ofstream tablefile(filename.c_str());
     303  tablefile << contents;
     304  tablefile.close();
     305}
     306
     307/** Print MPQCData from received results.
     308 *
     309 * @param results summed up results container
     310 */
     311void printReceivedFullResults(
     312    const FragmentationResults &results)
     313{
     314  // print tables (without eigenvalues, they go extra)
     315  {
     316    typedef boost::mpl::remove<MPQCDataEnergyVector_t, MPQCDataFused::energy_eigenvalues>::type
     317      MPQCDataEnergyVector_noeigenvalues_t;
     318    const std::string energyresult =
     319        writeTable<MPQCDataEnergyMap_t, MPQCDataEnergyVector_noeigenvalues_t >()(
     320            results.Result_Energy_fused, results.getMaxLevel());
     321    LOG(0, "Energy table is \n" << energyresult);
     322    std::string filename;
     323    filename += FRAGMENTPREFIX + std::string("_Energy.dat");
     324    writeToFile(filename, energyresult);
     325  }
     326
     327  {
     328    const std::string gridresult =
     329        writeTable<VMGDataMap_t, VMGDataVector_t >()(
     330            results.Result_LongRange_fused, results.getMaxLevel(), 2);
     331    LOG(0, "VMG table is \n" << gridresult);
     332    std::string filename;
     333    filename += FRAGMENTPREFIX + std::string("_VMGEnergy.dat");
     334    writeToFile(filename, gridresult);
     335  }
     336
     337  {
     338    const std::string gridresult =
     339        writeTable<VMGDataLongRangeMap_t, VMGDataLongRangeVector_t >()(
     340            results.Result_LongRangeIntegrated_fused, results.getMaxLevel(), 2);
     341    LOG(0, "LongRange table is \n" << gridresult);
     342    std::string filename;
     343    filename += FRAGMENTPREFIX + std::string("_LongRangeEnergy.dat");
     344    writeToFile(filename, gridresult);
     345  }
     346
     347  {
     348    const std::string eigenvalueresult;
     349    LOG(0, "Eigenvalue table is \n" << eigenvalueresult);
     350    std::string filename;
     351    filename += FRAGMENTPREFIX + std::string("_Eigenvalues.dat");
     352    writeToFile(filename, eigenvalueresult);
     353  }
     354
     355  {
     356    const std::string forceresult =
     357        writeTable<MPQCDataForceMap_t, MPQCDataForceVector_t>()(
     358            results.Result_Force_fused, results.getMaxLevel());
     359    LOG(0, "Force table is \n" << forceresult);
     360    std::string filename;
     361    filename += FRAGMENTPREFIX + std::string("_Forces.dat");
     362    writeToFile(filename, forceresult);
     363  }
     364  // we don't want to print grid to a table
     365  {
     366    // print times (without flops for now)
     367    typedef boost::mpl::remove<
     368        boost::mpl::remove<MPQCDataTimeVector_t, MPQCDataFused::times_total_flops>::type,
     369        MPQCDataFused::times_gather_flops>::type
     370        MPQCDataTimeVector_noflops_t;
     371    const std::string timesresult =
     372        writeTable<MPQCDataTimeMap_t, MPQCDataTimeVector_noflops_t >()(
     373            results.Result_Time_fused, results.getMaxLevel());
     374    LOG(0, "Times table is \n" << timesresult);
     375    std::string filename;
     376    filename += FRAGMENTPREFIX + std::string("_Times.dat");
     377    writeToFile(filename, timesresult);
     378  }
     379}
     380
     381
    277382Action::state_ptr FragmentationFragmentationAutomationAction::performCall() {
    278383  boost::asio::io_service io_service;
    279   FragmentController controller(io_service);
    280384
    281385  // TODO: Have io_service run in second thread and merge with current again eventually
    282386
    283   // Phase One: obtain ids
    284   std::vector< boost::filesystem::path > jobfiles = params.jobfiles.get();
    285   controller.requestIds(params.host.get(), params.port.get(), jobfiles.size());
    286   {
    287     io_service.reset();
    288     Info info("io_service: Phase One");
    289     io_service.run();
    290   }
    291   // Phase Two: create and add jobs
    292   {
    293     std::vector<FragmentJob::ptr> jobs;
    294     for (std::vector< boost::filesystem::path >::const_iterator iter = jobfiles .begin();
    295         iter != jobfiles .end(); ++iter) {
    296       const std::string &filename = (*iter).string();
    297       if (boost::filesystem::exists(filename)) {
    298         const JobId_t next_id = controller.getAvailableId();
    299         LOG(1, "INFO: Creating MPQCCommandJob with filename'"
    300             +filename+"', and id "+toString(next_id)+".");
    301         parsejob(jobs, params.executable.get().string(), filename, next_id);
    302       } else {
    303         ELOG(1, "Fragment job "+filename+" does not exist.");
     387  size_t Exitflag = 0;
     388  std::map<JobId_t, MPQCData> fragmentData;
     389  {
     390    MPQCFragmentController mpqccontroller(io_service);
     391    mpqccontroller.setHost(params.host.get());
     392    mpqccontroller.setPort(params.port.get());
     393    mpqccontroller.setLevel(params.level.get());
     394    // Phase One: obtain ids
     395    std::vector< boost::filesystem::path > jobfiles = params.jobfiles.get();
     396    mpqccontroller.requestIds(jobfiles.size());
     397
     398    // Phase Two: create and add MPQCJobs
     399    if (!mpqccontroller.addJobsFromFiles(params.executable.get().string(), jobfiles))
     400      return Action::failure;
     401
     402    // Phase Three: calculate result
     403    mpqccontroller.waitforResults(jobfiles.size());
     404    mpqccontroller.getResults(fragmentData);
     405
     406    Exitflag += mpqccontroller.getExitflag();
     407  }
     408
     409#ifdef HAVE_VMG
     410  if (params.DoLongrange.get()) {
     411  if ( World::getInstance().getAllAtoms().size() == 0) {
     412    ELOG(1, "Please load the full molecule into the world before starting this action.");
     413    return Action::failure;
     414  }
     415
     416  // obtain combined charge density
     417  FragmentationChargeDensity summedChargeDensity(
     418      fragmentData,
     419      params.path.get());
     420  const std::vector<SamplingGrid> full_sample = summedChargeDensity.getFullSampledGrid();
     421
     422  LOG(1, "INFO: There are " << fragmentData.size() << " short-range and "
     423      << full_sample.size() << " level-wise long-range jobs.");
     424
     425  // Phase Four: obtain more ids
     426  std::map<JobId_t, VMGData> longrangeData;
     427  {
     428    VMGFragmentController vmgcontroller(io_service);
     429    vmgcontroller.setHost(params.host.get());
     430    vmgcontroller.setPort(params.port.get());
     431    const size_t NoJobs = fragmentData.size()+full_sample.size();
     432    vmgcontroller.requestIds(NoJobs);
     433
     434    // Phase Five: create VMGJobs
     435    const size_t near_field_cells = params.near_field_cells.get();
     436    const size_t interpolation_degree = params.interpolation_degree.get();
     437    if (!vmgcontroller.createLongRangeJobs(
     438        fragmentData,
     439        full_sample,
     440        summedChargeDensity.getFragment(),
     441        near_field_cells,
     442        interpolation_degree))
     443      return Action::failure;
     444
     445    // Phase Six: calculate result
     446    vmgcontroller.waitforResults(NoJobs);
     447    vmgcontroller.getResults(longrangeData);
     448    ASSERT( NoJobs == longrangeData.size(),
     449        "FragmentationFragmentationAutomationAction::performCall() - number of MPQCresults+"
     450        +toString(full_sample.size())+"="+toString(NoJobs)
     451        +" and VMGresults "+toString(longrangeData.size())+" don't match.");
     452    Exitflag += vmgcontroller.getExitflag();
     453  }
     454
     455  // remove full solution corresponding to full_sample from map (must be highest ids), has to be treated extra
     456  std::map<JobId_t, VMGData>::iterator iter = longrangeData.end();
     457  for (size_t i=0;i<full_sample.size();++i)
     458    --iter;
     459  std::map<JobId_t, VMGData>::iterator remove_iter = iter;
     460  std::vector<VMGData> fullsolutionData;
     461  for (; iter != longrangeData.end(); ++iter)
     462    fullsolutionData.push_back(iter->second);
     463  longrangeData.erase(remove_iter, longrangeData.end());
     464
     465  // Final phase: sum up and print result
     466  {
     467    FragmentationResults results(
     468        fragmentData,
     469        longrangeData,
     470        fullsolutionData,
     471        params.path.get(),
     472        getNoAtomsFromAdjacencyFile(params.path.get()),
     473        full_sample);
     474
     475    LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
     476    printReceivedFullResults(results);
     477  }
     478
     479  std::map<JobId_t, std::string> debugData;
     480  {
     481    if (!full_sample.empty()) {
     482      // create debug jobs for each level to print the summed-up potential to vtk files
     483      VMGDebugGridFragmentController debugcontroller(io_service);
     484      debugcontroller.setHost(params.host.get());
     485      debugcontroller.setPort(params.port.get());
     486      debugcontroller.requestIds(full_sample.size());
     487      if (!debugcontroller.createDebugJobs(full_sample))
    304488        return Action::failure;
    305       }
     489      debugcontroller.waitforResults(full_sample.size());
     490      debugcontroller.getResults(debugData);
     491      Exitflag += debugcontroller.getExitflag();
    306492    }
    307     controller.addJobs(jobs);
    308     controller.sendJobs(params.host.get(), params.port.get());
    309   }
    310   {
    311     io_service.reset();
    312     Info info("io_service: Phase Two");
    313     io_service.run();
    314   }
    315   // Phase Three: calculate result
    316   size_t NoCalculatedResults = 0;
    317   while (NoCalculatedResults != jobfiles.size()) {
    318     // wait a bit
    319     boost::asio::deadline_timer timer(io_service);
    320     timer.expires_from_now(boost::posix_time::milliseconds(500));
    321     timer.wait();
    322     // then request status
    323     controller.checkResults(params.host.get(), params.port.get());
    324     {
    325       io_service.reset();
    326       Info info("io_service: Phase Three");
    327       io_service.run();
    328     }
    329     const std::pair<size_t, size_t> JobStatus = controller.getJobStatus();
    330     LOG(1, "INFO: #" << JobStatus.first << " are waiting in the queue and #" << JobStatus.second << " jobs are calculated so far.");
    331     NoCalculatedResults = JobStatus.second;
    332   }
    333   // Phase Three: get result
    334   controller.receiveResults(params.host.get(), params.port.get());
    335   {
    336     io_service.reset();
    337     Info info("io_service: Phase Four");
    338     io_service.run();
    339   }
     493  }
     494  }
     495#else
    340496  // Final phase: print result
    341497  {
    342498    LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
    343     std::vector<FragmentResult::ptr> results = controller.getReceivedResults();
    344499    printReceivedMPQCResults(
    345         results,
     500        fragmentData,
    346501        params.path.get(),
    347502        getNoAtomsFromAdjacencyFile(params.path.get()));
    348503  }
    349   size_t Exitflag = controller.getExitflag();
     504#endif
    350505
    351506  return (Exitflag == 0) ? Action::success : Action::failure;
  • src/Actions/FragmentationAction/FragmentationAutomationAction.def

    r12a24c r79ac03  
    1313#include "Parameters/Validators/DummyValidator.hpp"
    1414#include "Parameters/Validators/Ops_Validator.hpp"
     15#include "Parameters/Validators/RangeValidator.hpp"
    1516#include "Parameters/Validators/STLVectorValidator.hpp"
    1617#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
     
    2021// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    2122// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    22 #define paramtypes (std::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path)
    23 #define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable")
    24 #define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("hostname of server")("controller port of server")("executable to launch on clients")
    25 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))(PARAM_DEFAULT("1026"))(NOPARAM_DEFAULT)
    26 #define paramreferences (jobfiles)(path)(host)(port)(executable)
     23#define paramtypes (std::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)
     24#define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")
     25#define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")
     26#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))(PARAM_DEFAULT("1026"))(NOPARAM_DEFAULT)(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))
     27#define paramreferences (jobfiles)(path)(host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)
    2728#define paramvalids \
    2829(STLVectorValidator< std::vector< boost::filesystem::path > >(ParserFileValidator() && FilePresentValidator())) \
     
    3031(DummyValidator< std::string >()) \
    3132(DummyValidator< std::string >()) \
    32 (DummyValidator< boost::filesystem::path >())
     33(DummyValidator< boost::filesystem::path >()) \
     34(RangeValidator< unsigned int >(1, 10)) \
     35(RangeValidator< unsigned int >(1, 20)) \
     36(RangeValidator< unsigned int >(1, 10)) \
     37(DummyValidator< bool >())
    3338
    3439#undef statetypes
  • src/Actions/GlobalListOfActions.hpp

    r12a24c r79ac03  
    101101  (SelectionNotAtomById) \
    102102  (SelectionNotAtomByOrder) \
    103   (SelectionAllAtomsInsideCuboid) \
    104103  (SelectionAllAtoms) \
    105104  (SelectionClearAllAtoms) \
     
    107106  (SelectionNotAllAtoms) \
    108107  (SelectionNotAtomByElement) \
    109   (SelectionAllAtomsInsideSphere) \
     108  (SelectionAllAtomsInsideVolume) \
    110109  (SelectionAllAtomsOfMolecule) \
    111   (SelectionNotAllAtomsInsideSphere) \
     110  (SelectionNotAllAtomsInsideVolume) \
    112111  (SelectionAtomByElement) \
    113112  (SelectionNotAllAtomsOfMolecule) \
    114   (SelectionNotAllAtomsInsideCuboid) \
    115113  (SelectionAtomById) \
    116114  (SelectionAtomByOrder) \
     115  (SelectionAllShapes) \
     116  (SelectionShapeByName) \
     117  (SelectionNotAllShapes) \
     118  (SelectionNotShapeByName) \
    117119  (FragmentationFragmentation) \
    118120  (FillRegularGrid) \
    119   (FillSphericalSurface)
     121  (FillSurface) \
     122  (ShapeCombineShapes) \
     123  (ShapeCreateShape) \
     124  (ShapeRemoveShape)
    120125
    121126// we need to append the automation action in case we have the JobMarket
  • src/Actions/Makefile.am

    r12a24c r79ac03  
    6060  ${SELECTIONATOMACTIONSOURCE} \
    6161  ${SELECTIONMOLECULEACTIONSOURCE} \
     62  ${SELECTIONSHAPEACTIONSOURCE} \
     63  ${SHAPEACTIONSOURCE} \
    6264  ${TESSELATIONACTIONSOURCE} \
    6365  $(UNDOACTIONSOURCE) \
     
    7678  ${SELECTIONATOMACTIONHEADER} \
    7779  ${SELECTIONMOLECULEACTIONHEADER} \
     80  ${SELECTIONSHAPEACTIONHEADER} \
     81  ${SHAPEACTIONHEADER} \
    7882  ${TESSELATIONACTIONHEADER} \
    7983  $(UNDOACTIONHEADER) \
     
    9296  ${SELECTIONATOMACTIONDEFS} \
    9397  ${SELECTIONMOLECULEACTIONDEFS} \
     98  ${SELECTIONSHAPEACTIONDEFS} \
     99  ${SHAPEACTIONDEFS} \
    94100  ${TESSELATIONACTIONDEFS} \
    95101  $(UNDOACTIONDEFS) \
     
    182188FILLACTIONSOURCE = \
    183189        Actions/FillAction/FillRegularGridAction.cpp \
    184         Actions/FillAction/FillSphericalSurfaceAction.cpp
     190        Actions/FillAction/FillSurfaceAction.cpp
    185191FILLACTIONHEADER = \
    186192        Actions/FillAction/FillRegularGridAction.hpp \
    187         Actions/FillAction/FillSphericalSurfaceAction.hpp
     193        Actions/FillAction/FillSurfaceAction.hpp
    188194FILLACTIONDEFS = \
    189195        Actions/FillAction/FillRegularGridAction.def \
    190         Actions/FillAction/FillSphericalSurfaceAction.def
     196        Actions/FillAction/FillSurfaceAction.def
    191197
    192198
     
    303309SELECTIONATOMACTIONSOURCE = \
    304310  Actions/SelectionAction/Atoms/AllAtomsAction.cpp \
    305   Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.cpp \
    306   Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.cpp \
     311  Actions/SelectionAction/Atoms/AllAtomsInsideVolumeAction.cpp \
    307312  Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.cpp \
    308313  Actions/SelectionAction/Atoms/AtomByElementAction.cpp \
     
    312317  Actions/SelectionAction/Atoms/InvertAtomsAction.cpp \
    313318  Actions/SelectionAction/Atoms/NotAllAtomsAction.cpp \
    314   Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.cpp \
    315   Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.cpp \
     319  Actions/SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.cpp \
    316320  Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.cpp \
    317321  Actions/SelectionAction/Atoms/NotAtomByElementAction.cpp \
     
    320324SELECTIONATOMACTIONHEADER = \
    321325  Actions/SelectionAction/Atoms/AllAtomsAction.hpp \
    322   Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.hpp \
    323   Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.hpp \
     326  Actions/SelectionAction/Atoms/AllAtomsInsideVolumeAction.hpp \
    324327  Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.hpp \
    325328  Actions/SelectionAction/Atoms/AtomByElementAction.hpp \
     
    329332  Actions/SelectionAction/Atoms/InvertAtomsAction.hpp \
    330333  Actions/SelectionAction/Atoms/NotAllAtomsAction.hpp \
    331   Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.hpp \
    332   Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.hpp \
     334  Actions/SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.hpp \
    333335  Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.hpp \
    334336  Actions/SelectionAction/Atoms/NotAtomByElementAction.hpp \
     
    337339SELECTIONATOMACTIONDEFS = \
    338340  Actions/SelectionAction/Atoms/AllAtomsAction.def \
    339   Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.def \
    340   Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.def \
     341  Actions/SelectionAction/Atoms/AllAtomsInsideVolumeAction.def \
    341342  Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.def \
    342343  Actions/SelectionAction/Atoms/AtomByElementAction.def \
     
    346347  Actions/SelectionAction/Atoms/InvertAtomsAction.def \
    347348  Actions/SelectionAction/Atoms/NotAllAtomsAction.def \
    348   Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.def \
    349   Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.def \
     349  Actions/SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.def \
    350350  Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.def \
    351351  Actions/SelectionAction/Atoms/NotAtomByElementAction.def \
     
    398398  Actions/SelectionAction/Molecules/NotMoleculeByOrderAction.def \
    399399  Actions/SelectionAction/Molecules/NotMoleculeOfAtomAction.def
     400                 
     401SELECTIONSHAPEACTIONSOURCE = \
     402  Actions/SelectionAction/Shapes/AllShapesAction.cpp \
     403  Actions/SelectionAction/Shapes/ShapeByNameAction.cpp \
     404  Actions/SelectionAction/Shapes/NotAllShapesAction.cpp \
     405  Actions/SelectionAction/Shapes/NotShapeByNameAction.cpp
     406SELECTIONSHAPEACTIONHEADER = \
     407  Actions/SelectionAction/Shapes/AllShapesAction.hpp \
     408  Actions/SelectionAction/Shapes/ShapeByNameAction.hpp \
     409  Actions/SelectionAction/Shapes/NotAllShapesAction.hpp \
     410  Actions/SelectionAction/Shapes/NotShapeByNameAction.hpp
     411SELECTIONSHAPEACTIONDEFS = \
     412  Actions/SelectionAction/Shapes/AllShapesAction.def \
     413  Actions/SelectionAction/Shapes/ShapeByNameAction.def \
     414  Actions/SelectionAction/Shapes/NotAllShapesAction.def \
     415  Actions/SelectionAction/Shapes/NotShapeByNameAction.def
     416       
     417SHAPEACTIONSOURCE = \
     418  Actions/ShapeAction/CombineShapesAction.cpp \
     419  Actions/ShapeAction/CreateShapeAction.cpp \
     420  Actions/ShapeAction/RemoveShapeAction.cpp
     421SHAPEACTIONHEADER = \
     422  Actions/ShapeAction/CombineShapesAction.hpp \
     423  Actions/ShapeAction/CreateShapeAction.hpp \
     424  Actions/ShapeAction/RemoveShapeAction.hpp
     425SHAPEACTIONDEFS = \
     426  Actions/ShapeAction/CombineShapesAction.def \
     427  Actions/ShapeAction/CreateShapeAction.def \
     428  Actions/ShapeAction/RemoveShapeAction.def
    400429       
    401430TESSELATIONACTIONSOURCE = \
    402431  Actions/TesselationAction/ConvexEnvelopeAction.cpp \
    403   Actions/TesselationAction/NonConvexEnvelopeAction.cpp               
     432  Actions/TesselationAction/NonConvexEnvelopeAction.cpp
    404433TESSELATIONACTIONHEADER = \
    405434  Actions/TesselationAction/ConvexEnvelopeAction.hpp \
  • src/Fragmentation/Homology/HomologyContainer.cpp

    r12a24c r79ac03  
    5959}
    6060
    61 std::ostream& operator<<(std::ostream &out, const Fragment &container)
    62 {
    63   out << "Dummy fragment";
    64   return out;
    65 }
    66 
    6761bool HomologyContainer::operator>=(const HomologyContainer &other) const
    6862{
  • src/Fragmentation/Homology/HomologyContainer.hpp

    r12a24c r79ac03  
    2424
    2525#include "Fragmentation/Homology/HomologyGraph.hpp"
    26 
    27 class Fragment
    28 {
    29   //!> grant access to output operator
    30   friend std::ostream& operator<<(std::ostream &out, const Fragment &container);
    31 public:
    32   typedef std::vector<double> position_t;
    33   typedef std::vector< position_t > positions_t;
    34   typedef std::vector< double > charges_t;
    35   typedef std::pair< position_t, double> nucleus_t;
    36   typedef std::vector< nucleus_t > nuclei_t;
    37   Fragment() {}
    38   Fragment(const positions_t &_positions, const charges_t &_charges) {}
    39 
    40   bool operator==(const Fragment &other) const {
    41     return true;
    42   }
    43 
    44 private:
    45   friend class boost::serialization::access;
    46   // serialization
    47   template <typename Archive>
    48   void serialize(Archive& ar, const unsigned int version)
    49   {}
    50 };
    51 
    52 std::ostream& operator<<(std::ostream &out, const Fragment &container);
    53 
    54 // we need to give this class a unique key for serialization
    55 BOOST_CLASS_EXPORT_KEY(Fragment)
     26#include "Fragmentation/SetValues/Fragment.hpp"
    5627
    5728class HomologyContainerTest;
  • src/Fragmentation/KeySetsContainer.cpp

    r12a24c r79ac03  
    3737#include <fstream>
    3838#include <sstream>
     39
     40#include <boost/lexical_cast.hpp>
     41#include <boost/tokenizer.hpp>
    3942
    4043#include "CodePatterns/Log.hpp"
     
    7275 * \return parsing succesful
    7376 */
    74 bool KeySetsContainer::ParseKeySets(const std::string name, const IntVector ACounter, const int FCounter) {
     77bool KeySetsContainer::ParseKeySets(const std::string path, const std::string name, const int FCounter) {
    7578  ifstream input;
    76   char *FragmentNumber = NULL;
     79  //char *FragmentNumber = NULL;
    7780  stringstream file;
    7881  char filename[1023];
    7982
    8083  FragmentCounter = FCounter;
    81   LOG(0, "Parsing key sets.");
    8284  KeySets.resize(FragmentCounter);
    83   file << name << FRAGMENTPREFIX << KEYSETFILE;
     85  AtomCounter.resize(FragmentCounter);
     86
     87  // open file
     88  file << path << "/" << name;
    8489  input.open(file.str().c_str(), ios::in);
    8590  if (input.fail()) {
     
    8893  }
    8994
    90   AtomCounter.resize(FragmentCounter);
     95  // parse each line, i.e. get the index set per fragment
     96  LOG(0, "Parsing key sets.");
    9197  for(int i=0;(i<FragmentCounter) && (!input.eof());i++) {
    92     stringstream line;
    93     AtomCounter[i] = ACounter[i];
    94     // parse the values
    95     KeySets[i].resize(AtomCounter[i]);
    96     for(int j=AtomCounter[i];j--;)
    97       KeySets[i][j] = -1;
    98     FragmentNumber = FixedDigitNumber(FragmentCounter, i);
    99     //std::stringstream output;
    100     //output << FRAGMENTPREFIX << FragmentNumber << "[" << AtomCounter[i] << "]:";
    101     delete[](FragmentNumber);
    10298    input.getline(filename, 1023);
    103     line.str(filename);
    104     for(int j=0;(j<AtomCounter[i]) && (!line.eof());j++) {
    105       line >> KeySets[i][j];
    106       //output << " " << KeySets[i][j];
     99    string line(filename);
     100//    LOG(2, "DEBUG: line is " << line << ".");
     101    std::stringstream set_output;
     102    typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
     103    boost::char_separator<char> sep(" \t");
     104    tokenizer tok(line, sep);
     105    for(tokenizer::iterator beg=tok.begin();
     106        beg != tok.end();++beg){
     107      const int tempvalue = boost::lexical_cast<int>(*beg);
     108      KeySets[i].push_back(tempvalue);
     109//      set_output << " " << KeySets[i].back();
    107110    }
    108     //LOG(0, output.str());
     111//    LOG(2, "DEBUG: Scanned keys are '" << set_output.str() << "'.");
     112    AtomCounter[i] = KeySets[i].size();
     113//    {
     114//      std::stringstream output;
     115//      FragmentNumber = FixedDigitNumber(FragmentCounter, i);
     116//      output << FRAGMENTPREFIX << FragmentNumber << "[" << AtomCounter[i] << "]:" << set_output.str();
     117//      delete[](FragmentNumber);
     118//      LOG(0, output.str());
     119//    }
    109120  }
    110121  input.close();
  • src/Fragmentation/KeySetsContainer.hpp

    r12a24c r79ac03  
    3535  ~KeySetsContainer();
    3636
    37   bool ParseKeySets(const std::string name, const std::vector<int> ACounter, const int FCounter);
     37  bool ParseKeySets(const std::string path, const std::string name, const int FCounter);
    3838  bool ParseManyBodyTerms();
    3939  bool Contains(const int GreaterSet, const int SmallerSet);
  • src/Fragmentation/analyzer.cpp

    r12a24c r79ac03  
    182182
    183183  // ---------- Parse the KeySets into an array ---------------
    184   if (!KeySet.ParseKeySets(argv[1], Force.RowCounter, Force.MatrixCounter)) return 1;
     184  {
     185    std::stringstream filename;
     186    filename << FRAGMENTPREFIX << KEYSETFILE;
     187    if (!KeySet.ParseKeySets(argv[1], filename.str(), Force.MatrixCounter)) return 1;
     188  }
    185189  if (!KeySet.ParseManyBodyTerms()) return 1;
    186190
  • src/Fragmentation/joiner.cpp

    r12a24c r79ac03  
    147147
    148148  // ---------- Parse the KeySets into an array ---------------
    149   if (!KeySet.ParseKeySets(argv[1], Force.RowCounter, Force.MatrixCounter)) return 1;
     149  {
     150    std::stringstream filename;
     151    filename << FRAGMENTPREFIX << KEYSETFILE;
     152    if (!KeySet.ParseKeySets(argv[1], filename.str(), Force.MatrixCounter)) return 1;
     153  }
    150154
    151155  if (!KeySet.ParseManyBodyTerms()) return 1;
  • src/Jobs/MPQCCommandJob.cpp

    r12a24c r79ac03  
    134134      tok_iter++;
    135135      std::stringstream energystring(*tok_iter);
    136       energystring >> data.energy;
     136      energystring >> data.energies.total;
    137137    }
    138138    // ... and forces ("Total Gradient") from resultstring
  • src/Jobs/MPQCCommandJob.hpp

    r12a24c r79ac03  
    2121#include "JobMarket/Jobs/SystemCommandJob.hpp"
    2222
    23 #include "Jobs/MPQCCommandJob_MPQCData.hpp"
     23#include "Jobs/MPQCData.hpp"
    2424
    2525class MPQCCommandJobTest;
  • src/Jobs/Makefile.am

    r12a24c r79ac03  
    44JOBSSOURCE = \
    55        Jobs/MPQCCommandJob.cpp \
    6         Jobs/MPQCCommandJob_MPQCData.cpp
     6        Jobs/MPQCData.cpp \
     7        Jobs/MPQCJob.cpp
     8if CONDVMG
     9JOBSSOURCE += \
     10        Jobs/InterfaceVMGDebugGridJob.cpp \
     11        Jobs/InterfaceVMGJob.cpp \
     12        Jobs/VMGData.cpp \
     13        Jobs/VMGDebugGridJob.cpp \
     14        Jobs/VMGJob.cpp
     15endif
    716
    817JOBSHEADER = \
    918        Jobs/MPQCCommandJob.hpp \
    10         Jobs/MPQCCommandJob_MPQCData.hpp
     19        Jobs/MPQCData.hpp \
     20        Jobs/MPQCDataFused.hpp \
     21        Jobs/MPQCDataMap.hpp \
     22        Jobs/MPQCData_printKeyNames.hpp \
     23        Jobs/MPQCJob.hpp
     24if CONDVMG
     25JOBSHEADER += \
     26        Jobs/InterfaceVMGDebugGridJob.hpp \
     27        Jobs/InterfaceVMGJob.hpp \
     28        Jobs/VMGData.hpp \
     29  Jobs/VMGDataFused.hpp \
     30  Jobs/VMGDataMap.hpp \
     31  Jobs/VMGData_printKeyNames.hpp \
     32        Jobs/VMGDebugGridJob.hpp \
     33        Jobs/VMGJob.hpp
     34endif
    1135
    1236lib_LTLIBRARIES += libMolecuilderJobs.la
    1337libMolecuilderJobs_la_includedir = $(includedir)/MoleCuilder/
    1438nobase_libMolecuilderJobs_la_include_HEADERS = $(JOBSHEADER)
    15 libMolecuilderJobs_la_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} ${JobMarket_CFLAGS}
     39libMolecuilderJobs_la_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} ${JobMarket_CFLAGS} -Dvmg_float=double -Dvmg_int=int $(VMG_CFLAGS)
    1640libMolecuilderJobs_la_LDFLAGS = $(AM_LDFLAGS) \
    1741  $(BOOST_SERIALIZATION_LDFLAGS) \
     42  $(BOOST_SYSTEM_LDFLAGS) \
    1843  $(JobMarket_LDFLAGS) \
    1944  $(CodePatterns_LDFLAGS)
    2045libMolecuilderJobs_la_SOURCES = $(JOBSSOURCE)
    2146libMolecuilderJobs_la_LIBADD = \
    22         $(JobMarket_LIBS) \
     47  libMolecuilderJobsGrid.la \
     48  $(VMG_LIBS) \
     49  $(JobMarket_LIBS) \
    2350  $(BOOST_SERIALIZATION_LIBS) \
    24         $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
     51  $(BOOST_SYSTEM_LIBS) \
     52  $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
    2553  $(CodePatterns_LIBS)
    26 
     54if CONDVMGMPI
     55libMolecuilderJobs_la_CPPFLAGS += $(MPI_CXXFLAGS)
     56libMolecuilderJobs_la_LDFLAGS += $(MPI_CXXLDFLAGS)
     57endif
     58 
  • src/Jobs/unittests/MPQCCommandJobUnitTest.cpp

    r12a24c r79ac03  
    110110  // prepare result container
    111111  MPQCData data;
    112   data.energy = -75.637499283020;
     112  data.energies.total = -75.637499283020;
    113113  std::vector<double> force;
    114114  std::vector< std::vector<double> > forces;
  • src/Jobs/unittests/MPQCDataUnitTest.cpp

    r12a24c r79ac03  
    4646#include "MPQCDataUnitTest.hpp"
    4747
    48 #include "Jobs/MPQCCommandJob_MPQCData.hpp"
     48#include "Jobs/MPQCData.hpp"
    4949
    5050#include "CodePatterns/Assert.hpp"
     
    6767  data = new MPQCData;
    6868
    69   data->energy = -37.3479855;
     69  data->energies.total = -37.3479855;
    7070  std::vector<double> force;
    7171  std::vector< std::vector<double> > forces;
     
    100100
    101101  // construct closer and closer pendant
    102   otherData.energy = -37.3479855;
     102  otherData.energies.total = -37.3479855;
    103103  CPPUNIT_ASSERT( *data != otherData );
    104104  std::vector<double> force;
     
    117117
    118118  // change energy
    119   otherData.energy = -4;
     119  otherData.energies.total = -4;
    120120  CPPUNIT_ASSERT( *data != otherData );
    121   otherData.energy = -37.3479855;
     121  otherData.energies.total = -37.3479855;
    122122  CPPUNIT_ASSERT( *data == otherData );
    123123
     
    129129
    130130  // check sensibility
    131   otherData.energy -= 1e-1*std::numeric_limits<double>::epsilon();
     131  otherData.energies.total -= 1e-1*std::numeric_limits<double>::epsilon();
    132132  CPPUNIT_ASSERT( *data == otherData );
    133133  otherData.forces[1][0] -= 1e-1*std::numeric_limits<double>::epsilon();
  • src/Makefile.am

    r12a24c r79ac03  
    1616include Filling/Makefile.am
    1717include Fragmentation/Makefile.am
     18include Fragmentation/Converter/Makefile.am
     19include Fragmentation/Summation/Makefile.am
     20include Fragmentation/SetValues/Makefile.am
    1821include Graph/Makefile.am
    1922include Helpers/Makefile.am
    2023
    2124if CONDJOBMARKET
     25include Fragmentation/Automation/Makefile.am
    2226include Jobs/Makefile.am
     27include Jobs/Grid/Makefile.am
    2328endif
    2429
     
    300305
    301306
    302 molecuilder_CPPFLAGS = $(AM_CPPFLAGS)
     307molecuilder_CPPFLAGS = $(AM_CPPFLAGS) ${QT_CFLAGS}
    303308#molecuilder_CXXFLAGS += -DNO_CACHING
    304309molecuilder_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
  • src/Parameters/Makefile.am

    r12a24c r79ac03  
    1919        Parameters/Validators/Specific/RealSpaceMatrixInvertibleValidator.cpp \
    2020        Parameters/Validators/Specific/RealSpaceMatrixSymmetricValidator.cpp \
     21        Parameters/Validators/Specific/ShapeNameValidator.cpp \
     22        Parameters/Validators/Specific/ShapeOpValidator.cpp \
     23        Parameters/Validators/Specific/ShapeTypeValidator.cpp \
    2124        Parameters/Validators/Specific/TimeStepPresentValidator.cpp \
    2225        Parameters/Validators/Specific/VectorNotZeroValidator.cpp \
     
    5861        Parameters/Validators/Specific/RealSpaceMatrixSymmetricValidator.hpp \
    5962        Parameters/Validators/Specific/RotationAngleValidator.hpp \
     63        Parameters/Validators/Specific/ShapeNameValidator.hpp \
     64        Parameters/Validators/Specific/ShapeOpValidator.hpp \
     65        Parameters/Validators/Specific/ShapeTypeValidator.hpp \
    6066        Parameters/Validators/Specific/TimeStepPresentValidator.hpp \
    6167        Parameters/Validators/Specific/VectorNotZeroValidator.hpp \
  • src/Parameters/Validators/DiscreteValidator.hpp

    r12a24c r79ac03  
    4242
    4343  void appendValidValue(const T &_value) throw(ParameterValidatorException);
    44   const std::vector<T> &getValidValues() const;
     44  virtual const std::vector<T> &getValidValues() const;
    4545
    4646private:
  • src/Parameters/Validators/Ops_Validator_impl.hpp

    r12a24c r79ac03  
    4949    return false;
    5050  }
     51
     52  Validator<T> *getA(){ return a; }
     53  Validator<T> *getB(){ return b; }
    5154
    5255private:
  • src/Parameters/Validators/STLVectorValidator.hpp

    r12a24c r79ac03  
    122122  }
    123123
     124  Validator<value_type> *getElementwiseValidator(){ return ElementwiseValidator;  }
     125  Validator<size_t> *getNumberOfElementsValidator(){  return NumberOfElementsValidator; }
     126
    124127private:
    125128  /** Constructor for class STLVectorValidator, number of elements given by \ref RangeValidator.
  • src/Parameters/Validators/Specific/BoundaryConditionValidator.cpp

    r12a24c r79ac03  
    4141#include "Box_BoundaryConditions.hpp"
    4242
     43BoundaryConditionValidator::BoundaryConditionValidator() :
     44  DiscreteValidator<std::string>(std::vector<std::string>())
     45{}
     46
    4347bool BoundaryConditionValidator::isValid(const std::string & _value) const
    4448{
    4549  BoundaryConditions::BCContainer bc;
    4650  return (bc.ReConverterBiMap.find(_value) != bc.ReConverterBiMap.end());
     51}
     52
     53const std::vector<std::string> &BoundaryConditionValidator::getValidValues() const
     54{
     55  BoundaryConditions::BCContainer bc;
     56  currentList.clear();
     57  for (BoundaryConditions::BCContainer::StringToEnumMap::iterator iter = bc.ReConverterBiMap.begin();
     58    iter != bc.ReConverterBiMap.end();
     59    iter ++)
     60    currentList.push_back(iter->first);
     61  return currentList;
    4762}
    4863
  • src/Parameters/Validators/Specific/BoundaryConditionValidator.hpp

    r12a24c r79ac03  
    1717#include <string>
    1818
    19 #include "Parameters/Validators/Validator.hpp"
     19#include "Parameters/Validators/DiscreteValidator.hpp"
    2020
    2121/** This validator checks whether the given string is one keyword of a box
    2222 * condition.
    2323 */
    24 class BoundaryConditionValidator : public Validator<std::string>
     24class BoundaryConditionValidator : public DiscreteValidator<std::string>
    2525{
     26public:
     27  BoundaryConditionValidator();
    2628  bool isValid(const std::string & _value) const;
     29  const std::vector<std::string> &getValidValues() const;
    2730  bool operator==(const Validator<std::string> &_instance) const;
    2831  Validator< std::string >* clone() const;
     32private:
     33  mutable std::vector<std::string> currentList;
    2934};
    3035
  • src/Parameters/Validators/Specific/ParserTypeValidator.cpp

    r12a24c r79ac03  
    3939
    4040#include "Parser/FormatParserStorage.hpp"
     41#include "Parser/ParserTypes.hpp"
    4142
    42 bool ParserTypeValidator::isValid(const std::string & _value) const
     43ParserTypeValidator::ParserTypeValidator() :
     44DiscreteValidator<std::string>(std::vector<std::string>())
    4345{
    44   return (FormatParserStorage::getInstance().getTypeFromName(_value) != ParserTypes_end);
    45 }
    46 
    47 bool ParserTypeValidator::operator==(const Validator<std::string> &_instance) const
    48 {
    49   const ParserTypeValidator *inst =
    50       dynamic_cast<const ParserTypeValidator *>(&_instance);
    51   if (inst)
    52     return true;
    53   else
    54     return false;
    55 }
    56 
    57 Validator< std::string >* ParserTypeValidator::clone() const
    58 {
    59   Validator< std::string > *inst =
    60       new ParserTypeValidator();
    61   return inst;
     46  for (ParserTypes t = ParserTypes_begin; t != ParserTypes_end; ++ t)
     47    appendValidValue(FormatParserStorage::getInstance().getNameFromType(t));
    6248}
    6349
  • src/Parameters/Validators/Specific/ParserTypeValidator.hpp

    r12a24c r79ac03  
    1717#include <string>
    1818
    19 #include "Parameters/Validators/Validator.hpp"
     19#include "Parameters/Validators/DiscreteValidator.hpp"
    2020
    2121/** This validator checks whether the given string refers to a valid
    2222 * \ref FormatParser type.
    2323 */
    24 class ParserTypeValidator : public Validator<std::string>
     24class ParserTypeValidator : public DiscreteValidator<std::string>
    2525{
    26   bool isValid(const std::string & _value) const;
    27   bool operator==(const Validator<std::string> &_instance) const;
    28   Validator< std::string >* clone() const;
     26public:
     27  ParserTypeValidator();
    2928};
    3029
  • src/Parameters/Validators/Specific/RandomNumberValidators.cpp

    r12a24c r79ac03  
    4141#include "RandomNumbers/RandomNumberEngineFactory.hpp"
    4242
     43RandomNumberDistributionNameValidator::RandomNumberDistributionNameValidator() :
     44  DiscreteValidator<std::string>(std::vector<std::string>())
     45{}
     46
    4347bool RandomNumberDistributionNameValidator::isValid(const std::string & _value) const
    4448{
     
    5256  }
    5357  return false;
     58}
     59
     60const std::vector<std::string> &RandomNumberDistributionNameValidator::getValidValues() const
     61{
     62  currentList.clear();
     63  RandomNumberDistributionFactory::getInstance();
     64  for (RandomNumberDistributionFactory::NameMap::const_iterator
     65      iter = RandomNumberDistributionFactory::getInstance().names.begin();
     66      iter != RandomNumberDistributionFactory::getInstance().names.end();
     67      ++iter)
     68    currentList.push_back(iter->second);
     69  return currentList;
    5470}
    5571
     
    7995
    8096
     97RandomNumberEngineNameValidator::RandomNumberEngineNameValidator() :
     98  DiscreteValidator<std::string>(std::vector<std::string>())
     99{}
     100
    81101bool RandomNumberEngineNameValidator::isValid(const std::string & _value) const
    82102{
     
    90110  }
    91111  return false;
     112}
     113
     114const std::vector<std::string> &RandomNumberEngineNameValidator::getValidValues() const
     115{
     116  currentList.clear();
     117  RandomNumberEngineFactory::getInstance();
     118  for (RandomNumberEngineFactory::NameMap::const_iterator
     119      iter = RandomNumberEngineFactory::getInstance().names.begin();
     120      iter != RandomNumberEngineFactory::getInstance().names.end();
     121      ++iter)
     122    currentList.push_back(iter->second);
     123  return currentList;
    92124}
    93125
  • src/Parameters/Validators/Specific/RandomNumberValidators.hpp

    r12a24c r79ac03  
    1717#include <string>
    1818
    19 #include "Parameters/Validators/Validator.hpp"
     19#include "Parameters/Validators/DiscreteValidator.hpp"
    2020
    2121/** This validator checks whether the given string contains the name of a
    2222 * present \ref RandomNumberDistribution.
    2323 */
    24 class RandomNumberDistributionNameValidator : public Validator<std::string>
     24class RandomNumberDistributionNameValidator : public DiscreteValidator<std::string>
    2525{
     26public:
     27  RandomNumberDistributionNameValidator();
    2628  bool isValid(const std::string & _value) const;
     29  const std::vector<std::string> &getValidValues() const;
    2730  bool operator==(const Validator<std::string> &_instance) const;
    2831  Validator< std::string >* clone() const;
     32private:
     33  mutable std::vector<std::string> currentList;
    2934};
    3035
     
    3237 * present \ref RandomNumberEngine.
    3338 */
    34 class RandomNumberEngineNameValidator : public Validator<std::string>
     39class RandomNumberEngineNameValidator : public DiscreteValidator<std::string>
    3540{
     41public:
     42  RandomNumberEngineNameValidator();
    3643  bool isValid(const std::string & _value) const;
     44  const std::vector<std::string> &getValidValues() const;
    3745  bool operator==(const Validator<std::string> &_instance) const;
    3846  Validator< std::string >* clone() const;
     47private:
     48  mutable std::vector<std::string> currentList;
    3949};
    4050
  • src/Shapes/BaseShapes.cpp

    r12a24c r79ac03  
    6161
    6262bool Cylinder_impl::isOnSurface(const Vector &point) const {
    63   return fabs(Vector(point[0], point[1], 0.0).NormSquared()-1.0)<MYEPSILON &&
    64       (point[2] > -1.0-MYEPSILON) && (point[2] < 1.0+MYEPSILON);
     63  // on the side?
     64  if (fabs(Vector(point[0], point[1], 0.0).NormSquared()-1.0)<MYEPSILON &&
     65      (point[2] > -1.0-MYEPSILON) && (point[2] < 1.0+MYEPSILON))
     66    return true;
     67  // on top/bottom?
     68  if ((Vector(point[0], point[1], 0.0).NormSquared()< 1.0 + MYEPSILON) &&
     69      ((fabs(point[2]-1)<MYEPSILON) || (fabs(point[2]+1)<MYEPSILON)))
     70      return true;
     71  return false;
    6572
    6673}
     
    7178  }
    7279
    73   if ((fabs(point[2]-1)<MYEPSILON) || (fabs(point[2])<MYEPSILON))
    74       return Vector(0.0, 0.0, point[2]);
     80  Vector n = Vector(0, 0, 0);
     81  if ((fabs(point[2]-1)<MYEPSILON) || (fabs(point[2]+1)<MYEPSILON))
     82      n += Vector(0.0, 0.0, point[2]);
    7583  else
    76     return Vector(point[0], point[1], 0.0);
     84    n += Vector(point[0], point[1], 0.0);
     85  n.Normalize();
     86  return n;
    7787}
    7888
     
    109119    std::vector<double> solutions;
    110120
    111     // Common routine to solve quadratic quations, anywhere?
     121    // Common routine to solve quadratic equations, anywhere?
    112122    const double neg_p_half = -B/(2.0*A);
    113123    const double q = C/A;
     
    168178   
    169179    for(int useg=0; useg<nu; useg++)
    170         for(int zseg=0; zseg<nz; zseg++)
     180        for(int zseg=0; zseg<=nz; zseg++)
    171181            result.push_back(Vector(cos(useg*dphi), sin(useg*dphi), zseg*dz-1.0));
    172182
     
    366376  // figure out on which sides the Vector lies (maximum 3, when it is in a corner)
    367377  for(int i=NDIM;i--;){
    368     if(fabs(fabs(point[i])-1)<MYEPSILON){
     378    if((fabs(point[i])<MYEPSILON) || (fabs(point[i]-1)<MYEPSILON)){
    369379      // add the scaled (-1/+1) Vector to the set of surface vectors
    370       res[i] = point[i];
     380      res[i] = point[i] * 2.0 - 1.0;
    371381    }
    372382  }
     
    442452std::vector<Vector> Cuboid_impl::getHomogeneousPointsOnSurface(const size_t N) const {
    443453  std::vector<Vector> PointsOnSurface;
    444   ASSERT(false, "Cuboid_impl::getHomogeneousPointsOnSurface() not implemented yet");
     454  // sides
     455  int n = sqrt((N - 1) / 6) + 1;
     456  for (int i=0; i<=n; i++){
     457    double ii = (double)i / (double)n;
     458    for (int k=0; k<n; k++){
     459      double kk = (double)k / (double)n;
     460      PointsOnSurface.push_back(Vector(ii, kk, 1));
     461      PointsOnSurface.push_back(Vector(ii, 1, 1-kk));
     462      PointsOnSurface.push_back(Vector(ii, 1-kk, 0));
     463      PointsOnSurface.push_back(Vector(ii, 0, kk));
     464    }
     465  }
     466  // top and bottom
     467  for (int i=1; i<n; i++){
     468    double ii = (double)i / (double)n;
     469    for (int k=1; k<n; k++){
     470      double kk = (double)k / (double)n;
     471      PointsOnSurface.push_back(Vector(0, ii, kk));
     472      PointsOnSurface.push_back(Vector(1, ii, kk));
     473    }
     474  }
    445475  return PointsOnSurface;
    446476}
  • src/Shapes/Makefile.am

    r12a24c r79ac03  
    55  Shapes/BaseShapes.cpp \
    66  Shapes/Shape.cpp \
    7   Shapes/ShapeOps.cpp
     7  Shapes/ShapeFactory.cpp \
     8  Shapes/ShapeOps.cpp \
     9  Shapes/ShapeRegistry.cpp
    810SHAPEHEADER = \
    911  Shapes/BaseShapes.hpp \
     
    1214  Shapes/Shape_impl.hpp \
    1315  Shapes/ShapeExceptions.hpp \
     16  Shapes/ShapeFactory.hpp \
    1417  Shapes/ShapeOps.hpp \
    1518  Shapes/ShapeOps_impl.hpp \
     19  Shapes/ShapeRegistry.hpp \
    1620  Shapes/ShapeType.hpp
    1721
  • src/Shapes/Shape.cpp

    r12a24c r79ac03  
    5252
    5353Shape::Shape(const Shape& src) :
    54   impl(src.getImpl())
     54  impl(src.getImpl()), name(src.getName())
    5555{}
    5656
     
    7575double Shape::getRadius() const{
    7676  return impl->getRadius();
     77}
     78
     79void Shape::setName(const std::string &_name){
     80  name = _name;
     81}
     82
     83std::string Shape::getName() const{
     84  return name;
    7785}
    7886
  • src/Shapes/Shape.hpp

    r12a24c r79ac03  
    5858  enum ShapeType getType() const;
    5959
     60  void setName(const std::string &_name);
     61  std::string getName() const;
     62
    6063protected:
    6164  impl_ptr getImpl() const;
     
    6366private:
    6467  impl_ptr impl;
     68  std::string name;
    6569};
    6670
  • src/Shapes/ShapeType.hpp

    r12a24c r79ac03  
    2222        PolygonType,
    2323        CombinedType,
    24         MAX_ShapeType,
    25     CylinderType
     24  CylinderType,
     25        MAX_ShapeType
    2626};
    2727
  • src/Shapes/unittests/Makefile.am

    r12a24c r79ac03  
    55SHAPETESTSSOURCES = \
    66        ../Shapes/unittests/BaseShapesUnitTest.cpp \
     7        ../Shapes/unittests/ShapeFactoryUnitTest.cpp \
    78        ../Shapes/unittests/ShapeOpsUnitTest.cpp \
     9        ../Shapes/unittests/ShapeRegistryUnitTest.cpp \
    810        ../Shapes/unittests/Shape_HomogeneousPointsUnitTest.cpp
    911
    1012SHAPETESTSHEADERS= \
    1113        ../Shapes/unittests/BaseShapesUnitTest.hpp \
     14        ../Shapes/unittests/ShapeFactoryUnitTest.hpp \
    1215        ../Shapes/unittests/ShapeOpsUnitTest.hpp \
     16        ../Shapes/unittests/ShapeRegistryUnitTest.hpp \
    1317        ../Shapes/unittests/Shape_HomogeneousPointsUnitTest.cpp
    1418
    1519SHAPETESTS = \
    1620  BaseShapesUnitTest \
     21  ShapeFactoryUnitTest \
    1722  ShapeOpsUnitTest \
     23  ShapeRegistryUnitTest \
    1824  Shape_HomogeneousPointsUnitTest
    1925 
     
    3844BaseShapesUnitTest_LDADD = $(SHAPELIBS)
    3945
     46ShapeFactoryUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
     47        ../Shapes/unittests/ShapeFactoryUnitTest.cpp \
     48        ../Shapes/unittests/ShapeFactoryUnitTest.hpp \
     49        ../Shapes/unittests/stubs/ApproximateShapeAreaStub.cpp \
     50        ../Shapes/unittests/stubs/ApproximateShapeVolumeStub.cpp
     51nodist_ShapeFactoryUnitTest_SOURCES = \
     52        ../Helpers/defs.hpp \
     53        ../Helpers/defs.cpp
     54ShapeFactoryUnitTest_LDADD = $(SHAPELIBS)
     55
    4056ShapeOpsUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
    4157        ../Shapes/unittests/ShapeOpsUnitTest.cpp \
     
    4763        ../Helpers/defs.cpp
    4864ShapeOpsUnitTest_LDADD = $(SHAPELIBS)
     65
     66ShapeRegistryUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
     67        ../Shapes/unittests/ShapeRegistryUnitTest.cpp \
     68        ../Shapes/unittests/ShapeRegistryUnitTest.hpp \
     69        ../Shapes/unittests/stubs/ApproximateShapeAreaStub.cpp \
     70        ../Shapes/unittests/stubs/ApproximateShapeVolumeStub.cpp
     71nodist_ShapeRegistryUnitTest_SOURCES = \
     72        ../Helpers/defs.hpp \
     73        ../Helpers/defs.cpp
     74ShapeRegistryUnitTest_LDADD = $(SHAPELIBS)
    4975
    5076Shape_HomogeneousPointsUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
  • src/UIElements/CommandLineUI/CommandLineParser.cpp

    r12a24c r79ac03  
    6767  command("Command options"),
    6868  fill("fill options"),
     69  shape("shape options"),
    6970  fragmentation("Fragmentation options"),
    7071  graph("Graph options"),
     
    8283  CmdParserLookup["edit"] = &edit;
    8384  CmdParserLookup["fill"] = &fill;
     85  CmdParserLookup["shape"] = &shape;
    8486  CmdParserLookup["fragmentation"] = &fragmentation;
    8587  CmdParserLookup["graph"] = &graph;
  • src/UIElements/CommandLineUI/CommandLineParser.hpp

    r12a24c r79ac03  
    5959  po::options_description edit;
    6060  po::options_description fill;
     61  po::options_description shape;
    6162  po::options_description fragmentation;
    6263  po::options_description graph;
  • src/UIElements/Makefile.am

    r12a24c r79ac03  
    167167  UIElements/Views/Qt4/QtInfoBox.cpp \
    168168  UIElements/Views/Qt4/QtMoleculeList.cpp \
     169  UIElements/Views/Qt4/QtShapeController.cpp \
     170  UIElements/Views/Qt4/QtShapeList.cpp \
    169171  UIElements/Views/Qt4/QtStatusBar.cpp \
    170172  UIElements/Views/Qt4/QtToolBar.cpp \
     
    174176        UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp \
    175177        UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp \
    176         UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
     178        UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp \
     179        UIElements/Views/Qt4/Qt3D/GLMoleculeObject_shape.cpp
    177180#  UIElements/Views/Qt4/dialoglight.cpp
    178181             
     
    185188  UIElements/Views/Qt4/QtInfoBox.hpp \
    186189  UIElements/Views/Qt4/QtMoleculeList.hpp \
     190  UIElements/Views/Qt4/QtShapeController.hpp \
     191  UIElements/Views/Qt4/QtShapeList.hpp \
    187192  UIElements/Views/Qt4/QtStatusBar.hpp \
    188193  UIElements/Views/Qt4/QtToolBar.hpp \
     
    192197        UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.hpp \
    193198        UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp \
    194         UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp
     199        UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp \
     200        UIElements/Views/Qt4/Qt3D/GLMoleculeObject_shape.hpp
    195201
    196202QTUIUI_UIFILES = \
     
    247253endif
    248254libMolecuilderUI_la_LIBADD += \
     255        libMolecuilderFragmentationAutomation.la \
     256        libMolecuilderFragmentationConverter.la \
     257        libMolecuilderFragmentationSummation.la \
     258        libMolecuilderFragmentationSetValues.la \
    249259        $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
    250260        ${CodePatterns_LIBS} \
     
    301311
    302312libMolecuilderQtUI_la_LIBADD = \
     313        ../data/icons/libicons.la \
    303314        ${QT_LIBS} \
    304315        -lQtOpenGL \
    305316        ${GLU_LIBS}
     317
     318##libMolecuilderQtUI_la_LDADD = \
     319##      ../data/icons/libicons.a
    306320
    307321nobase_libMolecuilderQtUI_la_include_HEADERS = ${QTUIHEADER} $(QTUIUI_UIFILES)
  • src/UIElements/Menu/MenuDescription.cpp

    r12a24c r79ac03  
    7171  MenuPositionMap->insert(std::make_pair("selection",TopPosition("edit",4)));
    7272  MenuPositionMap->insert(std::make_pair("tesselation",TopPosition("tools",2)));
     73  MenuPositionMap->insert(std::make_pair("shape",TopPosition("tools",6)));
    7374  MenuPositionMap->insert(std::make_pair("tools",TopPosition("",4)));
    7475  MenuPositionMap->insert(std::make_pair("world",TopPosition("",1)));
     
    8687  MenuDescriptionsMap->insert(std::make_pair("selection","Select atoms/molecules"));
    8788  MenuDescriptionsMap->insert(std::make_pair("tesselation","Tesselate molecules"));
     89  MenuDescriptionsMap->insert(std::make_pair("shape","Edit shapes"));
    8890  MenuDescriptionsMap->insert(std::make_pair("tools","Various tools"));
    8991  MenuDescriptionsMap->insert(std::make_pair("world","Edit world"));
     
    101103  MenuNameMap->insert(std::make_pair("selection","Selection"));
    102104  MenuNameMap->insert(std::make_pair("tesselation","Tesselation"));
     105  MenuNameMap->insert(std::make_pair("shape","Shape"));
    103106  MenuNameMap->insert(std::make_pair("tools","Tools"));
    104107  MenuNameMap->insert(std::make_pair("world","Globals"));
  • src/UIElements/Qt4/QtMainWindow.cpp

    r12a24c r79ac03  
    5353#include "Views/Qt4/QtMoleculeList.hpp"
    5454#include "Views/Qt4/QtElementList.hpp"
     55#include "Views/Qt4/QtShapeController.hpp"
    5556#include "Views/Qt4/QtInfoBox.hpp"
    5657#include "Views/Qt4/QtStatusBar.hpp"
     
    7071#include "Actions/WorldAction/OutputAsAction.hpp"
    7172
     73
    7274using namespace MoleCuilder;
    7375
     
    7577    theApp(_theApp)
    7678{
     79  Q_INIT_RESOURCE(icons);
    7780  QCoreApplication::setOrganizationName("ins");
    7881  QCoreApplication::setOrganizationDomain("ins.uni-bonn.de");
     
    8083  QSplitter *splitter1 = new QSplitter (Qt::Horizontal, this );
    8184  QSplitter *splitter2 = new QSplitter (Qt::Vertical, splitter1 );
     85  QSplitter *splitter3 = new QSplitter (Qt::Vertical, splitter1 );
    8286  QTabWidget *worldTab = new QTabWidget(splitter2);
    8387
    8488  moleculeList = new QtMoleculeList(worldTab);
    8589  elementList = new QtElementList(worldTab);
     90  shapeController = new QtShapeController(worldTab);
    8691
    8792  infoBox = new QtInfoBox();
     
    101106  setCentralWidget(splitter1);
    102107  splitter1->addWidget(splitter2);
    103   splitter1->addWidget(infoBox);
     108  splitter1->addWidget(splitter3);
     109  splitter1->setStretchFactor(0, 10);
     110  splitter3->addWidget(infoBox);
     111  splitter3->addWidget(shapeController);
    104112  splitter2->addWidget(glWorldView);
    105113  splitter2->addWidget(worldTab);
  • src/UIElements/Qt4/QtMainWindow.hpp

    r12a24c r79ac03  
    2525class QtMoleculeList;
    2626class QtElementList;
     27class QtShapeController;
    2728class StringView;
    2829class GLWorldView;
     
    5152  QtMoleculeList *moleculeList;
    5253  QtElementList *elementList;
     54  QtShapeController *shapeController;
    5355  GLWorldView *glWorldView;
    5456  QtInfoBox *infoBox;
  • src/UIElements/Qt4/Query/AtomsQtQuery.cpp

    r12a24c r79ac03  
    4545QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    4646    QtQuery<std::vector<const atom *> >(_param, _title),
    47     QtQueryList<const atom *>(_parent, _dialog, temp)
     47    QtQueryList<const atom *>(_param, _parent, _dialog, temp)
    4848{
    4949  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
  • src/UIElements/Qt4/Query/DoublesQtQuery.cpp

    r12a24c r79ac03  
    4545QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    4646    QtQuery<std::vector<double> >(_param, _title),
    47     QtQueryList<double>(_parent, _dialog, temp)
     47    QtQueryList<double>(_param, _parent, _dialog, temp)
    4848{
    4949  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
  • src/UIElements/Qt4/Query/ElementsQtQuery.cpp

    r12a24c r79ac03  
    4646QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    4747    QtQuery<std::vector<const element *> >(_param, _title),
    48     QtQueryList<const element *>(_parent, _dialog, temp)
     48    QtQueryList<const element *>(_param, _parent, _dialog, temp)
    4949{
    5050  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
  • src/UIElements/Qt4/Query/FilesQtQuery.cpp

    r12a24c r79ac03  
    4646QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector<boost::filesystem::path> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    4747    QtQuery<std::vector<boost::filesystem::path> >(_param, _title),
    48     QtQueryList<boost::filesystem::path>(_parent, _dialog, temp)
     48    QtQueryList<boost::filesystem::path>(_param, _parent, _dialog, temp)
    4949{
    5050  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
  • src/UIElements/Qt4/Query/IntsQtQuery.cpp

    r12a24c r79ac03  
    4545QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    4646    QtQuery<std::vector<int> >(_param, _title),
    47     QtQueryList<int>(_parent, _dialog, temp)
     47    QtQueryList<int>(_param, _parent, _dialog, temp)
    4848{
    4949  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
  • src/UIElements/Qt4/Query/MoleculesQtQuery.cpp

    r12a24c r79ac03  
    4545QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    4646    QtQuery<std::vector<const molecule *> >(_param, _title),
    47     QtQueryList<const molecule *>(_parent, _dialog, temp)
     47    QtQueryList<const molecule *>(_param, _parent, _dialog, temp)
    4848{
    4949  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
  • src/UIElements/Qt4/Query/QtQuery.hpp

    r12a24c r79ac03  
    306306public slots:
    307307  void onUpdate(const QString&);
     308  void onUpdateCombo(int index);
    308309
    309310private:
     
    312313  QLabel *titleLabel;
    313314  QLineEdit *inputBox;
     315  QComboBox *comboBox;
    314316  Dialog *dialog;
    315317};
  • src/UIElements/Qt4/Query/QtQueryList.hpp

    r12a24c r79ac03  
    1717#include "UIElements/Dialog.hpp"
    1818#include "Parameters/Parameter.hpp"
     19#include "Parameters/Validators/STLVectorValidator.hpp"
     20#include "Parameters/Validators/Ops_Validator_impl.hpp"
    1921
    2022class QListWidget;
     
    5052class QtQueryList : public QtQueryListUntyped {
    5153public:
    52   QtQueryList(QBoxLayout *parent, Dialog *_dialog, std::vector<T> &_temp) : QtQueryListUntyped(parent, _dialog), tempRef(_temp)
     54  QtQueryList(Parameter<std::vector<T> > &parentParam, QBoxLayout *parent, Dialog *_dialog, std::vector<T> &_temp) : QtQueryListUntyped(parent, _dialog), tempRef(_temp)
    5355  {
    54     subParam = new Parameter<T>("sub-param");
     56    // do we have an STLVectorValidator?
     57    Validator<std::vector<T> > *val = &parentParam.getValidator();
     58    STLVectorValidator<std::vector<T> > *vector_val = NULL;
     59
     60    // might be hidden inside an And_Validator
     61    And_Validator<std::vector<T> > * and_val = dynamic_cast<And_Validator<std::vector<T> > *>(val);
     62    if (and_val){
     63      if (dynamic_cast<STLVectorValidator<std::vector<T> > *>(and_val->getA()))
     64        vector_val = dynamic_cast<STLVectorValidator<std::vector<T> > *>(and_val->getA());
     65      else if (dynamic_cast<STLVectorValidator<std::vector<T> > *>(and_val->getB()))
     66        vector_val = dynamic_cast<STLVectorValidator<std::vector<T> > *>(and_val->getB());
     67    }else{
     68      vector_val = dynamic_cast<STLVectorValidator<std::vector<T> > *>(val);
     69    }
     70
     71    if (vector_val){
     72      // if so, try to use its ElementwiseValidator
     73      subParam = new Parameter<T>("sub-param", *(vector_val->getElementwiseValidator()));
     74    }else{
     75      subParam = new Parameter<T>("sub-param");
     76    }
    5577  }
    5678  virtual ~QtQueryList()
  • src/UIElements/Qt4/Query/StringQtQuery.cpp

    r12a24c r79ac03  
    3636#include <Qt/qlabel.h>
    3737#include <Qt/qlineedit.h>
     38#include <Qt/qcombobox.h>
    3839
    3940#include "CodePatterns/MemDebug.hpp"
     
    5253  thisLayout = new QHBoxLayout();
    5354  titleLabel = new QLabel(QString(getTitle().c_str()));
    54   inputBox = new QLineEdit();
    5555  parent->addLayout(thisLayout);
    5656  thisLayout->addWidget(titleLabel);
    57   thisLayout->addWidget(inputBox);
    5857
    59   onUpdate(inputBox->text());
    60   connect(inputBox,SIGNAL(textChanged(const QString&)),this,SLOT(onUpdate(const QString&)));
     58
     59
     60  if (dynamic_cast<DiscreteValidator<std::string>*>(&_param.getValidator()) != NULL){
     61    // Discrete set of valid string -> use a ComboBox.
     62
     63    const std::vector<std::string> &strings = dynamic_cast<DiscreteValidator<std::string>*>(&_param.getValidator())->getValidValues();
     64    comboBox = new QComboBox();
     65    for(vector<std::string>::const_iterator iter  = strings.begin();
     66        iter != strings.end();
     67        ++iter) {
     68      comboBox->addItem(QString((*iter).c_str()));
     69    }
     70    thisLayout->addWidget(comboBox);
     71
     72    connect(comboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdateCombo(int)));
     73    onUpdateCombo(0);
     74  }else{
     75    // Use a LineEdit.
     76    inputBox = new QLineEdit();
     77    thisLayout->addWidget(inputBox);
     78
     79    onUpdate(inputBox->text());
     80    connect(inputBox,SIGNAL(textChanged(const QString&)),this,SLOT(onUpdate(const QString&)));
     81  }
    6182}
    6283
     
    7091}
    7192
     93void QtDialog::StringQtQuery::onUpdateCombo(int newIndex) {
     94  temp = comboBox->itemText(newIndex).toStdString();
     95  dialog->update();
     96}
     97
  • src/UIElements/Qt4/Query/StringsQtQuery.cpp

    r12a24c r79ac03  
    4545QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    4646    QtQuery<std::vector<std::string> >(_param, _title),
    47     QtQueryList<std::string>(_parent, _dialog, temp)
     47    QtQueryList<std::string>(_param, _parent, _dialog, temp)
    4848{
    4949  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
  • src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp

    r12a24c r79ac03  
    5454  inputBox = new QSpinBox();
    5555  inputBox->setValue(temp);
     56  inputBox->setMaximum(std::numeric_limits<int>::max()); // parameter is only int, so don't use std::numeric_limits<int>::max()!
    5657  parent->addLayout(thisLayout);
    5758  thisLayout->addWidget(titleLabel);
  • src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp

    r12a24c r79ac03  
    4545QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    4646    QtQuery<std::vector<unsigned int> >(_param, _title),
    47     QtQueryList<unsigned int>(_parent, _dialog, temp)
     47    QtQueryList<unsigned int>(_param, _parent, _dialog, temp)
    4848{
    4949  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
  • src/UIElements/Qt4/Query/VectorsQtQuery.cpp

    r12a24c r79ac03  
    4646QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    4747    QtQuery<std::vector<Vector> >(_param, _title),
    48     QtQueryList<Vector>(_parent, _dialog, temp)
     48    QtQueryList<Vector>(_param, _parent, _dialog, temp)
    4949{
    5050  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp

    r12a24c r79ac03  
    8181}
    8282
     83GLMoleculeObject::GLMoleculeObject(QGLSceneNode *mesh, QObject *parent)
     84   : QObject(parent)
     85{
     86   //mesh->setParent(this);
     87   for (int i=0;i<DETAILTYPES_MAX;i++)
     88     m_mesh[i] = mesh;
     89   m_scale = 1.0f;
     90   m_scaleZ = 1.0f;
     91   m_rotationAngle = 0.0f;
     92   m_effect = 0;
     93   m_objectId = -1;
     94   m_hovering = false;
     95   m_selected = false;
     96   m_material = 0;
     97   initStaticMaterials();
     98}
     99
    83100GLMoleculeObject::GLMoleculeObject(QGLAbstractScene *scene, QObject *parent)
    84101   : QObject(parent)
    85102{
    86103   scene->setParent(this);
    87    m_mesh[0] = scene->mainNode();
    88    m_mesh[1] = scene->mainNode();
    89    m_mesh[2] = scene->mainNode();
     104   for (int i=0;i<DETAILTYPES_MAX;i++)
     105     m_mesh[i] = scene->mainNode();
    90106   m_scale = 1.0f;
    91107   m_scaleZ = 1.0f;
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.hpp

    r12a24c r79ac03  
    3838public:
    3939   explicit GLMoleculeObject(QGLSceneNode *mesh[], QObject *parent=0);
     40   explicit GLMoleculeObject(QGLSceneNode *mesh, QObject *parent=0);
    4041   explicit GLMoleculeObject(QGLAbstractScene *scene, QObject *parent=0);
    4142   virtual ~GLMoleculeObject();
     
    7071   void initStaticMaterials();
    7172   void initialize(QGLView *view, QGLPainter *painter);
    72    void draw(QGLPainter *painter, const QVector4D &cameraPlane);
     73   virtual void draw(QGLPainter *painter, const QVector4D &cameraPlane);
    7374   void drawSelectionBox(QGLPainter *painter);
    7475
     
    9495   enum{DETAIL_HIGHEST, DETAIL_HIGH, DETAIL_MEDIUM, DETAIL_LOW, DETAILTYPES_MAX} DetailType;
    9596
    96 private:
     97protected:
    9798
    9899   static double detailMinDistance[DETAILTYPES_MAX];
  • src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp

    r12a24c r79ac03  
    4646#include "GLMoleculeObject_bond.hpp"
    4747#include "GLMoleculeObject_molecule.hpp"
     48#include "GLMoleculeObject_shape.hpp"
    4849
    4950#include "CodePatterns/MemDebug.hpp"
     
    5960#include "Descriptors/AtomIdDescriptor.hpp"
    6061#include "Helpers/helpers.hpp"
     62#include "Shapes/ShapeRegistry.hpp"
    6163#include "molecule.hpp"
    6264#include "World.hpp"
     
    293295
    294296  emit changeOccured();
     297}
     298
     299/** Adds a shape to the scene.
     300 *
     301 * @param shape shape to be added
     302 */
     303void GLWorldScene::addShape(Shape &shape)
     304{
     305  GLMoleculeObject_shape *shapeObject = new GLMoleculeObject_shape(shape, this);
     306  ShapeNodeMap::iterator iter = ShapesinSceneMap.find(shape.getName());
     307  ASSERT(iter == ShapesinSceneMap.end(),
     308      "GLWorldScene::addShape() - same shape "+shape.getName()+" added again.");
     309  ShapesinSceneMap.insert( make_pair(shape.getName(), shapeObject) );
     310}
     311
     312void GLWorldScene::removeShape(Shape &shape)
     313{
     314  ShapeNodeMap::iterator iter = ShapesinSceneMap.find(shape.getName());
     315  ASSERT(iter == ShapesinSceneMap.end(),
     316      "GLWorldScene::removeShape() - shape "+shape.getName()+" not in scene.");
     317  delete(iter->second);
     318}
     319
     320void GLWorldScene::updateSelectedShapes()
     321{
     322  foreach (QObject *obj, children()) {
     323    GLMoleculeObject_shape *shapeobj = qobject_cast<GLMoleculeObject_shape *>(obj);
     324      if (shapeobj){
     325        shapeobj->enable(ShapeRegistry::getInstance().isSelected(shapeobj->getShape()));
     326      }
     327  }
    295328}
    296329
  • src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp

    r12a24c r79ac03  
    2626class atom;
    2727class molecule;
     28class Shape;
    2829
    2930class QGLPainter;
     
    3435class GLMoleculeObject_atom;
    3536class GLMoleculeObject_molecule;
     37class GLMoleculeObject_shape;
    3638
    3739/** This class contains a list of all molecules in the world.
     
    8688  void changeAtomId(GLMoleculeObject_atom *ob, int oldId, int newOd);
    8789
     90public:
     91  void addShape(Shape &shape);
     92  void removeShape(Shape &shape);
     93  void updateSelectedShapes();
     94
    8895private:
    8996  void init();
     
    96103  typedef std::map< BondIds , GLMoleculeObject_bond* > BondNodeMap;
    97104  typedef std::map< moleculeId_t , GLMoleculeObject_molecule* > MoleculeNodeMap;
     105  typedef std::map< std::string , GLMoleculeObject_shape* > ShapeNodeMap;
    98106  AtomNodeMap AtomsinSceneMap;
    99107  BondNodeMap BondsinSceneMap;
    100108  MoleculeNodeMap MoleculesinSceneMap;
     109  ShapeNodeMap ShapesinSceneMap;
    101110
    102111  QGLSceneNode *meshEmpty[GLMoleculeObject::DETAILTYPES_MAX];
  • src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp

    r12a24c r79ac03  
    5757#include "CodePatterns/Observer/Notification.hpp"
    5858#include "CodePatterns/Observer/ObserverLog.hpp"
     59#include "Shapes/ShapeRegistry.hpp"
    5960#include "World.hpp"
    6061#include "Box.hpp"
     
    9495  AtomObserver::getInstance().signOn(this, AtomObservable::PositionChanged);
    9596
     97  ShapeRegistry::getInstance().signOn(this);
     98  ShapeRegistry::getInstance().signOn(this, ShapeRegistry::ShapeInserted);
     99  ShapeRegistry::getInstance().signOn(this, ShapeRegistry::ShapeRemoved);
     100  ShapeRegistry::getInstance().signOn(this, ShapeRegistry::SelectionChanged);
     101
    96102  redrawTimer = new QTimer(this);
    97103}
     
    106112  World::getInstance().signOff(this, World::SelectionChanged);
    107113  AtomObserver::getInstance().signOff(this, AtomObservable::PositionChanged);
     114  ShapeRegistry::getInstance().signOff(this);
     115  ShapeRegistry::getInstance().signOff(this, ShapeRegistry::ShapeInserted);
     116  ShapeRegistry::getInstance().signOff(this, ShapeRegistry::ShapeRemoved);
     117  ShapeRegistry::getInstance().signOff(this, ShapeRegistry::SelectionChanged);
    108118  delete worldscene;
    109119
     
    158168  stereoMenu->addAction(stereoAnaglyphAction);
    159169  stereoButton->setMenu(stereoMenu);
    160   stereoButton->setIcon(QIcon::fromTheme("find"));
     170  stereoButton->setIcon(QIcon(QPixmap(":/icon_view_stereo.png")));
    161171  stereoButton->setPopupMode(QToolButton::InstantPopup);
    162172  toolbar->addWidget(stereoButton);
     
    164174  // selection mode
    165175  toolbar->addSeparator();
    166   QAction *selAtomAction = new QAction(QIcon::fromTheme("edit-select-all"), tr("select atom by clicking"), this);
     176  QAction *selAtomAction = new QAction(QIcon(QPixmap(":/icon_select_atom.png")), tr("select atom by clicking"), this);
    167177  connect(selAtomAction, SIGNAL(triggered()), worldscene, SLOT(setSelectionModeAtom()));
    168178  toolbar->addAction(selAtomAction);
    169   QAction *selMolAction = new QAction(QIcon::fromTheme("edit-select-all"), tr("select molecule by clicking"), this);
     179  QAction *selMolAction = new QAction(QIcon(QPixmap(":/icon_select_molecule.png")), tr("select molecule by clicking"), this);
    170180  connect(selMolAction, SIGNAL(triggered()), worldscene, SLOT(setSelectionModeMolecule()));
    171181  toolbar->addAction(selMolAction);
     
    351361    #endif
    352362        emit changed();
     363        break;
     364      }
     365      default:
     366        ASSERT(0, "GLWorldView::recieveNotification() - we cannot get here.");
     367        break;
     368    }
     369  } else if (static_cast<ShapeRegistry*>(publisher) == ShapeRegistry::getPointer()) {
     370    switch (notification->getChannelNo()) {
     371      case ShapeRegistry::ShapeInserted:
     372      {
     373        worldscene->addShape(*ShapeRegistry::getInstance().lastChanged());
     374        break;
     375      }
     376      case ShapeRegistry::ShapeRemoved:
     377      {
     378        worldscene->removeShape(*ShapeRegistry::getInstance().lastChanged());
     379        break;
     380      }
     381      case ShapeRegistry::SelectionChanged:
     382      {
     383        worldscene->updateSelectedShapes();
    353384        break;
    354385      }
  • src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp

    r12a24c r79ac03  
    9898
    9999private:
     100
    100101  GLWorldScene *worldscene;
    101102
  • src/UIElements/Views/Qt4/QtInfoBox.cpp

    r12a24c r79ac03  
    5656
    5757  setMinimumWidth(200);
     58  setMinimumHeight(200);
    5859  currentPage = 0;
    5960
  • src/cleanUp.cpp

    r12a24c r79ac03  
    5959#include "Parser/XmlParser.hpp"
    6060
     61#include "Shapes/ShapeFactory.hpp"
     62#include "Shapes/ShapeRegistry.hpp"
     63
    6164#include "UIElements/CommandLineUI/CommandLineParser.hpp"
    6265#include "UIElements/Menu/MenuDescription.hpp"
     
    9396  RandomNumberEngineFactory::purgeInstance();
    9497  RandomNumberGeneratorFactory::purgeInstance();
     98  ShapeFactory::purgeInstance();
     99  ShapeRegistry::purgeInstance();
    95100  FormatParserStorage::purgeInstance();
    96101  ChangeTracker::purgeInstance();
  • src/controller_MPQCCommandJob.cpp

    r12a24c r79ac03  
    6666
    6767#include "Jobs/MPQCCommandJob.hpp"
    68 #include "Jobs/MPQCCommandJob_MPQCData.hpp"
     68#include "Jobs/MPQCData.hpp"
    6969
    7070#include "LinearAlgebra/defs.hpp"
     
    167167      MatrixContainer::MatrixArray matrix;
    168168      matrix.resize(1);
    169       matrix[0].resize(1, extractedData.energy);
     169      matrix[0].resize(1, extractedData.energies.total);
    170170      if (!Energy.AddMatrix(
    171171          std::string("MPQCJob ")+toString((*iter)->getId()),
     
    217217  if (!Force.ParseIndices(KeySetFilename.c_str())) return false;
    218218
    219   if (!KeySet.ParseKeySets(KeySetFilename.c_str(), Force.RowCounter, Force.MatrixCounter)) return false;
     219  {
     220    std::stringstream filename;
     221    filename << FRAGMENTPREFIX << KEYSETFILE;
     222    if (!KeySet.ParseKeySets(KeySetFilename.c_str(), filename.str(), Force.MatrixCounter)) return 1;
     223  }
    220224
    221225  if (!KeySet.ParseManyBodyTerms()) return false;
  • src/unittests/Makefile.am

    r12a24c r79ac03  
    1515include ../../src/Fragmentation/unittests/Makefile.am
    1616include ../../src/Fragmentation/Homology/unittests/Makefile.am
     17include ../../src/Fragmentation/Summation/unittests/Makefile.am
     18include ../../src/Fragmentation/SetValues/unittests/Makefile.am
    1719include ../../src/Graph/unittests/Makefile.am
    1820
    1921if CONDJOBMARKET
    2022include ../../src/Jobs/unittests/Makefile.am
     23include ../../src/Jobs/Grid/unittests/Makefile.am
    2124endif
    2225
  • tests/JobMarket/testsuite-jobmarket-molecuilderrun.at

    r12a24c r79ac03  
    4646
    4747# use molecuilder to add jobs, wait for their completion and obtain results
    48 AT_CHECK([../../molecuilder -v 3 --fragment-automation --fragment-executable "../../mpqc" --fragment-path "${abs_top_srcdir}/tests/JobMarket/pre/" --fragment-jobs Job??.in --server-address 127.0.0.1 --server-port $CONTROLLERPORT], 0, [stdout], [ignore])
     48AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/JobMarket/pre/heptan.xyz -v 3 --fragment-automation --fragment-executable "../../mpqc" --fragment-path "${abs_top_srcdir}/tests/JobMarket/pre/" --fragment-jobs Job??.in --server-address 127.0.0.1 --server-port $CONTROLLERPORT], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
    4949AT_CHECK([fgrep "There are 7 fragments" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
    5050AT_CHECK([fgrep "There are 23 atoms" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     51AT_XFAIL_IF([/bin/true])
    5152AT_CHECK([fgrep "Resulting energy is -279.837" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
    5253AT_CHECK([fgrep "Resulting forces are" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
     54AT_XFAIL_IF([/bin/false])
    5355
    5456# removeall to remove workers, then shutdown for server itself
  • tests/Python/AllActions/options.dat

    r12a24c r79ac03  
    5858domain-position "0 0 0"
    5959domain-position "10. 10. 10."
     60DoLongrange     "0"
    6061DoRotate        "0"
    6162DoSaturate      "0"
     
    7475fragment-molecule       "./"
    7576fragment-path   "test/"
     77grid-level      "5"
    7678id-mapping      "1"
    7779input   "test.data"
     80interpolation-degree    "5"
    7881interpolation-steps     "9"
    7982keep-fixed-CenterOfMass "0"
     
    8588min-distance    "1."
    8689molecule-by-id  "0"
     90near-field-cells        "3"
    8791nonconvex-envelope      "25"
    8892nonconvex-file  "NonConvexEnvelope"
     
    164168select-molecules-by-formula     "H2O"
    165169select-molecules-by-name        "water"
     170select-shape-by-name    "sphere2"
    166171server-address  "127.0.0.1"
    167172server-port     "1026"
     
    178183set-tremolo-atomdata    "ATOMDATA type id x=3"
    179184set-world-time  "10"
     185shape-name      "sphere1"
     186shape-op        "AND"
     187shape-type      "sphere"
    180188skiplines       "1"
    181189skiplines       "2"
    182190start-step      "0"
    183191stretch-bond    "1.5"
     192stretch "1. 1. 1."
    184193suspend-in-water        "1.0"
    185194tesselation-radius      "5."
    186195time-step-zero  "0"
    187196translate-atoms "1. 0. 0."
     197translation     "0. 0. 0."
    188198unselect-atom-by-element        "1"
    189199unselect-atom-by-element        "4"
     
    205215unselect-molecules-by-formula   "H2O"
    206216unselect-molecules-by-name      "water"
     217unselect-shape-by-name  "cube42"
    207218verbose "3"
    208219verlet-integration      "forces.dat"
  • tests/regression/Analysis/DipoleCorrelation-DiscreteAngles/testsuite-analysis-dipole-correlation-discrete-angles.at

    r12a24c r79ac03  
    5151AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/DipoleCorrelation-DiscreteAngles/pre/water.xyz .], 0)
    5252AT_CHECK([../../molecuilder -i waterbox-mirrored.xyz -o xyz --fill-void water.xyz --distances "3.1,3.1,3.1" --distance-to-boundary "1." --DoRotate 0], 0, [stdout], [stderr])
    53 AT_CHECK([../../molecuilder -i waterbox-mirrored.xyz -I -v 3 --select-atoms-inside-sphere 0.2 --position "5.63,5.71,5.71" --select-atoms-molecules --rotate-around-self 180 --axis "0,1,0"], 0, [stdout], [stderr])
     53AT_CHECK([../../molecuilder -i waterbox-mirrored.xyz -I -v 3  --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "5.63,5.71,5.71" --stretch "0.2,0.2,0.2" --select-shape-by-name "sphere1" --select-atoms-inside-volume --select-atoms-molecules --rotate-around-self 180 --axis "0,1,0"], 0, [stdout], [stderr])
    5454AT_CHECK([../../molecuilder -i waterbox-mirrored.xyz -o xyz -I --select-all-molecules --dipole-correlation --bin-start -0.5 --bin-width 1. --bin-end 359.5 --output-file waterbox-mirrored_values.dat --bin-output-file waterbox-mirrored_histogram.dat], 0, [stdout], [stderr])
    5555AT_CHECK([file=waterbox-mirrored_histogram.dat; diff $file ${abs_top_srcdir}/tests/regression/Analysis/DipoleCorrelation-DiscreteAngles/post/waterbox-mirrored_histogram.dat], 0, [ignore], [ignore])
  • tests/regression/Atoms/RemoveCuboid/testsuite-atoms-remove-cuboid.at

    r12a24c r79ac03  
    4141AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0)
    4242AT_CHECK([chmod u+w $file], 0)
    43 AT_CHECK([../../molecuilder -i $file --select-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr])
     43AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume -r], 0, [stdout], [stderr])
    4444AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore])
    4545AT_CHECK([file=test-withoutcuboid.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/post/test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore])
     
    4848AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0)
    4949AT_CHECK([chmod u+w $file], 0)
    50 AT_CHECK([../../molecuilder -i $file --select-all-atoms --unselect-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr])
     50AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume -r], 0, [stdout], [stderr])
    5151AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-cuboid.xyz-sorted], 0, [ignore], [ignore])
    5252AT_CHECK([file=test-cuboid.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/post/test-cuboid.xyz-sorted], 0, [ignore], [ignore])
     
    6363AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0)
    6464AT_CHECK([chmod u+w $file], 0)
    65 AT_CHECK([../../molecuilder -i $file --select-all-atoms --unselect-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr])
     65AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume -r --undo], 0, [stdout], [stderr])
    6666AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/$file], 0, [ignore], [ignore])
    6767
     
    6969AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0)
    7070AT_CHECK([chmod u+w $file], 0)
    71 AT_CHECK([../../molecuilder -i $file --select-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr])
     71AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume -r --undo], 0, [stdout], [stderr])
    7272AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/$file], 0, [ignore], [ignore])
    7373
     
    8181AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0)
    8282AT_CHECK([chmod u+w $file], 0)
    83 AT_CHECK([../../molecuilder -i $file --select-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr])
     83AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume -r --undo --redo], 0, [stdout], [stderr])
    8484AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore])
    8585AT_CHECK([file=test-withoutcuboid.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/post/test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore])
     
    8888AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0)
    8989AT_CHECK([chmod u+w $file], 0)
    90 AT_CHECK([../../molecuilder -i $file --select-all-atoms --unselect-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr])
     90AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume -r --undo --redo], 0, [stdout], [stderr])
    9191AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-cuboid.xyz-sorted], 0, [ignore], [ignore])
    9292AT_CHECK([file=test-cuboid.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/post/test-cuboid.xyz-sorted], 0, [ignore], [ignore])
  • tests/regression/Atoms/RemoveSphere/testsuite-atoms-remove-sphere.at

    r12a24c r79ac03  
    4141AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
    4242AT_CHECK([chmod u+w $file], 0)
    43 AT_CHECK([../../molecuilder -i $file --select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr])
     43AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r], 0, [stdout], [stderr])
    4444AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutsphere.xyz-sorted], 0, [ignore], [ignore])
    4545AT_CHECK([file=test-withoutsphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-withoutsphere.xyz-sorted], 0, [ignore], [ignore])
     
    4848AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
    4949AT_CHECK([chmod u+w $file], 0)
    50 AT_CHECK([../../molecuilder -i $file --select-all-atoms --unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr])
     50AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r], 0, [stdout], [stderr])
    5151AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-sphere.xyz-sorted], 0, [ignore], [ignore])
    5252AT_CHECK([file=test-sphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-sphere.xyz-sorted], 0, [ignore], [ignore])
     
    6363AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
    6464AT_CHECK([chmod u+w $file], 0)
    65 AT_CHECK([../../molecuilder -i $file --select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr])
     65AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r --undo], 0, [stdout], [stderr])
    6666AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/$file], 0, [ignore], [ignore])
    6767
     
    6969AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
    7070AT_CHECK([chmod u+w $file], 0)
    71 AT_CHECK([../../molecuilder -i $file --select-all-atoms --unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr])
     71AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r --undo], 0, [stdout], [stderr])
    7272AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/$file], 0, [ignore], [ignore])
    7373
     
    8181AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
    8282AT_CHECK([chmod u+w $file], 0)
    83 AT_CHECK([../../molecuilder -i $file --select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr])
     83AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r --undo --redo], 0, [stdout], [stderr])
    8484AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutsphere.xyz-sorted], 0, [ignore], [ignore])
    8585AT_CHECK([file=test-withoutsphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-withoutsphere.xyz-sorted], 0, [ignore], [ignore])
     
    8888AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
    8989AT_CHECK([chmod u+w $file], 0)
    90 AT_CHECK([../../molecuilder -i $file --select-all-atoms --unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr])
     90AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r --undo --redo], 0, [stdout], [stderr])
    9191AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-sphere.xyz-sorted], 0, [ignore], [ignore])
    9292AT_CHECK([file=test-sphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-sphere.xyz-sorted], 0, [ignore], [ignore])
  • tests/regression/Filling/SphericalSurface/testsuite-molecules-fill-spherical-surface.at

    r12a24c r79ac03  
    4242AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/pre/tensid.potentials .], 0)
    4343AT_CHECK([chmod u+w $file], 0)
    44 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" --fill-spherical-surface --center "0,0,0" --radius 20. --count 200 --min-distance 3.1 --Alignment-Axis "0,0,1"], 0, [stdout], [stderr])
     44AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "0,0,0" --stretch "20.,20.,20." --select-shape-by-name "sphere1" --fill-surface --count 200 --min-distance 3.1 --Alignment-Axis "0,0,1"], 0, [stdout], [stderr])
    4545AT_CHECK([grep "200 out of 200 returned true from predicate" stdout], 0, [ignore], [ignore])
    4646AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/post/tensid.data], 0, [ignore], [ignore])
     
    5656AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/pre/tensid.potentials .], 0)
    5757AT_CHECK([chmod u+w $file], 0)
    58 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" --fill-spherical-surface --center "0,0,0" --radius 20. --count 200 --min-distance 3.1 --Alignment-Axis "0,0,1" --undo], 0, [stdout], [stderr])
     58AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "0,0,0" --stretch "20.,20.,20." --select-shape-by-name "sphere1" --fill-surface --count 200 --min-distance 3.1 --Alignment-Axis "0,0,1" --undo], 0, [stdout], [stderr])
    5959AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/post/$file], 0, [ignore], [ignore])
    6060
     
    6969AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/pre/tensid.potentials .], 0)
    7070AT_CHECK([chmod u+w $file], 0)
    71 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" --fill-spherical-surface --center "0,0,0" --radius 20. --count 200 --min-distance 3.1 --Alignment-Axis "0,0,1" --undo --redo], 0, [stdout], [stderr])
     71AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "0,0,0" --stretch "20.,20.,20." --select-shape-by-name "sphere1" --fill-surface --count 200 --min-distance 3.1 --Alignment-Axis "0,0,1" --undo --redo], 0, [stdout], [stderr])
    7272AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/post/tensid.data], 0, [ignore], [ignore])
    7373
  • tests/regression/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-select-atoms-inside-cuboid-with-defaults.at

    r12a24c r79ac03  
    4242AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
    4343AT_CHECK([chmod u+w $file], 0)
    44 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" -r], 0, [stdout], [stderr])
     44AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --select-shape-by-name "cube1" --select-atoms-inside-volume -r], 0, [stdout], [stderr])
    4545AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
    4646
     
    6363AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
    6464AT_CHECK([chmod u+w $file], 0)
    65 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo -r], 0, [stdout], [stderr])
     65AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --select-shape-by-name "cube1" --select-atoms-inside-volume --undo -r], 0, [stdout], [stderr])
    6666AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
    6767
     
    7575AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
    7676AT_CHECK([chmod u+w $file], 0)
    77 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo --redo -r], 0, [stdout], [stderr])
     77AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --select-shape-by-name "cube1" --select-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr])
    7878AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
    7979
  • tests/regression/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-select-atoms-inside-cuboid.at

    r12a24c r79ac03  
    4141AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
    4242AT_CHECK([chmod u+w $file], 0)
    43 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 -r], 0, [stdout], [stderr])
     43AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume -r], 0, [stdout], [stderr])
    4444AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
    4545
     
    6262AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
    6363AT_CHECK([chmod u+w $file], 0)
    64 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo -r], 0, [stdout], [stderr])
     64AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume  --undo -r], 0, [stdout], [stderr])
    6565AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
    6666
     
    7474AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
    7575AT_CHECK([chmod u+w $file], 0)
    76 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo --redo -r], 0, [stdout], [stderr])
     76AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume  --undo --redo -r], 0, [stdout], [stderr])
    7777AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
    7878
  • tests/regression/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-unselect-atoms-inside-cuboid.at

    r12a24c r79ac03  
    4242AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
    4343AT_CHECK([chmod u+w $file], 0)
    44 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 -r], 0, [stdout], [stderr])
     44AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume 0 -r], 0, [stdout], [stderr])
    4545AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore])
    4646
     
    6363AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
    6464AT_CHECK([chmod u+w $file], 0)
    65 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo -r], 0, [stdout], [stderr])
     65AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume  --undo -r], 0, [stdout], [stderr])
    6666AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/empty.xyz], 0, [ignore], [ignore])
    6767
     
    7575AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
    7676AT_CHECK([chmod u+w $file], 0)
    77 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0  --undo --redo -r], 0, [stdout], [stderr])
     77AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume  --undo --redo -r], 0, [stdout], [stderr])
    7878AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore])
    7979
  • tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-select-atoms-inside-sphere.at

    r12a24c r79ac03  
    4141AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    4242AT_CHECK([chmod u+w $file], 0)
    43 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" -r], 0, [stdout], [stderr])
     43AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10., 10., 10." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r], 0, [stdout], [stderr])
    4444AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidesphere.xyz], 0, [ignore], [ignore])
    4545
     
    6262AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    6363AT_CHECK([chmod u+w $file], 0)
    64 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" --undo -r], 0, [stdout], [stderr])
     64AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10., 10., 10." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume --undo -r], 0, [stdout], [stderr])
    6565AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz], 0, [ignore], [ignore])
    6666
     
    7474AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    7575AT_CHECK([chmod u+w $file], 0)
    76 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr])
     76AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10., 10., 10." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr])
    7777AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidesphere.xyz], 0, [ignore], [ignore])
    7878
  • tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-select-atoms-inside-tiny-sphere.at

    r12a24c r79ac03  
    4141AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    4242AT_CHECK([chmod u+w $file], 0)
    43 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 1.65 --position "10,10,10" -r], 0, [stdout], [stderr])
     43AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r], 0, [stdout], [stderr])
    4444AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidetinysphere.xyz], 0, [ignore], [ignore])
    4545
     
    6262AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    6363AT_CHECK([chmod u+w $file], 0)
    64 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 1.65 --position "10,10,10" --undo -r], 0, [stdout], [stderr])
     64AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume --undo -r], 0, [stdout], [stderr])
    6565AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz], 0, [ignore], [ignore])
    6666
     
    7474AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    7575AT_CHECK([chmod u+w $file], 0)
    76 AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 1.65 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr])
     76AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr])
    7777AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidetinysphere.xyz], 0, [ignore], [ignore])
    7878
  • tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-unselect-atoms-inside-sphere.at

    r12a24c r79ac03  
    4242AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    4343AT_CHECK([chmod u+w $file], 0)
    44 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" -r], 0, [stdout], [stderr])
     44AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10,10,10"  --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r], 0, [stdout], [stderr])
    4545AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidesphere.xyz], 0, [ignore], [ignore])
    4646
     
    6363AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    6464AT_CHECK([chmod u+w $file], 0)
    65 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" --undo -r], 0, [stdout], [stderr])
     65AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10,10,10"  --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume --undo -r], 0, [stdout], [stderr])
    6666AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/empty.xyz], 0, [ignore], [ignore])
    6767
     
    7575AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    7676AT_CHECK([chmod u+w $file], 0)
    77 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr])
     77AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10,10,10"  --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr])
    7878AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidesphere.xyz], 0, [ignore], [ignore])
    7979
  • tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-unselect-atoms-inside-tiny-sphere.at

    r12a24c r79ac03  
    4141AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    4242AT_CHECK([chmod u+w $file], 0)
    43 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 1.65 --position "10,10,10" -r], 0, [stdout], [stderr])
     43AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r], 0, [stdout], [stderr])
    4444AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidetinysphere.xyz], 0, [ignore], [ignore])
    4545
     
    6262AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    6363AT_CHECK([chmod u+w $file], 0)
    64 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 1.65 --position "10,10,10" --undo -r], 0, [stdout], [stderr])
     64AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume --undo -r], 0, [stdout], [stderr])
    6565AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/empty.xyz], 0, [ignore], [ignore])
    6666
     
    7474AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
    7575AT_CHECK([chmod u+w $file], 0)
    76 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 1.65 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr])
     76AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr])
    7777AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidetinysphere.xyz], 0, [ignore], [ignore])
    7878
Note: See TracChangeset for help on using the changeset viewer.