Changeset cc2ee5 for src/builder.cpp
- Timestamp:
- Dec 29, 2008, 9:46:58 PM (16 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:
- a98603
- Parents:
- 02bfde
- git-author:
- Frederik Heber <heber@…> (12/29/08 21:26:43)
- git-committer:
- Frederik Heber <heber@…> (12/29/08 21:46:58)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/builder.cpp
-
Property mode
changed from
100644
to100755
r02bfde rcc2ee5 259 259 static void CenterAtoms(molecule *mol) 260 260 { 261 Vector x, y ;261 Vector x, y, helper; 262 262 char choice; // menu choice char 263 263 … … 292 292 mol->CenterEdge((ofstream *)&cout, &x); // make every coordinate positive 293 293 mol->Translate(&y); // translate by boundary 294 mol->SetBoxDimension(&(x+y*2)); // update Box of atoms by boundary 294 helper.CopyVector(&y); 295 helper.Scale(2.); 296 helper.AddVector(&x); 297 mol->SetBoxDimension(&helper); // update Box of atoms by boundary 295 298 break; 296 299 case 'd': … … 1004 1007 } 1005 1008 break; 1006 1007 1008 if ((argptr >= argc) || (argv[argptr][0] == '-')){1009 1010 1011 } 1012 else{ 1013 cout << "Parsing bonds from " << argv[argptr] << "." << endl;1014 ifstream *input = new ifstream(argv[argptr]);1015 mol->CreateAdjacencyList2((ofstream *)&cout, input);1016 input->close(); 1017 } 1018 break; 1019 case 'N': 1020 ExitFlag = 1; 1021 if ((argptr >= argc) || (argv[argptr][0] == '-')){ 1022 ExitFlag = 255;1023 cerr << "Not enough or invalid arguments given for non-convex envelope: -o <tecplot output file>" << endl; 1024 } 1025 else { 1026 cout << Verbose(0) << "Evaluating npn-convex envelope.";1027 ofstream *output = new ofstream(argv[argptr], ios::trunc);1028 cout << Verbose(1) << "Storing tecplot data in " << argv[argptr] << "." << endl;1029 Find_non_convex_border((ofstream *)&cout, output, mol);1030 1031 1032 argptr+=1;1033 1034 1009 case 'A': 1010 ExitFlag = 1; 1011 if ((argptr >= argc) || (!IsValidNumber(argv[argptr])) || (argv[argptr][0] == '-')) { 1012 ExitFlag =255; 1013 cerr << "Missing source file for bonds in molecule: -A <bond sourcefile>" << endl; 1014 } else { 1015 cout << "Parsing bonds from " << argv[argptr] << "." << endl; 1016 ifstream *input = new ifstream(argv[argptr]); 1017 mol->CreateAdjacencyList2((ofstream *)&cout, input); 1018 input->close(); 1019 } 1020 break; 1021 case 'N': 1022 ExitFlag = 1; 1023 if ((argptr+1 >= argc) || (argv[argptr+1][0] == '-')){ 1024 ExitFlag = 255; 1025 cerr << "Not enough or invalid arguments given for non-convex envelope: -o <radius> <tecplot output file>" << endl; 1026 } else { 1027 cout << Verbose(0) << "Evaluating npn-convex envelope."; 1028 string TempName(argv[argptr+1]); 1029 TempName.append(".r3d"); 1030 ofstream *output = new ofstream(TempName.c_str(), ios::trunc); 1031 cout << Verbose(1) << "Using rolling ball of radius " << atof(argv[argptr]) << " and storing tecplot data in " << argv[argptr+1] << "." << endl; 1032 Find_non_convex_border((ofstream *)&cout, output, mol, argv[argptr+1], atof(argv[argptr])); 1033 output->close(); 1034 delete(output); 1035 argptr+=2; 1036 } 1037 break; 1035 1038 case 'T': 1036 1039 ExitFlag = 1; -
Property mode
changed from
Note:
See TracChangeset
for help on using the changeset viewer.