Ignore:
Timestamp:
Feb 9, 2009, 5:24:10 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
451d7a
Parents:
4aef8a
git-author:
Frederik Heber <heber@…> (02/09/09 15:55:37)
git-committer:
Frederik Heber <heber@…> (02/09/09 17:24:10)
Message:

Merge branch 'ConcaveHull' of ../espack2 into ConcaveHull

Conflicts:

molecuilder/src/boundary.cpp
molecuilder/src/boundary.hpp
molecuilder/src/builder.cpp
molecuilder/src/linkedcell.cpp
molecuilder/src/linkedcell.hpp
molecuilder/src/vector.cpp
molecuilder/src/vector.hpp
util/src/NanoCreator.c

Basically, this resulted from a lot of conversions two from spaces to one tab, which is my standard indentation. The mess was caused by eclipse auto-indenting. And in espack2:ConcaveHull was the new stuff, so all from ConcaveHull was replaced in case of doubt.
Additionally, vector had ofstream << operator instead ostream << ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/bond.cpp

    • Property mode changed from 100644 to 100755
    r4aef8a re08f45  
    1616        leftatom = NULL;
    1717        rightatom = NULL;
    18   previous = NULL;
    19   next = NULL;
     18        previous = NULL;
     19        next = NULL;
    2020        nr = -1;
    2121        HydrogenBond = 0;
    2222        BondDegree = 0;
    23   Used = white;
    24   Cyclic = false;
    25   Type = Undetermined;
     23        Used = white;
     24        Cyclic = false;
     25        Type = Undetermined;
    2626};
    2727
     
    3636        leftatom = left;
    3737        rightatom = right;
    38   previous = NULL;
    39   next = NULL;
     38        previous = NULL;
     39        next = NULL;
    4040        HydrogenBond = 0;
    41   if ((left != NULL) && (right != NULL)) {
    42         if ((left->type != NULL) && (left->type->Z == 1))
    43                 HydrogenBond++;
    44         if ((right->type != NULL) && (right->type->Z == 1))
    45                 HydrogenBond++;
    46   }
    47   BondDegree = degree;
    48   nr = number;
    49   Used = white;
    50   Cyclic = false;
     41        if ((left != NULL) && (right != NULL)) {
     42                if ((left->type != NULL) && (left->type->Z == 1))
     43                        HydrogenBond++;
     44                if ((right->type != NULL) && (right->type->Z == 1))
     45                        HydrogenBond++;
     46        }
     47        BondDegree = degree;
     48        nr = number;
     49        Used = white;
     50        Cyclic = false;
    5151};
    5252bond::bond(atom *left, atom *right)
    5353{
    54   leftatom = left;
    55   rightatom = right;
    56   previous = NULL;
    57   next = NULL;
    58   HydrogenBond = 0;
    59   if ((left != NULL) && (right != NULL)) {
    60     if ((left->type != NULL) && (left->type->Z == 1))
    61       HydrogenBond++;
    62     if ((right->type != NULL) && (right->type->Z == 1))
    63       HydrogenBond++;
    64   }
    65   BondDegree = 1;
    66   nr = 0;
    67   Used = white;
    68   Cyclic = false;
     54        leftatom = left;
     55        rightatom = right;
     56        previous = NULL;
     57        next = NULL;
     58        HydrogenBond = 0;
     59        if ((left != NULL) && (right != NULL)) {
     60                if ((left->type != NULL) && (left->type->Z == 1))
     61                        HydrogenBond++;
     62                if ((right->type != NULL) && (right->type->Z == 1))
     63                        HydrogenBond++;
     64        }
     65        BondDegree = 1;
     66        nr = 0;
     67        Used = white;
     68        Cyclic = false;
    6969};
    7070
     
    7373bond::~bond()
    7474{
    75   // remove this node from the list structure
    76   if (previous != NULL) {
    77     previous->next = next;
    78   }
    79   if (next != NULL) {
    80     next->previous = previous;
    81   }
     75        // remove this node from the list structure
     76        if (previous != NULL) {
     77                previous->next = next;
     78        }
     79        if (next != NULL) {
     80                next->previous = previous;
     81        }
    8282};
    8383
    8484ostream & operator << (ostream &ost, bond &b)
    8585{
    86   ost << "[" << b.leftatom->Name << " <" << b.BondDegree << "(H" << b.HydrogenBond << ")>" << b.rightatom->Name << "]";
    87   return ost;
     86        ost << "[" << b.leftatom->Name << " <" << b.BondDegree << "(H" << b.HydrogenBond << ")>" << b.rightatom->Name << "]";
     87        return ost;
    8888};
    8989
     
    9494atom * bond::GetOtherAtom(atom *Atom) const
    9595{
    96   if(leftatom == Atom)
    97     return rightatom;
    98   if(rightatom == Atom)
    99     return leftatom;
    100   return NULL;
     96        if(leftatom == Atom)
     97                return rightatom;
     98        if(rightatom == Atom)
     99                return leftatom;
     100        return NULL;
    101101};
    102102
     
    107107bond * bond::GetFirstBond()
    108108{
    109   return GetFirst(this);
     109        return GetFirst(this);
    110110};
    111111
     
    116116bond * bond::GetLastBond()
    117117{
    118   return GetLast(this);
     118        return GetLast(this);
    119119};
    120120
     
    124124enum Shading bond::IsUsed()
    125125{
    126   return Used;
     126        return Used;
    127127};
    128128
     
    133133bool bond::Contains(const atom *ptr)
    134134{
    135   return ((leftatom == ptr) || (rightatom == ptr));
     135        return ((leftatom == ptr) || (rightatom == ptr));
    136136};
    137137
     
    142142bool bond::Contains(const int number)
    143143{
    144   return ((leftatom->nr == number) || (rightatom->nr == number));
     144        return ((leftatom->nr == number) || (rightatom->nr == number));
    145145};
    146146
     
    149149 */
    150150bool bond::MarkUsed(enum Shading color) {
    151   if (Used == black) {
    152     cerr << "ERROR: Bond " << this << " was already marked black!." << endl;
    153     return false;
    154   } else {
    155     Used = color;
    156     return true;
    157   }
     151        if (Used == black) {
     152                cerr << "ERROR: Bond " << this << " was already marked black!." << endl;
     153                return false;
     154        } else {
     155                Used = color;
     156                return true;
     157        }
    158158};
    159159
     
    162162 */
    163163void bond::ResetUsed() {
    164   Used = white;
     164        Used = white;
    165165};
Note: See TracChangeset for help on using the changeset viewer.