Changeset 437922 for src/bond.cpp


Ignore:
Timestamp:
Jul 23, 2009, 12:14:13 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
d067d45
Parents:
178f92
Message:

Fix indentation from tab to two spaces.

The trouble was caused at the merge e08f45e4539ffcc30e039dec5606cf06b45ab6be. Seemingly, I thought eclipse had pulled some shit which i didn't

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/bond.cpp

    r178f92 r437922  
    1414bond::bond()
    1515{
    16         leftatom = NULL;
    17         rightatom = NULL;
    18         previous = NULL;
    19         next = NULL;
    20         nr = -1;
    21         HydrogenBond = 0;
    22         BondDegree = 0;
    23         Used = white;
    24         Cyclic = false;
    25         Type = Undetermined;
     16  leftatom = NULL;
     17  rightatom = NULL;
     18  previous = NULL;
     19  next = NULL;
     20  nr = -1;
     21  HydrogenBond = 0;
     22  BondDegree = 0;
     23  Used = white;
     24  Cyclic = false;
     25  Type = Undetermined;
    2626};
    2727
     
    3434bond::bond(atom *left, atom *right, int degree=1, int number=0)
    3535{
    36         leftatom = left;
    37         rightatom = right;
    38         previous = NULL;
    39         next = NULL;
    40         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;
     36  leftatom = left;
     37  rightatom = right;
     38  previous = NULL;
     39  next = NULL;
     40  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;
    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.