Index: src/Parameters/Specifics/Parameter_vector.cpp
===================================================================
--- src/Parameters/Specifics/Parameter_vector.cpp	(revision 2eded3e3d61e535231d97fc71a9fa372f2c9859f)
+++ src/Parameters/Specifics/Parameter_vector.cpp	(revision 2eded3e3d61e535231d97fc71a9fa372f2c9859f)
@@ -0,0 +1,297 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2017 Frederik Heber. All rights reserved.
+ *
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Parameter_vector.cpp
+ *
+ *  Created on: Mar 31, 2017
+ *      Author: heber
+ */
+
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+//#include "CodePatterns/MemDebug.hpp"
+
+#include "Parameters/Specifics/Parameter_vector.hpp"
+
+#include "Parameters/ParameterExceptions.hpp"
+
+Parameter<Vector>::Parameter(const Parameter<Vector> &instance) :
+  ParameterInterface(instance.getName()),
+  value(instance.value.getValidator())
+{
+  value.setAsString(instance.value.getAsStringUnvalidated());
+}
+
+/** Constructor for class Parameter.
+ *
+ */
+Parameter<Vector>::Parameter() :
+  ParameterInterface("__no_name__"),
+  value()
+{};
+
+/** Constructor for class Parameter.
+ *
+ */
+Parameter<Vector>::Parameter(const std::string &_name) :
+  ParameterInterface(_name),
+  value()
+{};
+
+/** Constructor for class Parameter.
+ *
+ * @param _name name of this parameter
+ * @param _value initial value to set
+ */
+Parameter<Vector>::Parameter(const std::string &_name, const Vector &_value) :
+  ParameterInterface(_name),
+  value()
+{
+  value.set(_value);
+};
+
+/** Constructor for class Parameter.
+ *
+ * @param _name name of this parameter
+ * @param _ValidRange valid range for this ContinuousValue
+ */
+Parameter<Vector>::Parameter(const std::string &_name, const Validator<Vector> &_Validator) :
+  ParameterInterface(_name),
+  value(_Validator)
+{};
+
+/** Constructor for class Parameter.
+ *
+ * @param _name name of this parameter
+ * @param _ValidRange valid range for this ContinuousValue
+ * @param _value initial value to set
+ */
+Parameter<Vector>::Parameter(const std::string &_name, const Validator<Vector> &_Validator, const Vector &_value) :
+  ParameterInterface(_name),
+  value(_Validator)
+{
+  value.set(_value);
+};
+
+/** Constructor for class Parameter.
+ *
+ * @param _name name of this parameter
+ * @param _ValidRange valid range for this ContinuousValue
+ */
+Parameter<Vector>::Parameter(const std::string &_name, const std::vector<Vector> &_ValidValues) :
+  ParameterInterface(_name),
+  value(_ValidValues)
+{};
+
+/** Constructor for class Parameter.
+ *
+ * @param _name name of this parameter
+ * @param _ValidRange valid range for this ContinuousValue
+ * @param _value initial value to set
+ */
+Parameter<Vector>::Parameter(const std::string &_name, const std::vector<Vector> &_ValidValues, const Vector &_value) :
+  ParameterInterface(_name),
+  value(_ValidValues)
+{
+  value.set(_value);
+};
+
+/** Constructor for class Parameter.
+ *
+ * @param _name name of this parameter
+ * @param _ValidRange valid range for this ContinuousValue
+ */
+Parameter<Vector>::Parameter(const std::string &_name, const range<Vector> &_ValidRange) :
+  ParameterInterface(_name),
+  value(_ValidRange)
+{};
+
+/** Constructor for class Parameter.
+ *
+ * @param _name name of this parameter
+ * @param _ValidRange valid range for this ContinuousValue
+ * @param _value initial value to set
+ */
+Parameter<Vector>::Parameter(const std::string &_name, const range<Vector> &_ValidRange, const Vector &_value) :
+  ParameterInterface(_name),
+  value(_ValidRange)
+{
+  value.set(_value);
+};
+
+/** Destructor for class Parameter.
+ *
+ */
+Parameter<Vector>::~Parameter()
+{};
+
+/** Catch call to value.isValidAsString() to add exception information.
+ *
+ * @param _value value to set to
+ */
+bool Parameter<Vector>::isValidAsString(const std::string &_value) const throw(ParameterValidatorException)
+{
+  try {
+    return value.isValidAsString(_value);
+  } catch(ParameterException &e) {
+    e << ParameterName(ParameterInterface::getName());
+    throw;
+  }
+}
+
+
+/** Catch call to value.getAsString() to add exception information.
+ *
+ * @return parameter value as string
+ */
+const std::string Parameter<Vector>::getAsString() const throw(ParameterValueException)
+{
+  try {
+    return value.getAsString();
+  } catch(ParameterException &e) {
+    e << ParameterName(ParameterInterface::getName());
+    throw;
+  }
+}
+
+/** Catch call to value.getAsStringUnvalidated() to add exception information.
+ *
+ * @return parameter value as string
+ */
+const std::string Parameter<Vector>::getAsStringUnvalidated() const throw(ParameterValueException)
+{
+  try {
+    return value.getAsStringUnvalidated();
+  } catch(ParameterException &e) {
+    e << ParameterName(ParameterInterface::getName());
+    throw;
+  }
+}
+
+/** Catch call to value.isValid() to add exception information.
+ *
+ * @return parameter value as string
+ */
+bool Parameter<Vector>::isValid(const Vector &_value) const throw(ParameterValidatorException)
+{
+  try {
+    return value.isValid(_value);
+  } catch(ParameterException &e) {
+    e << ParameterName(ParameterInterface::getName());
+    throw;
+  }
+}
+
+
+/** Catch call to value.getUnvalidated() to add exception information.
+ *
+ * @return parameter value as string
+ */
+const Vector & Parameter<Vector>::getUnvalidated() const throw(ParameterValueException)
+{
+  try {
+    return value.getUnvalidated();
+  } catch(ParameterException &e) {
+    e << ParameterName(ParameterInterface::getName());
+    throw;
+  }
+}
+
+/** Catch call to value.get() to add exception information.
+ *
+ * @return parameter value as string
+ */
+const Vector & Parameter<Vector>::get() const throw(ParameterValueException)
+{
+  try {
+    return value.get();
+  } catch(ParameterException &e) {
+    e << ParameterName(ParameterInterface::getName());
+    throw;
+  }
+}
+
+/** Catch call to value.set() to add exception information.
+ *
+ * @param _value value to set to
+ */
+void Parameter<Vector>::set(const Vector & _value) throw(ParameterValueException)
+{
+  try {
+    value.set(_value);
+  } catch(ParameterException &e) {
+    e << ParameterName(ParameterInterface::getName());
+    throw;
+  }
+}
+
+/** Catch call to value.set() to add exception information.
+ *
+ * @param _value value to set to
+ */
+void Parameter<Vector>::setAsString(const std::string &_value) throw(ParameterValueException)
+{
+  try {
+    value.setAsString(_value);
+  } catch(ParameterException &e) {
+    e << ParameterName(ParameterInterface::getName());
+    throw;
+  }
+}
+
+/** Compares this continuous value against another \a _instance.
+ *
+ * @param _instance other value to compare to
+ * @return true - if contained ContinuousValue and name are the same, false - else
+ */
+bool Parameter<Vector>::operator==(const Parameter<Vector> &_instance) const throw(ParameterException)
+{
+  bool status = true;
+  try {
+    status = status &&
+        (getUnvalidated() == _instance.getUnvalidated());
+    status = status && (ParameterInterface::getName() == _instance.ParameterInterface::getName());
+  } catch(ParameterException &e) {
+    e << ParameterName(ParameterInterface::getName());
+    throw;
+  }
+  return status;
+}
+
+/** Creates a clone of this Parameter instance.
+ *
+ * @return cloned instance
+ */
+ParameterInterface* Parameter<Vector>::clone() const
+{
+  Parameter<Vector> *instance = new Parameter<Vector>(ParameterInterface::getName(), value.getValidator());
+  // do not use get, we do not check for validity here
+  if (value.isSet())
+    instance->setAsString(value.getAsStringUnvalidated());
+  return instance;
+}
+
Index: src/Parameters/Specifics/Parameter_vector.hpp
===================================================================
--- src/Parameters/Specifics/Parameter_vector.hpp	(revision 2eded3e3d61e535231d97fc71a9fa372f2c9859f)
+++ src/Parameters/Specifics/Parameter_vector.hpp	(revision 2eded3e3d61e535231d97fc71a9fa372f2c9859f)
@@ -0,0 +1,73 @@
+/*
+ * Parameter_vector.hpp
+ *
+ *  Created on: Mar 31, 2017
+ *      Author: heber
+ */
+
+
+#ifndef PARAMETERS_SPECIFICS_PARAMETER_VECTOR_HPP_
+#define PARAMETERS_SPECIFICS_PARAMETER_VECTOR_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "LinearAlgebra/Vector.hpp"
+
+#include "Parameters/Parameter.hpp"
+
+template <>
+class Parameter<Vector> :
+  public ParameterInterface,
+  public ValueInterface<Vector>
+{
+public:
+  Parameter(const Parameter<Vector> &instance);
+  Parameter(const std::string &_name);
+  Parameter(const std::string &_name, const Vector &_value);
+  Parameter(const std::string &_name, const Validator<Vector> &_Validator);
+  Parameter(const std::string &_name, const Validator<Vector> &_Validator, const Vector &_value);
+  Parameter(const std::string &_name, const std::vector<Vector> &_ValidValues);
+  Parameter(const std::string &_name, const std::vector<Vector> &_ValidValues, const Vector &_value);
+  Parameter(const std::string &_name, const range<Vector> &_ValidRange);
+  Parameter(const std::string &_name, const range<Vector> &_ValidRange, const Vector &_value);
+  virtual ~Parameter();
+
+  // wrap the following functions from ValueAsString to add exception information
+  bool isValidAsString(const std::string &_value) const throw(ParameterValidatorException);
+  const std::string getAsString() const throw(ParameterValueException);
+  const std::string getAsStringUnvalidated() const throw(ParameterValueException);
+  void setAsString(const std::string &_value) throw(ParameterValueException);
+
+  // wrap the following functions from Value<Vector> to add exception information
+  bool isValid(const Vector &_value) const throw(ParameterValidatorException);
+  const Vector & get() const throw(ParameterValueException);
+  const Vector & getUnvalidated() const throw(ParameterValueException);
+  void set(const Vector & _value) throw(ParameterValueException);
+  bool isSet() const
+  { return value.isSet(); }
+
+  const Validator<Vector> & getValidator() const
+  { return value.getValidator(); }
+  Validator<Vector> & getValidator()
+  { return value.getValidator(); }
+
+  // comparator
+  bool operator==(const Parameter<Vector> &_instance) const throw(ParameterException);
+  bool operator!=(const Parameter<Vector> &_instance) const throw(ParameterException)
+      { return !((*this)==(_instance)); }
+
+  ParameterInterface* clone() const;
+
+//private: // TODO...
+  Parameter();
+
+private:
+  //!> contained value of this parameter
+  Value<Vector> value;
+};
+
+
+#endif /* PARAMETERS_SPECIFICS_PARAMETER_VECTOR_HPP_ */
Index: src/Parameters/Specifics/Value_vector.cpp
===================================================================
--- src/Parameters/Specifics/Value_vector.cpp	(revision 2eded3e3d61e535231d97fc71a9fa372f2c9859f)
+++ src/Parameters/Specifics/Value_vector.cpp	(revision 2eded3e3d61e535231d97fc71a9fa372f2c9859f)
@@ -0,0 +1,257 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2017 Frederik Heber. All rights reserved.
+ *
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Value_vector.cpp
+ *
+ *  Created on: Mar 29, 2017
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+//#include "CodePatterns/MemDebug.hpp"
+
+#include "Value_vector.hpp"
+
+#include <boost/lexical_cast.hpp>
+#include <boost/tokenizer.hpp>
+
+#include "Geometry/GeometryRegistry.hpp"
+#include "World.hpp"
+
+const Vector Value<Vector>::parseAsVector(const std::string &_value)
+{
+  Vector temp;
+  if (GeometryRegistry::getInstance().isPresentByName(_value)) {
+    temp = GeometryRegistry::getInstance().getByName(_value)->getVector();
+    LOG(4, "DEBUG: Using stored vector '" << _value << "' from geometry registry.");
+  } else {
+    // dissect by ","
+    typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
+    boost::char_separator<char> value_separator(",)( ");
+
+    bool status = true;
+    tokenizer tokens(_value, value_separator);
+    if (!_value.empty()) {
+      tokenizer::iterator tok_iter = tokens.begin();
+      for (size_t i=0;i<NDIM;++i) {
+        if (tok_iter == tokens.end()) {
+          status = false;
+          break;
+        }
+        try {
+          temp[i] = boost::lexical_cast<double>(*(tok_iter++));
+        } catch (boost::bad_lexical_cast &e) {
+          throw ParameterValueException();
+        }
+      }
+//      if (tok_iter != tokens.end())
+//        ELOG(2, "There are still components left: " << *tok_iter << "?");
+    }
+    if (!status)
+      temp.Zero();
+  }
+  return temp;
+}
+
+const std::string Value<Vector>::setFromVector(const Vector &_vec)
+{
+  std::stringstream output;
+  for (size_t i=0;i<NDIM;++i) {
+    if (i!=0)
+      output << ",";
+    output << _vec;
+  }
+  return output.str();
+}
+
+/** Here come the modified functions.
+ *
+ */
+
+const Vector & Value<Vector>::get() const throw(ParameterValueException)
+{
+  converted_value = parseAsVector(value);
+  if (!ValueSet) throw ParameterValueException();
+  if (!isValid(converted_value)) throw ParameterValueException();
+  return converted_value;
+}
+
+const Vector & Value<Vector>::getUnvalidated() const throw(ParameterValueException)
+{
+  converted_value = parseAsVector(value);
+  if (!ValueSet) throw ParameterValueException();
+  return converted_value;
+}
+
+/** Here are the original functions that we simply copied.
+ *
+ */
+
+Value<Vector>::Value() :
+  ValueSet(false),
+  validator(new DummyValidator<Vector>)
+{}
+
+Value<Vector>::Value(const Validator<Vector> &_validator) :
+  ValueSet(false),
+  validator(_validator.clone())
+{}
+
+Value<Vector>::Value(const std::vector<Vector> &_ValidValues) :
+  ValueSet(false),
+  validator(NULL)
+{
+  validator = new DiscreteValidator<Vector>(_ValidValues);
+}
+
+Value<Vector>::Value(const range<Vector> &_ValidRange) :
+  ValueSet(false),
+  validator(NULL)
+{
+  validator = new RangeValidator<Vector>(_ValidRange);
+}
+
+Value<Vector>::~Value()
+{
+  ASSERT(validator,
+      "Value<Vector>::~Value() - validator missing.");
+  delete(validator);
+}
+
+bool Value<Vector>::isValid(const Vector & _value) const throw(ParameterValidatorException)
+{
+  if (validator == NULL) throw ParameterValidatorException();
+  return (*validator)(_value);
+}
+
+
+bool Value<Vector>::operator==(const Value<Vector> &_instance) const throw(ParameterValidatorException)
+{
+  if (validator == NULL) throw ParameterValidatorException();
+  if (_instance.validator == NULL) throw ParameterValidatorException();
+  bool status = true;
+  status = status && (*validator == *_instance.validator);
+  status = status && (ValueSet == _instance.ValueSet);
+  if (ValueSet && _instance.ValueSet)
+    status = status && (value == _instance.value);
+  return status;
+}
+
+void Value<Vector>::set(const Vector & _value) throw(ParameterException)
+{
+  // any value may be set, this allows Actions to have invalid parameters
+  // (e.g. because the given atom id does not yet exist) that are checked
+  // on performCall()
+//  if (!isValid(_value)) throw ParameterValueException();
+  if (!ValueSet)
+    ValueSet = true;
+  value = setFromVector(_value);
+}
+
+
+bool Value<Vector>::isSet() const
+{
+  return ValueSet;
+}
+
+
+bool Value<Vector>::isValidAsString(const std::string &_value) const throw(ParameterValidatorException)
+{
+  const Vector castvalue = parseAsVector(_value);
+//  LOG(0, "Converted value reads " << castvalue <<".");
+  return isValid(castvalue);
+}
+
+
+const std::string Value<Vector>::getAsString() const throw(ParameterValueException)
+{
+  converted_value = parseAsVector(value);
+  if (!ValueSet) throw ParameterValueException();
+  if (!isValid(converted_value)) throw ParameterValueException();
+  return value;
+}
+
+const std::string Value<Vector>::getAsStringUnvalidated() const throw(ParameterValueException)
+{
+  if (!ValueSet) throw ParameterValueException();
+  return value;
+}
+
+void Value<Vector>::setAsString(const std::string &_value) throw(ParameterException)
+{
+  if (!ValueSet)
+    ValueSet = true;
+  value = _value;
+//  LOG(0, "STATUS: Value is now set to " << value << ".");
+}
+
+
+const Validator<Vector> &Value<Vector>::getValidator() const
+{
+  if (validator == NULL) throw ParameterValidatorException();
+  return *validator;
+}
+
+
+Validator<Vector> &Value<Vector>::getValidator()
+{
+  if (validator == NULL) throw ParameterValidatorException();
+  return *validator;
+}
+
+
+const range<Vector> & Value<Vector>::getValidRange() const throw(ParameterValidatorException)
+{
+  return dynamic_cast<const RangeValidator<Vector>&>(getValidator()).getValidRange();
+}
+
+
+void Value<Vector>::setValidRange(const range<Vector> &_range) throw(ParameterValueException)
+{
+  dynamic_cast<RangeValidator<Vector>&>(getValidator()).setValidRange(_range);
+  if (ValueSet) {
+      //std::cout << "Checking whether " << value << " is in range " << _range << "." << std::endl;
+    if (!isValid(converted_value)){
+      //std::cout << "ValueSet to false." << std::endl;
+      ValueSet = false;
+      // have full check again in assert such that it appears in output, too
+      throw ParameterValueException() << ParameterValidValues(toString(_range));
+    }
+  }
+  //  LOG(0, "STATUS: Valid range is now " << ValidRange << ".");
+}
+
+void Value<Vector>::appendValidValue(const Vector &_value) throw(ParameterValidatorException)
+{
+  dynamic_cast<DiscreteValidator<Vector>&>(getValidator()).appendValidValue(_value);
+}
+
+const std::vector<Vector> &Value<Vector>::getValidValues() const throw(ParameterValidatorException)
+{
+  return dynamic_cast<const DiscreteValidator<Vector>&>(getValidator()).getValidValues();
+}
+
Index: src/Parameters/Specifics/Value_vector.hpp
===================================================================
--- src/Parameters/Specifics/Value_vector.hpp	(revision 2eded3e3d61e535231d97fc71a9fa372f2c9859f)
+++ src/Parameters/Specifics/Value_vector.hpp	(revision 2eded3e3d61e535231d97fc71a9fa372f2c9859f)
@@ -0,0 +1,92 @@
+/*
+ * Value_vector.hpp
+ *
+ *  Created on: Mar 29, 2017
+ *      Author: heber
+ */
+
+#ifndef VALUE_VECTOR_HPP_
+#define VALUE_VECTOR_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string>
+
+#include "LinearAlgebra/Vector.hpp"
+
+#include "Parameters/Value.hpp"
+
+/** This class represents a the Vector class specialization of a general value.
+ *
+ * Instead of a Vector we internally store a string.
+ * This allows us to override the default get() behavior and allows us to first
+ * do the parsing of the string into vector components.
+ *
+ */
+template <>
+class Value<Vector> :
+  public ValueAsString,
+  public ValueInterface<Vector>
+{
+  //!> unit test needs to have access to internal values
+  friend class ValueTest;
+  friend class ContinuousValueTest;
+  friend class Parameter<Vector>;
+public:
+  Value();
+  Value(const Validator<Vector> &_validator);
+  Value(const std::vector<Vector> &_ValidValues);
+  Value(const range<Vector> &_ValidRange);
+  virtual ~Value();
+
+  // functions for ValueInterface
+  bool isValid(const Vector &_value) const throw(ParameterValidatorException);
+  const Vector & getUnvalidated() const throw(ParameterValueException);
+  const Vector & get() const throw(ParameterValueException);
+  void set(const Vector & _value) throw(ParameterException);
+  bool isSet() const;
+
+  // string functions for ValueInterface
+  bool isValidAsString(const std::string &_value) const throw(ParameterValidatorException);
+  const std::string getAsString() const throw(ParameterValueException);
+  const std::string getAsStringUnvalidated() const throw(ParameterValueException);
+  void setAsString(const std::string &_value) throw(ParameterException);
+
+  // comfortable setter
+  Value<Vector> &operator=(const Vector &_value)
+  { set(_value);  return *this;  }
+
+  // comparator
+  bool operator==(const Value<Vector> &_instance) const throw(ParameterValidatorException);
+  bool operator!=(const Value<Vector> &_instance) const throw(ParameterValidatorException)
+      { return !((*this)==(_instance)); }
+
+  const Validator<Vector> & getValidator() const;
+  Validator<Vector> & getValidator();
+
+  // comfortable validator functions
+  const range<Vector> & getValidRange() const throw(ParameterValidatorException);
+  void setValidRange(const range<Vector> &_range) throw(ParameterValueException);
+  void appendValidValue(const Vector &_value) throw(ParameterValidatorException);
+  const std::vector<Vector> &getValidValues() const throw(ParameterValidatorException);
+
+  static const Vector parseAsVector(const std::string &_value);
+  static const std::string setFromVector(const Vector &_vec);
+
+private:
+  //!> whether a value has been set or not
+  bool ValueSet;
+  //!> contained value
+  std::string value;
+  //!> converted value for allowing to return a ref
+  mutable Vector converted_value;
+
+  //!> the validator
+  Validator<Vector> *validator;
+};
+
+
+#endif /* VALUE_VECTOR_HPP_ */
