Index: src/Descriptors/AtomDescriptor_impl.hpp
===================================================================
--- src/Descriptors/AtomDescriptor_impl.hpp	(revision 02ee152fb4a2671e1975d6205dec5168dd7e7ee7)
+++ src/Descriptors/AtomDescriptor_impl.hpp	(revision f16a4be57592953464b3be117545615b04328223)
@@ -1,2 +1,5 @@
+#ifndef ATOMDESCRIPTOR_IMPL_HPP
+#define ATOMDESCRIPTOR_IMPL_HPP
+
 /************************ Declarations of implementation Objects ************************/
 
@@ -70,2 +73,4 @@
   AtomDescriptor::impl_ptr arg;
 };
+
+#endif //ATOMDESCRIPTOR_IMPL_HPP
Index: src/Descriptors/AtomIdDescriptor.cpp
===================================================================
--- src/Descriptors/AtomIdDescriptor.cpp	(revision 02ee152fb4a2671e1975d6205dec5168dd7e7ee7)
+++ src/Descriptors/AtomIdDescriptor.cpp	(revision f16a4be57592953464b3be117545615b04328223)
@@ -22,5 +22,5 @@
 
 bool AtomIdDescriptor_impl::predicate(std::pair<int,atom*> atom) {
-  return atom.second->getId()==id;
+  return atom.first==id;
 }
 
@@ -29,10 +29,5 @@
 }
 
-#if 0
-
-// so far the lookuptable for Atoms-by-id does not work, since atoms don't get an ID upon creation.
-// instead of this we rely on walking through all atoms.
-
-atom *AtomIdDescriptor::find(){
+atom *AtomIdDescriptor_impl::find(){
   map<int,atom*> atoms = getAtoms();
   map<int,atom*>::iterator res = atoms.find(id);
@@ -40,8 +35,6 @@
 }
 
-vector<atom*> AtomIdDescriptor::findAll(){
+vector<atom*> AtomIdDescriptor_impl::findAll(){
   atom *res = find();
   return (res)?(vector<atom*>(1,res)):(vector<atom*>());
 }
-
-#endif
Index: src/Descriptors/AtomIdDescriptor_impl.hpp
===================================================================
--- src/Descriptors/AtomIdDescriptor_impl.hpp	(revision 02ee152fb4a2671e1975d6205dec5168dd7e7ee7)
+++ src/Descriptors/AtomIdDescriptor_impl.hpp	(revision f16a4be57592953464b3be117545615b04328223)
@@ -1,2 +1,5 @@
+#ifndef ATOMIDDESCRIPTOR_IMPL_HPP
+#define ATOMIDDESCRIPTOR_IMPL_HPP
+
 #include "Descriptors/AtomDescriptor_impl.hpp"
 
@@ -10,9 +13,9 @@
 
 protected:
-#if 0
-  atom *find();
-  std::vector<atom*> findAll();
-#endif
+  virtual atom *find();
+  virtual std::vector<atom*> findAll();
 private:
   int id;
 };
+
+#endif //ATOMIDDESCRIPTOR_IMPL_HPP
Index: src/Descriptors/AtomTypeDescriptor.cpp
===================================================================
--- src/Descriptors/AtomTypeDescriptor.cpp	(revision f16a4be57592953464b3be117545615b04328223)
+++ src/Descriptors/AtomTypeDescriptor.cpp	(revision f16a4be57592953464b3be117545615b04328223)
@@ -0,0 +1,33 @@
+/*
+ * AtomTypeDescriptor_impl.cpp
+ *
+ *  Created on: Feb 25, 2010
+ *      Author: crueger
+ */
+
+#include "Descriptors/AtomTypeDescriptor.hpp"
+#include "Descriptors/AtomTypeDescriptor_impl.hpp"
+
+#include "atom.hpp"
+#include "World.hpp"
+#include "periodentafel.hpp"
+
+AtomTypeDescriptor_impl::AtomTypeDescriptor_impl(element* _type) :
+  type(_type)
+{}
+
+AtomTypeDescriptor_impl::~AtomTypeDescriptor_impl()
+{}
+
+bool AtomTypeDescriptor_impl::predicate(std::pair<int,atom*> atom) {
+  return (atom.second->getType()==type);
+}
+
+AtomDescriptor AtomByType(element *elem){
+  return AtomDescriptor(AtomDescriptor::impl_ptr(new AtomTypeDescriptor_impl(elem)));
+}
+
+AtomDescriptor AtomByType(int Z){
+  element * elem = World::get()->getPeriode()->FindElement(Z);
+  return AtomByType(elem);
+}
Index: src/Descriptors/AtomTypeDescriptor.hpp
===================================================================
--- src/Descriptors/AtomTypeDescriptor.hpp	(revision f16a4be57592953464b3be117545615b04328223)
+++ src/Descriptors/AtomTypeDescriptor.hpp	(revision f16a4be57592953464b3be117545615b04328223)
@@ -0,0 +1,18 @@
+/*
+ * AtomTypeDescriptor.h
+ *
+ *  Created on: Feb 25, 2010
+ *      Author: crueger
+ */
+
+#ifndef ATOMTYPEDESCRIPTOR_HPP
+#define ATOMTYPEDESCRIPTOR_HPP
+
+#include "Descriptors/AtomDescriptor.hpp"
+
+class element;
+
+AtomDescriptor AtomByType(element *);
+AtomDescriptor AtomByType(int);
+
+#endif /* ATOMTYPEDESCRIPTOR_HPP */
Index: src/Descriptors/AtomTypeDescriptor_impl.hpp
===================================================================
--- src/Descriptors/AtomTypeDescriptor_impl.hpp	(revision f16a4be57592953464b3be117545615b04328223)
+++ src/Descriptors/AtomTypeDescriptor_impl.hpp	(revision f16a4be57592953464b3be117545615b04328223)
@@ -0,0 +1,24 @@
+/*
+ * AtomTypeDescriptor_impl.hpp
+ *
+ *  Created on: Feb 25, 2010
+ *      Author: crueger
+ */
+
+#ifndef ATOMTYPEDESCRIPTOR_IMPL_HPP_
+#define ATOMTYPEDESCRIPTOR_IMPL_HPP_
+
+#include "Descriptors/AtomDescriptor_impl.hpp"
+
+class AtomTypeDescriptor_impl : public AtomDescriptor_impl
+{
+public:
+  AtomTypeDescriptor_impl(element* _type);
+  virtual ~AtomTypeDescriptor_impl();
+
+  bool predicate(std::pair<int,atom*> atom);
+private:
+  element *type;
+};
+
+#endif /* ATOMTYPEDESCRIPTOR_IMPL_HPP_ */
Index: src/Legacy/oldmenu.cpp
===================================================================
--- src/Legacy/oldmenu.cpp	(revision 02ee152fb4a2671e1975d6205dec5168dd7e7ee7)
+++ src/Legacy/oldmenu.cpp	(revision f16a4be57592953464b3be117545615b04328223)
@@ -737,5 +737,5 @@
         Log() << Verbose(0) << "New element by atomic number Z: ";
         cin >> Z;
-        first->type = periode->FindElement(Z);
+        first->setType(Z);
         Log() << Verbose(0) << "Atom " << first->nr << "'s element is " << first->type->name << "." << endl;
       }
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 02ee152fb4a2671e1975d6205dec5168dd7e7ee7)
+++ src/Makefile.am	(revision f16a4be57592953464b3be117545615b04328223)
@@ -29,6 +29,6 @@
 LEGACYHEADER = Legacy/oldmenu.hpp
 
-DESCRIPTORSOURCE = Descriptors/AtomDescriptor.cpp Descriptors/AtomIdDescriptor.cpp
-DESCRIPTORHEADER = Descriptors/AtomDescriptor.hpp Descriptors/AtomIdDescriptor.hpp
+DESCRIPTORSOURCE = Descriptors/AtomDescriptor.cpp Descriptors/AtomIdDescriptor.cpp Descriptors/AtomTypeDescriptor.cpp
+DESCRIPTORHEADER = Descriptors/AtomDescriptor.hpp Descriptors/AtomIdDescriptor.hpp Descriptors/AtomTypeDescriptor.hpp
 
 SOURCE = ${ANALYSISSOURCE} ${ATOMSOURCE} ${PATTERNSOURCE} ${UISOURCE} ${DESCRIPTORSOURCE} ${LEGACYSOURCE} bond.cpp bondgraph.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp errorlogger.cpp graph.cpp helpers.cpp info.cpp leastsquaremin.cpp linkedcell.cpp lists.cpp log.cpp logger.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp World.cpp 
Index: src/atom_atominfo.cpp
===================================================================
--- src/atom_atominfo.cpp	(revision 02ee152fb4a2671e1975d6205dec5168dd7e7ee7)
+++ src/atom_atominfo.cpp	(revision f16a4be57592953464b3be117545615b04328223)
@@ -6,4 +6,6 @@
  */
 
+#include "periodentafel.hpp"
+#include "World.hpp"
 #include "atom_atominfo.hpp"
 
@@ -18,2 +20,14 @@
 };
 
+element *AtomInfo::getType(){
+  return type;
+}
+
+void AtomInfo::setType(element* _type) {
+  type = _type;
+}
+
+void AtomInfo::setType(int Z) {
+  element *elem = World::get()->getPeriode()->FindElement(Z);
+  setType(elem);
+}
Index: src/atom_atominfo.hpp
===================================================================
--- src/atom_atominfo.hpp	(revision 02ee152fb4a2671e1975d6205dec5168dd7e7ee7)
+++ src/atom_atominfo.hpp	(revision f16a4be57592953464b3be117545615b04328223)
@@ -37,4 +37,8 @@
   ~AtomInfo();
 
+  element *getType();
+  void setType(element *);
+  void setType(int);
+
 private:
 };
