Changeset 1883f9


Ignore:
Timestamp:
Aug 10, 2010, 2:47:43 PM (15 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:
61951b
Parents:
8eca62
Message:

Removed molecule::Center.

  • QTWorldView now more has entry "Center".
  • Center..() all act on the atoms, not on molecule::Center.
Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Views/QT4/QTWorldView.cpp

    r8eca62 r1883f9  
    2020// these attributes are skiped so far
    2121const int QTWorldView::COLUMNCOUNT = COLUMNTYPES_MAX;
    22 const char *QTWorldView::COLUMNNAMES[QTWorldView::COLUMNCOUNT]={"Name","Atoms"/*,"Formula"*/,"Center"/*,"Size"*/};
     22const char *QTWorldView::COLUMNNAMES[QTWorldView::COLUMNCOUNT]={"Name","Atoms"/*,"Formula"*//*,"Size"*/};
    2323
    2424QTWorldView::QTWorldView(QWidget * _parent) :
     
    8181    setItem(i,ATOMS,countWidget);
    8282
    83     const Vector center = (*iter)->Center;
    84     QTableWidgetItem *centerWidget = new QTableWidgetItem();
    85     stringstream centersstr;
    86     centersstr << center;
    87     centerWidget->setText(QString(centersstr.str().c_str()));
    88     setItem(i,CENTER,centerWidget);
    89     centerWidget->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
    90 
    9183    molSelection[i]=nameWidget->isSelected();
    9284  }
  • src/UIElements/Views/QT4/QTWorldView.hpp

    r8eca62 r1883f9  
    2828
    2929  static const int COLUMNCOUNT;
    30   enum {NAME,ATOMS,CENTER,COLUMNTYPES_MAX} COLUMNTYPES;
     30  enum {NAME,ATOMS,COLUMNTYPES_MAX} COLUMNTYPES;
    3131  static const char *COLUMNNAMES[];
    3232
  • src/boundary.cpp

    r8eca62 r1883f9  
    804804  // Center filler at origin
    805805  filler->CenterEdge(&Inserter);
    806   filler->Center.Zero();
    807806  const int FillerCount = filler->getAtomCount();
    808807  DoLog(2) && (Log() << Verbose(2) << "INFO: Filler molecule has the following bonds:" << endl);
  • src/config.cpp

    r8eca62 r1883f9  
    15861586    for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++) {
    15871587      src[N++] = (*ListRunner)->IndexNr;
    1588       (*ListRunner)->Translate(&(*ListRunner)->Center);
    15891588    }
    15901589    mol = World::getInstance().createMolecule();
  • src/molecule.hpp

    r8eca62 r1883f9  
    104104    double BondDistance;  //!< typical bond distance used in CreateAdjacencyList() and furtheron
    105105    bool ActiveFlag;    //!< in a MoleculeListClass used to discern active from inactive molecules
    106     Vector Center;      //!< Center of molecule in a global box
     106    //Vector Center;      //!< Center of molecule in a global box
    107107    int IndexNr;        //!< index of molecule in a MoleculeListClass
    108108    char name[MAXSTRINGSIZE];         //!< arbitrary name
  • src/molecule_geometry.cpp

    r8eca62 r1883f9  
    104104    (*max) += (*min);
    105105    Translate(min);
    106     Center.Zero();
    107106  }
    108107  delete(min);
     
    118117  int Num = 0;
    119118  molecule::const_iterator iter = begin();  // start at first in list
     119  Vector Center;
    120120
    121121  Center.Zero();
    122 
    123122  if (iter != end()) {   //list not empty?
    124123    for (; iter != end(); ++iter) {  // continue with second if present
     
    128127    Center.Scale(-1./(double)Num); // divide through total number (and sign for direction)
    129128    Translate(&Center);
    130     Center.Zero();
    131129  }
    132130};
     
    197195void molecule::CenterPeriodic()
    198196{
    199   DeterminePeriodicCenter(Center);
     197  Vector NewCenter;
     198  DeterminePeriodicCenter(NewCenter);
     199  // go through all atoms
     200  BOOST_FOREACH(atom* iter, atoms){
     201    *iter -= NewCenter;
     202  }
    200203};
    201204
     
    207210void molecule::CenterAtVector(Vector *newcenter)
    208211{
    209   Center = *newcenter;
     212  // go through all atoms
     213  BOOST_FOREACH(atom* iter, atoms){
     214    *iter -= *newcenter;
     215  }
    210216};
    211217
     
    277283  bool flag;
    278284  Vector Testvector, Translationvector;
     285  Vector Center;
    279286
    280287  do {
     
    322329
    323330  Center.Scale(1./static_cast<double>(getAtomCount()));
     331  CenterAtVector(&Center);
    324332};
    325333
  • src/moleculelist.cpp

    r8eca62 r1883f9  
    193193      }
    194194      // Center and size
    195       (*out) << "\t" << (*ListRunner)->Center << "\t" << sqrt(size) << endl;
     195      Vector *Center = (*ListRunner)->DetermineCenterOfAll();
     196      (*out) << "\t" << *Center << "\t" << sqrt(size) << endl;
     197      delete(Center);
    196198    }
    197199  }
     
    309311    // get pointer to src molecule
    310312    molecule *srcmol = ReturnIndex(src[i]);
    311     //srcmol->Center.Zero();
    312     srcmol->Translate(&srcmol->Center);
    313313  }
    314314  // perform a simple multi merge
Note: See TracChangeset for help on using the changeset viewer.