- Timestamp:
- Mar 3, 2010, 2:53:07 PM (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:
- 6e8dc2, b72091
- Parents:
- a837d0
- git-author:
- Frederik Heber <heber@…> (03/03/10 14:46:13)
- git-committer:
- Frederik Heber <heber@…> (03/03/10 14:53:07)
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/World.cpp
ra837d0 r046783 6 6 */ 7 7 8 #include <string> 9 8 10 #include "World.hpp" 9 11 10 12 double *World::cell_size = 0; 13 char *World::DefaultName = 0; 11 14 12 15 /** Constructor of World. … … 16 19 { 17 20 cell_size = new double[6]; 21 DefaultName = new char[6]; 22 strncpy(DefaultName, "none", 4); 18 23 }; 19 24 … … 24 29 { 25 30 delete[](cell_size); 31 delete[](DefaultName); 26 32 }; 27 33 -
src/World.hpp
ra837d0 r046783 32 32 33 33 static double *cell_size; 34 static char *DefaultName; 34 35 35 36 private: -
src/builder.cpp
ra837d0 r046783 1480 1480 Log() << Verbose(0) << "\t-v\t\tsets verbosity (more is more)." << endl; 1481 1481 Log() << Verbose(0) << "\t-V\t\tGives version information." << endl; 1482 Log() << Verbose(0) << "\t-X\t\tset default name of a molecule." << endl; 1482 1483 Log() << Verbose(0) << "Note: config files must not begin with '-' !" << endl; 1483 1484 return (1); … … 1518 1519 Log() << Verbose(0) << "I won't parse trajectories." << endl; 1519 1520 configuration.FastParsing = true; 1521 break; 1522 case 'X': 1523 { 1524 char **name = &(World::get()->DefaultName); 1525 delete[](*name); 1526 const int length = strlen(argv[argptr]); 1527 *name = new char[length+2]; 1528 strncpy(*name, argv[argptr], length); 1529 Log() << Verbose(0) << "Default name of new molecules set to " << *name << "." << endl; 1530 } 1520 1531 break; 1521 1532 default: // no match? Step on … … 1709 1720 } 1710 1721 } 1711 if ( mol == NULL) {1722 if ((mol == NULL) && (!molecules->ListOfMolecules.empty())) { 1712 1723 mol = *(molecules->ListOfMolecules.begin()); 1713 mol->ActiveFlag = true; 1724 if (mol != NULL) 1725 mol->ActiveFlag = true; 1714 1726 } 1715 1727 break; -
src/molecule.cpp
ra837d0 r046783 46 46 for(int i=MAX_ELEMENTS;i--;) 47 47 ElementsInMolecule[i] = 0; 48 strcpy(name, "none");48 strcpy(name,World::get()->DefaultName); 49 49 }; 50 50 -
src/molecule_graph.cpp
ra837d0 r046783 495 495 bond *Binder = NULL; 496 496 497 if (AtomCount == 0) 498 return SubGraphs; 497 499 Log() << Verbose(0) << "Begin of DepthFirstSearchAnalysis" << endl; 498 500 DepthFirstSearchAnalysis_Init(DFS, this); -
src/moleculelist.cpp
ra837d0 r046783 786 786 787 787 // 1. dissect the molecule into connected subgraphs 788 configuration->BG->ConstructBondGraph(mol); 788 if (configuration->BG->ConstructBondGraph(mol)) { 789 delete (mol); 790 eLog() << Verbose(1) << "There are no bonds." << endl; 791 return; 792 } 789 793 790 794 // 2. scan for connected subgraphs … … 793 797 Subgraphs = mol->DepthFirstSearchAnalysis(BackEdgeStack); 794 798 delete(BackEdgeStack); 799 if ((Subgraphs == NULL) || (Subgraphs->next == NULL)) { 800 delete (mol); 801 eLog() << Verbose(1) << "There are no atoms." << endl; 802 return; 803 } 795 804 796 805 // 3. dissect (the following construct is needed to have the atoms not in the order of the DFS, but in
Note:
See TracChangeset
for help on using the changeset viewer.