Changeset e9b8bb for src/molecules.cpp


Ignore:
Timestamp:
Aug 6, 2008, 9:02:01 AM (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:
5e0d1f
Parents:
d7e30c
Message:

Rename of class vector to Vector to avoid conflict with vector from STL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecules.cpp

    rd7e30c re9b8bb  
    1818  double sum = 0.;
    1919  struct LSQ_params *par = (struct LSQ_params *)params;
    20   vector **vectors = par->vectors;
     20  Vector **vectors = par->vectors;
    2121  int num = par->num;
    2222
     
    180180  atom *FirstOtherAtom = NULL, *SecondOtherAtom = NULL, *ThirdOtherAtom = NULL; // pointer to hydrogen atoms to be added
    181181  double b,l,d,f,g, alpha, factors[NDIM];    // hold temporary values in triple bond case for coordination determination
    182   vector Orthovector1, Orthovector2;  // temporary vectors in coordination construction
    183   vector InBondvector;    // vector in direction of *Bond
     182  Vector Orthovector1, Orthovector2;  // temporary vectors in coordination construction
     183  Vector InBondvector;    // vector in direction of *Bond
    184184  bond *Binder = NULL;
    185185  double *matrix;
     
    587587 * \param *dim vector class
    588588 */
    589 void molecule::SetBoxDimension(vector *dim)
     589void molecule::SetBoxDimension(Vector *dim)
    590590{
    591591  cell_size[0] = dim->x[0];
     
    601601 * \param *BoxLengths box lengths
    602602 */
    603 bool molecule::CenterInBox(ofstream *out, vector *BoxLengths)
     603bool molecule::CenterInBox(ofstream *out, Vector *BoxLengths)
    604604{
    605605  bool status = true;
    606606  atom *ptr = NULL;
    607   vector *min = new vector;
    608   vector *max = new vector;
     607  Vector *min = new Vector;
     608  Vector *max = new Vector;
    609609 
    610610  // gather min and max for each axis
     
    651651 * \param *max coordinates of other edge, specifying box dimensions.
    652652 */
    653 void molecule::CenterEdge(ofstream *out, vector *max)
    654 {
    655   vector *min = new vector;
     653void molecule::CenterEdge(ofstream *out, Vector *max)
     654{
     655  Vector *min = new Vector;
    656656 
    657657//  *out << Verbose(3) << "Begin of CenterEdge." << endl;
     
    690690 * \param *center return vector for translation vector
    691691 */
    692 void molecule::CenterOrigin(ofstream *out, vector *center)
     692void molecule::CenterOrigin(ofstream *out, Vector *center)
    693693{
    694694  int Num = 0;
     
    713713 * \return pointer to center of gravity vector
    714714 */
    715 vector * molecule::DetermineCenterOfGravity(ofstream *out)
     715Vector * molecule::DetermineCenterOfGravity(ofstream *out)
    716716{
    717717        atom *ptr = start->next;  // start at first in list
    718         vector *a = new vector();
    719         vector tmp;
     718        Vector *a = new Vector();
     719        Vector tmp;
    720720  double Num = 0;
    721721       
     
    742742 * \param *center return vector for translation vector
    743743 */
    744 void molecule::CenterGravity(ofstream *out, vector *center)
     744void molecule::CenterGravity(ofstream *out, Vector *center)
    745745{
    746746  if (center == NULL) {
     
    769769 * \param trans[] translation vector.
    770770 */
    771 void molecule::Translate(const vector *trans)
     771void molecule::Translate(const Vector *trans)
    772772{
    773773  atom *ptr = start;
     
    782782 * \param n[] normal vector of mirror plane.
    783783 */
    784 void molecule::Mirror(const vector *n)
     784void molecule::Mirror(const Vector *n)
    785785{
    786786  atom *ptr = start;
     
    795795 * \param Center reference to return vector
    796796 */
    797 void molecule::DetermineCenter(vector &Center)
     797void molecule::DetermineCenter(Vector &Center)
    798798{
    799799  atom *Walker = start;
     
    802802  double tmp;
    803803  bool flag;
    804   vector Testvector, Translationvector;
     804  Vector Testvector, Translationvector;
    805805 
    806806  do {
     
    867867        atom *ptr = start;  // start at first in list
    868868        double InertiaTensor[NDIM*NDIM];
    869         vector *CenterOfGravity = DetermineCenterOfGravity(out);
     869        Vector *CenterOfGravity = DetermineCenterOfGravity(out);
    870870
    871871        CenterGravity(out, CenterOfGravity);
     
    878878        while (ptr->next != end) {
    879879                ptr = ptr->next;
    880                 vector x;
     880                Vector x;
    881881                x.CopyVector(&ptr->x);
    882882                //x.SubtractVector(CenterOfGravity);
     
    934934    while (ptr->next != end) {
    935935      ptr = ptr->next;
    936       vector x;
     936      Vector x;
    937937      x.CopyVector(&ptr->x);
    938938      //x.SubtractVector(CenterOfGravity);
     
    10601060 * \param n[] alignment vector.
    10611061 */
    1062 void molecule::Align(vector *n)
     1062void molecule::Align(Vector *n)
    10631063{
    10641064  atom *ptr = start;
    10651065  double alpha, tmp;
    1066   vector z_axis;
     1066  Vector z_axis;
    10671067  z_axis.x[0] = 0.;
    10681068  z_axis.x[1] = 0.;
     
    11681168 * \return true - is within, false - out of cell
    11691169 */
    1170 bool molecule::CheckBounds(const vector *x) const
     1170bool molecule::CheckBounds(const Vector *x) const
    11711171{
    11721172  bool result = true;
     
    11881188{
    11891189  double res = 0, t;
    1190   vector a,b,c,d;
     1190  Vector a,b,c,d;
    11911191  struct lsq_params *par = (struct lsq_params *)params;
    11921192  atom *ptr = par->mol->start;
     
    12091209      d.Scale(&t);
    12101210      c.SubtractVector(&d);   // ... yielding distance vector
    1211       res += d.ScalarProduct((const vector *)&d);        // add squared distance
     1211      res += d.ScalarProduct((const Vector *)&d);        // add squared distance
    12121212    }
    12131213  }
     
    15421542  double distance, MinDistance, MaxDistance;
    15431543  double *matrix = ReturnFullMatrixforSymmetric(cell_size);
    1544   vector x;
     1544  Vector x;
    15451545 
    15461546  BondDistance = bonddistance; // * ((IsAngstroem) ? 1. : 1./AtomicLengthToAngstroem);
     
    39253925  enum Shading *ColorList = NULL;
    39263926  double tmp;
    3927   vector Translationvector;
     3927  Vector Translationvector;
    39283928  //class StackClass<atom *> *CompStack = NULL;
    39293929  class StackClass<atom *> *AtomStack = new StackClass<atom *>(AtomCount);
     
    43264326  int flag;
    43274327  double *Distances = NULL, *OtherDistances = NULL;
    4328   vector CenterOfGravity, OtherCenterOfGravity;
     4328  Vector CenterOfGravity, OtherCenterOfGravity;
    43294329  size_t *PermMap = NULL, *OtherPermMap = NULL;
    43304330  int *PermutationMap = NULL;
Note: See TracChangeset for help on using the changeset viewer.