Ignore:
Timestamp:
Feb 8, 2010, 4:23:03 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
323177
Parents:
86b917
Message:

Improved Descriptor mechanism to allow calculations using descriptors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/Descriptors/AtomIdDescriptor.cpp

    r86b917 r973c03  
    1919{}
    2020
     21bool AtomIdDescriptor::predicate(std::pair<int,atom*> atom) {
     22  return atom.second->getId()==id;
     23}
     24
     25AtomDescriptor::desc_ptr AtomIdDescriptor::clone() const{
     26  return desc_ptr(new AtomIdDescriptor(id));
     27}
     28
     29#if 0
     30
     31// so far the lookuptable for Atoms-by-id does not work, since atoms don't get an ID upon creation.
     32// instead of this we rely on walking through all atoms.
    2133
    2234atom *AtomIdDescriptor::find(){
     
    3042  return (res)?(vector<atom*>(1,res)):(vector<atom*>());
    3143}
     44
     45#endif
Note: See TracChangeset for help on using the changeset viewer.