Changes in / [a1436b:36bb2d]


Ignore:
Files:
58 added
15 deleted
60 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    33
    44AC_PREREQ(2.59)
    5 AC_INIT(MoleCuilder, 1.3.3, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])
     5AC_INIT(MoleCuilder, 1.3.4, [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.3])
     94AC_SUBST([MOLECUILDER_API_VERSION], [1.3.4])
    9095
    9196dnl this macro is used to get the arguments supplied
     
    364369        doc/Makefile
    365370        src/Makefile
     371        data/icons/Makefile
    366372        utils/Makefile
    367373])
  • src/Actions/GlobalListOfActions.hpp

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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/Makefile.am

    ra1436b r36bb2d  
    303303
    304304
    305 molecuilder_CPPFLAGS = $(AM_CPPFLAGS)
     305molecuilder_CPPFLAGS = $(AM_CPPFLAGS) ${QT_CFLAGS}
    306306#molecuilder_CXXFLAGS += -DNO_CACHING
    307307molecuilder_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
  • src/Parameters/Makefile.am

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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 = \
     
    303309
    304310libMolecuilderQtUI_la_LIBADD = \
     311        ../data/icons/libicons.la \
    305312        ${QT_LIBS} \
    306313        -lQtOpenGL \
    307314        ${GLU_LIBS}
     315
     316##libMolecuilderQtUI_la_LDADD = \
     317##      ../data/icons/libicons.a
    308318
    309319nobase_libMolecuilderQtUI_la_include_HEADERS = ${QTUIHEADER} $(QTUIUI_UIFILES)
  • src/UIElements/Menu/MenuDescription.cpp

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

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

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

    ra1436b r36bb2d  
    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();
  • tests/Python/AllActions/options.dat

    ra1436b r36bb2d  
    165165select-molecules-by-formula     "H2O"
    166166select-molecules-by-name        "water"
     167select-shape-by-name    "sphere2"
    167168server-address  "127.0.0.1"
    168169server-port     "1026"
     
    179180set-tremolo-atomdata    "ATOMDATA type id x=3"
    180181set-world-time  "10"
     182shape-name      "sphere1"
     183shape-op        "AND"
     184shape-type      "sphere"
    181185skiplines       "1"
    182186skiplines       "2"
    183187start-step      "0"
    184188stretch-bond    "1.5"
     189stretch "1. 1. 1."
    185190suspend-in-water        "1.0"
    186191tesselation-radius      "5."
    187192time-step-zero  "0"
    188193translate-atoms "1. 0. 0."
     194translation     "0. 0. 0."
    189195unselect-atom-by-element        "1"
    190196unselect-atom-by-element        "4"
     
    206212unselect-molecules-by-formula   "H2O"
    207213unselect-molecules-by-name      "water"
     214unselect-shape-by-name  "cube42"
    208215verbose "3"
    209216verlet-integration      "forces.dat"
  • tests/regression/Analysis/DipoleCorrelation-DiscreteAngles/testsuite-analysis-dipole-correlation-discrete-angles.at

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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

    ra1436b r36bb2d  
    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.