Index: src/Descriptors/AtomDescriptor_impl.hpp
===================================================================
--- src/Descriptors/AtomDescriptor_impl.hpp	(revision 865a945a9d2eacb1afa6069866839972485957de)
+++ src/Descriptors/AtomDescriptor_impl.hpp	(revision 0e2a479de952e453e6f956e78d72739043a4c7a5)
@@ -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 865a945a9d2eacb1afa6069866839972485957de)
+++ src/Descriptors/AtomIdDescriptor.cpp	(revision 0e2a479de952e453e6f956e78d72739043a4c7a5)
@@ -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 865a945a9d2eacb1afa6069866839972485957de)
+++ src/Descriptors/AtomIdDescriptor_impl.hpp	(revision 0e2a479de952e453e6f956e78d72739043a4c7a5)
@@ -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 0e2a479de952e453e6f956e78d72739043a4c7a5)
+++ src/Descriptors/AtomTypeDescriptor.cpp	(revision 0e2a479de952e453e6f956e78d72739043a4c7a5)
@@ -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 0e2a479de952e453e6f956e78d72739043a4c7a5)
+++ src/Descriptors/AtomTypeDescriptor.hpp	(revision 0e2a479de952e453e6f956e78d72739043a4c7a5)
@@ -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 0e2a479de952e453e6f956e78d72739043a4c7a5)
+++ src/Descriptors/AtomTypeDescriptor_impl.hpp	(revision 0e2a479de952e453e6f956e78d72739043a4c7a5)
@@ -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_ */
