- Timestamp:
- Apr 6, 2011, 1:50:41 PM (14 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:
- b94634
- Parents:
- 00bb38
- git-author:
- Frederik Heber <heber@…> (04/01/11 22:03:21)
- git-committer:
- Frederik Heber <heber@…> (04/06/11 13:50:41)
- Location:
- src
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Descriptors/MoleculeFormulaDescriptor.cpp
r00bb38 rb88fe4 23 23 #include "MoleculeFormulaDescriptor_impl.hpp" 24 24 25 #include "Formula.hpp" 25 26 #include "molecule.hpp" 26 27 -
src/Descriptors/MoleculeFormulaDescriptor.hpp
r00bb38 rb88fe4 16 16 17 17 #include "Descriptors/MoleculeDescriptor.hpp" 18 #include "Exceptions/FormulaStringParseException.hpp"19 18 20 class Formula; 19 #include "Formula.hpp" 21 20 22 21 MoleculeDescriptor MoleculeByFormula(const Formula&); -
src/Exceptions/Makefile.am
r00bb38 rb88fe4 12 12 MissingValueException.cpp \ 13 13 NotOnSurfaceException.cpp \ 14 ShapeException.cpp \ 15 FormulaStringParseException.cpp 14 ShapeException.cpp 16 15 17 16 … … 20 19 IllegalTypeException.hpp \ 21 20 MissingValueException.hpp \ 22 NotOnSurfaceException.hpp \ 23 FormulaStringParseException.hpp 21 NotOnSurfaceException.hpp 24 22 25 23 -
src/Formula.cpp
r00bb38 rb88fe4 103 103 sub.parseFromString(++it,end,nextdelim); 104 104 if(!sub.getElementCount()){ 105 throw (FormulaStringParseException(__FILE__,__LINE__));105 throw FormulaStringParseException() << FormulaString( string(it, end) ); 106 106 } 107 107 int count = parseMaybeNumber(++it,end); … … 112 112 // Atom names start with a capital letter 113 113 if(!CapitalLetters.isInRange(*it)) 114 throw (FormulaStringParseException(__FILE__,__LINE__));114 throw FormulaStringParseException() << FormulaString( string(it, end) ); 115 115 shorthand+=(*it++); 116 116 // the rest of the name follows … … 120 120 // test if the shorthand exists 121 121 if(!World::getInstance().getPeriode()->FindElement(shorthand)) 122 throw (FormulaStringParseException(__FILE__,__LINE__));122 throw FormulaStringParseException() << FormulaString( string(it, end) ); 123 123 // done, we can get the next one 124 124 addElements(shorthand,count); 125 125 } 126 126 if(it==end && delimiter!=0){ 127 throw (FormulaStringParseException(__FILE__,__LINE__));127 throw FormulaStringParseException() << FormulaString( string(it, end) ); 128 128 } 129 129 } -
src/Formula.hpp
r00bb38 rb88fe4 19 19 #include <iterator> 20 20 21 #include "Exceptions/FormulaStringParseException.hpp"22 23 21 #include "types.hpp" 24 22 25 23 #include "CodePatterns/enumeration.hpp" 26 24 25 #include <exception> 26 #include <boost/exception.hpp> 27 28 /** ============================= Begin of Exceptions ===================== */ 29 30 /** Base class for all exceptions regarding Formula. 31 * 32 */ 33 struct FormulaException : virtual std::exception, virtual boost::exception { }; 34 35 /** Exception information for FormulaException: string. 36 */ 37 typedef boost::error_info<struct tag_FormulaString, const std::string> FormulaString; 38 39 /** Exception thrown when a string cannot be parsed as a formula. 40 */ 41 struct FormulaStringParseException : virtual FormulaException { }; 42 43 /** ============================== end of Exceptions ====================== */ 44 27 45 class element; 28 29 46 30 47 class Formula
Note:
See TracChangeset
for help on using the changeset viewer.