Changeset 34e0592 for src/builder.cpp
- Timestamp:
- Aug 20, 2009, 7:48:07 AM (15 years ago)
- 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:
- 78b73c, 9ba9ee
- Parents:
- 1d9b7aa (diff), 7c14ec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Frederik Heber <heber@…> (08/19/09 14:40:33)
- git-committer:
- Frederik Heber <heber@…> (08/20/09 07:48:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/builder.cpp
r1d9b7aa r34e0592 584 584 LinkedCell LCList(mol, 10.); 585 585 class Tesselation *TesselStruct = NULL; 586 Find _convex_border((ofstream *)&cout, mol, &LCList, NULL);586 FindConvexBorder((ofstream *)&cout, mol, &LCList, NULL); 587 587 double clustervolume = VolumeOfConvexEnvelope((ofstream *)&cout, TesselStruct, configuration); 588 588 cout << Verbose(0) << "The tesselated surface area is " << clustervolume << "." << endl; … … 644 644 Vector x,y,z,n; // coordinates for absolute point in cell volume 645 645 double *factor; // unit factor if desired 646 double bond, min _bond;646 double bond, minBond; 647 647 char choice; // menu choice char 648 648 bool valid; … … 683 683 first = mol->AskAtom("Enter first (fixed) atom: "); 684 684 second = mol->AskAtom("Enter second (shifting) atom: "); 685 min _bond = 0.;685 minBond = 0.; 686 686 for (int i=NDIM;i--;) 687 min _bond += (first->x.x[i]-second->x.x[i])*(first->x.x[i] - second->x.x[i]);688 min _bond = sqrt(min_bond);689 cout << Verbose(0) << "Current Bond length between " << first->type->name << " Atom " << first->nr << " and " << second->type->name << " Atom " << second->nr << ": " << min _bond << " a.u." << endl;687 minBond += (first->x.x[i]-second->x.x[i])*(first->x.x[i] - second->x.x[i]); 688 minBond = sqrt(minBond); 689 cout << Verbose(0) << "Current Bond length between " << first->type->name << " Atom " << first->nr << " and " << second->type->name << " Atom " << second->nr << ": " << minBond << " a.u." << endl; 690 690 cout << Verbose(0) << "Enter new bond length [a.u.]: "; 691 691 cin >> bond; 692 692 for (int i=NDIM;i--;) { 693 second->x.x[i] -= (second->x.x[i]-first->x.x[i])/min _bond*(min_bond-bond);693 second->x.x[i] -= (second->x.x[i]-first->x.x[i])/minBond*(minBond-bond); 694 694 } 695 695 //cout << Verbose(0) << "New coordinates of Atom " << second->nr << " are: "; … … 1325 1325 int j; 1326 1326 double volume = 0.; 1327 enum ConfigStatus config _present = absent;1327 enum ConfigStatus configPresent = absent; 1328 1328 clock_t start,end; 1329 1329 int argptr; … … 1425 1425 if (output == NULL) { 1426 1426 cout << Verbose(1) << "Specified config file " << argv[1] << " not found." << endl; 1427 config _present = absent;1427 configPresent = absent; 1428 1428 } else { 1429 1429 cout << "Empty configuration file." << endl; 1430 1430 ConfigFileName = argv[1]; 1431 config _present = empty;1431 configPresent = empty; 1432 1432 output.close(); 1433 1433 } … … 1440 1440 cout << "new syntax." << endl; 1441 1441 configuration.Load(ConfigFileName, periode, mol); 1442 config _present = present;1442 configPresent = present; 1443 1443 break; 1444 1444 case 0: 1445 1445 cout << "old syntax." << endl; 1446 1446 configuration.LoadOld(ConfigFileName, periode, mol); 1447 config _present = present;1447 configPresent = present; 1448 1448 break; 1449 1449 default: 1450 1450 cout << "Unknown syntax or empty, yet present file." << endl; 1451 config _present = empty;1451 configPresent = empty; 1452 1452 } 1453 1453 } 1454 1454 } else 1455 config _present = absent;1455 configPresent = absent; 1456 1456 // 4. parse again through options, now for those depending on elements db and config presence 1457 1457 argptr = 1; … … 1460 1460 if (argv[argptr][0] == '-') { 1461 1461 argptr++; 1462 if ((config _present == present) || (config_present == empty)) {1462 if ((configPresent == present) || (configPresent == empty)) { 1463 1463 switch(argv[argptr-1][1]) { 1464 1464 case 'p': … … 1474 1474 else { 1475 1475 cout << Verbose(2) << "File found and parsed." << endl; 1476 config _present = present;1476 configPresent = present; 1477 1477 } 1478 1478 } … … 1494 1494 if (first->type != NULL) { 1495 1495 mol->AddAtom(first); // add to molecule 1496 if ((config _present == empty) && (mol->AtomCount != 0))1497 config _present = present;1496 if ((configPresent == empty) && (mol->AtomCount != 0)) 1497 configPresent = present; 1498 1498 } else 1499 1499 cerr << Verbose(1) << "Could not find the specified element." << endl; … … 1505 1505 } 1506 1506 } 1507 if (config _present == present) {1507 if (configPresent == present) { 1508 1508 switch(argv[argptr-1][1]) { 1509 1509 case 'M': … … 1627 1627 start = clock(); 1628 1628 LinkedCell LCList(mol, atof(argv[argptr])*2.); 1629 Find _non_convex_border((ofstream *)&cout, mol, &LCList, argv[argptr+1], atof(argv[argptr]));1629 FindNonConvexBorder((ofstream *)&cout, mol, &LCList, argv[argptr+1], atof(argv[argptr])); 1630 1630 //FindDistributionOfEllipsoids((ofstream *)&cout, &T, &LCList, N, number, filename.c_str()); 1631 1631 end = clock(); … … 1871 1871 cout << Verbose(1) << "Storing tecplot data in " << argv[argptr] << "." << endl; 1872 1872 LinkedCell LCList(mol, 10.); 1873 //Find _convex_border((ofstream *)&cout, mol, &LCList, argv[argptr]);1874 Find _non_convex_border((ofstream *)&cout, mol, &LCList, argv[argptr], 10.);1873 //FindConvexBorder((ofstream *)&cout, mol, &LCList, argv[argptr]); 1874 FindNonConvexBorder((ofstream *)&cout, mol, &LCList, argv[argptr], 10.); 1875 1875 1876 1876 double volumedifference = ConvexizeNonconvexEnvelope((ofstream *)&cout, mol->TesselStruct, mol, argv[argptr]);
Note:
See TracChangeset
for help on using the changeset viewer.