Changes in / [a7b761b:1024cb]
- Files:
-
- 213 added
- 35 deleted
- 75 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
ra7b761b r1024cb 28 28 # Boost libraries 29 29 AX_BOOST_BASE([1.33.1]) 30 #AX_BOOST_PROGRAM_OPTIONS30 AX_BOOST_PROGRAM_OPTIONS 31 31 #AX_BOOST_FOREACH 32 32 #AX_BOOST_FILESYSTEM … … 93 93 94 94 # test suite 95 AC_CONFIG_TESTDIR(tests) 96 AC_CONFIG_FILES([tests/atlocal tests/Makefile]) 97 AC_CONFIG_FILES([tests/Tesselations/Makefile tests/Tesselations/defs]) 98 AC_CONFIG_FILES([tests/molecuilder], [chmod +x tests/molecuilder]) 99 AC_CONFIG_FILES([doc/molecuilder.xml]) 100 AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile src/unittests/Makefile]) 95 AC_CONFIG_TESTDIR(tests/regression) 96 AC_CONFIG_FILES([ 97 tests/Makefile 98 tests/regression/atlocal 99 tests/regression/Makefile]) 100 AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder]) 101 AC_CONFIG_FILES([ 102 tests/Tesselations/Makefile 103 tests/Tesselations/defs]) 104 AC_CONFIG_FILES([ 105 doc/molecuilder.xml]) 106 AC_CONFIG_FILES([ 107 Makefile 108 doc/Makefile 109 src/Makefile 110 src/Actions/Makefile 111 src/UIElements/Makefile 112 src/unittests/Makefile]) 101 113 AC_OUTPUT -
src/Actions/ActionRegistry.cpp
ra7b761b r1024cb 43 43 } 44 44 45 void ActionRegistry::unregisterAction(Action* action){ 46 actionMap.erase(action->getName()); 47 } 48 49 std::map<const std::string,Action*>::iterator ActionRegistry::getBeginIter() 50 { 51 return actionMap.begin(); 52 } 53 54 std::map<const std::string,Action*>::iterator ActionRegistry::getEndIter() 55 { 56 return actionMap.end(); 57 } 58 45 59 CONSTRUCT_SINGLETON(ActionRegistry) -
src/Actions/ActionRegistry.hpp
ra7b761b r1024cb 22 22 Action* getActionByName(const std::string); 23 23 void registerAction(Action*); 24 void unregisterAction(Action*); 25 26 std::map<const std::string,Action*>::iterator getBeginIter(); 27 std::map<const std::string,Action*>::iterator getEndIter(); 24 28 25 29 private: -
src/Legacy/oldmenu.cpp
ra7b761b r1024cb 35 35 #include "Menu/DisplayMenuItem.hpp" 36 36 #include "Menu/SubMenuItem.hpp" 37 #include "Actions/MapOfActions.hpp" 37 38 #include "Actions/MethodAction.hpp" 38 39 #include "Actions/ErrorAction.hpp" … … 900 901 molecule *srcmol = NULL, *destmol = NULL; 901 902 Dialog *dialog = UIFactory::getInstance().makeDialog(); 902 dialog->queryMolecule(" Enter index of destination molecule: ",&destmol, molecules);903 dialog->queryMolecule(" Enter index of source molecule to add from: ",&srcmol, molecules);903 dialog->queryMolecule("molecule-by-id",&destmol, MapOfActions::getInstance().getDescription("molecule-by-id")); 904 dialog->queryMolecule("molecule-by-id",&srcmol, MapOfActions::getInstance().getDescription("molecule-by-id")); 904 905 if(dialog->display()) { 905 906 molecules->SimpleAdd(srcmol, destmol); … … 914 915 molecule *srcmol = NULL, *destmol = NULL; 915 916 Dialog *dialog = UIFactory::getInstance().makeDialog(); 916 dialog->queryMolecule(" Enter index of matrix molecule (the variable one): ",&srcmol,molecules);917 dialog->queryMolecule(" Enter index of molecule to merge into (the fixed one): ",&destmol,molecules);917 dialog->queryMolecule("molecule-by-id",&destmol, MapOfActions::getInstance().getDescription("molecule-by-id")); 918 dialog->queryMolecule("molecule-by-id",&srcmol, MapOfActions::getInstance().getDescription("molecule-by-id")); 918 919 if(dialog->display()) { 919 920 molecules->EmbedMerge(destmol, srcmol); -
src/Makefile.am
ra7b761b r1024cb 1 # PLEASE adhere to the alphabetical ordering in this Makefile! 2 # Also indentation by a single tab 3 4 SUBDIRS = Actions UIElements 5 1 6 # this includes source files that need to be present at multiple points 2 HELPERSOURCE = Helpers/Assert.cpp \ 3 Helpers/MemDebug.cpp 7 HELPERSOURCE = \ 8 Helpers/Assert.cpp \ 9 Helpers/MemDebug.cpp 4 10 5 ATOMSOURCE = atom.cpp atom_atominfo.cpp atom_bondedparticle.cpp atom_bondedparticleinfo.cpp atom_graphnode.cpp atom_graphnodeinfo.cpp atom_particleinfo.cpp atom_trajectoryparticle.cpp atom_trajectoryparticleinfo.cpp 6 ATOMHEADER = atom.hpp atom_atominfo.hpp atom_bondedparticle.hpp atom_bondedparticleinfo.hpp atom_graphnode.hpp atom_graphnodeinfo.hpp atom_particleinfo.hpp atom_trajectoryparticle.hpp atom_trajectoryparticleinfo.hpp 7 8 LINALGSOURCE = ${HELPERSOURCE} \ 9 gslmatrix.cpp \ 10 gslvector.cpp \ 11 linearsystemofequations.cpp \ 12 Space.cpp \ 13 vector.cpp 11 ATOMSOURCE = \ 12 atom.cpp \ 13 atom_atominfo.cpp \ 14 atom_bondedparticle.cpp \ 15 atom_bondedparticleinfo.cpp \ 16 atom_graphnode.cpp \ 17 atom_graphnodeinfo.cpp \ 18 atom_particleinfo.cpp \ 19 atom_trajectoryparticle.cpp \ 20 atom_trajectoryparticleinfo.cpp 21 ATOMHEADER = \ 22 atom.hpp \ 23 atom_atominfo.hpp \ 24 atom_bondedparticle.hpp \ 25 atom_bondedparticleinfo.hpp \ 26 atom_graphnode.hpp \ 27 atom_graphnodeinfo.hpp \ 28 atom_particleinfo.hpp \ 29 atom_trajectoryparticle.hpp \ 30 atom_trajectoryparticleinfo.hpp 31 32 LINALGSOURCE = \ 33 ${HELPERSOURCE} \ 34 gslmatrix.cpp \ 35 gslvector.cpp \ 36 linearsystemofequations.cpp \ 37 Space.cpp \ 38 vector.cpp 14 39 15 40 LINALGHEADER = gslmatrix.hpp \ 16 17 18 19 41 gslvector.hpp \ 42 linearsystemofequations.hpp \ 43 Space.hpp \ 44 vector.hpp 20 45 21 22 ANALYSISSOURCE = analysis_bonds.cpp analysis_correlation.cpp 23 ANALYSISHEADER = analysis_bonds.hpp analysis_correlation.hpp 24 25 ACTIONSSOURCE = Actions/Action.cpp \ 26 Actions/ActionHistory.cpp \ 27 Actions/ActionRegistry.cpp \ 28 Actions/ActionSequence.cpp \ 29 Actions/ErrorAction.cpp \ 30 Actions/MakroAction.cpp \ 31 Actions/ManipulateAtomsProcess.cpp \ 32 Actions/MethodAction.cpp \ 33 Actions/Process.cpp \ 34 Actions/small_actions.cpp 35 36 37 ACTIONSHEADER = Actions/Action.hpp \ 38 Actions/ActionHistory.hpp \ 39 Actions/ActionRegistry.hpp \ 40 Actions/ActionSequence.hpp \ 41 Actions/Calculation.hpp \ 42 Actions/Calculation_impl.hpp \ 43 Actions/ErrorAction.hpp \ 44 Actions/MakroAction.hpp \ 45 Actions/ManipulateAtomsProcess.hpp \ 46 Actions/MethodAction.hpp \ 47 Actions/Process.hpp \ 48 Actions/small_actions.hpp 49 50 51 52 PATTERNSOURCE = Patterns/Observer.cpp 53 PATTERNHEADER = Patterns/Cacheable.hpp \ 54 Patterns/Observer.hpp \ 55 Patterns/Singleton.hpp 56 57 VIEWSOURCE = Views/View.cpp Views/StringView.cpp Views/MethodStringView.cpp Views/StreamStringView.cpp 58 VIEWHEADER = Views/View.hpp Views/StringView.hpp Views/MethodStringView.hpp Views/StreamStringView.hpp 59 60 MENUSOURCE = Menu/Menu.cpp Menu/TextMenu.cpp Menu/MenuItem.cpp Menu/SubMenuItem.cpp Menu/ActionMenuItem.cpp Menu/SeperatorItem.cpp Menu/DisplayMenuItem.cpp 61 MENUHEADER = Menu/Menu.hpp Menu/TextMenu.hpp Menu/MenuItem.hpp Menu/SubMenuItem.hpp Menu/ActionMenuItem.hpp Menu/SeperatorItem.hpp Menu/DisplayMenuItem.hpp 62 63 UISOURCE = ${ACTIONSSOURCE} ${VIEWSOURCE} ${MENUSOURCE} UIElements/UIFactory.cpp UIElements/TextUIFactory.cpp UIElements/MainWindow.cpp UIElements/TextWindow.cpp UIElements/TextStatusIndicator.cpp UIElements/Dialog.cpp UIElements/TextDialog.cpp 64 UIHEADER = ${ACTIONSHEADER} ${VIEWHEADER} ${MENUHEADER} UIElements/UIFactory.hpp UIElements/TextUIFactory.hpp UIElements/MainWindow.hpp UIElements/TextWindow.hpp UIElements/TextStatusIndicator.hpp UIElements/Dialog.hpp UIElements/TextDialog.hpp 46 ANALYSISSOURCE = \ 47 analysis_bonds.cpp \ 48 analysis_correlation.cpp 49 ANALYSISHEADER = \ 50 analysis_bonds.hpp \ 51 analysis_correlation.hpp 52 53 ACTIONSSOURCE = \ 54 Actions/Action.cpp \ 55 Actions/ActionHistory.cpp \ 56 Actions/ActionRegistry.cpp \ 57 Actions/ActionSequence.cpp \ 58 Actions/ErrorAction.cpp \ 59 Actions/MakroAction.cpp \ 60 Actions/ManipulateAtomsProcess.cpp \ 61 Actions/MethodAction.cpp \ 62 Actions/Process.cpp 63 64 ACTIONSHEADER = \ 65 ${ANALYSISACTIONHEADER} \ 66 ${ATOMACTIONHEADER} \ 67 ${CMDACTIONHEADER} \ 68 ${FRAGMENTATIONACTIONHEADER} \ 69 ${MOLECULEACTIONHEADER} \ 70 ${PARSERACTIONHEADER} \ 71 ${TESSELATIONACTIONHEADER} \ 72 ${WORLDACTIONHEADER} \ 73 Actions/Action.hpp \ 74 Actions/ActionHistory.hpp \ 75 Actions/ActionRegistry.hpp \ 76 Actions/ActionSequence.hpp \ 77 Actions/Calculation.hpp \ 78 Actions/Calculation_impl.hpp \ 79 Actions/ErrorAction.hpp \ 80 Actions/MakroAction.hpp \ 81 Actions/ManipulateAtomsProcess.hpp \ 82 Actions/MapOfActions.hpp \ 83 Actions/MethodAction.hpp \ 84 Actions/Process.hpp 85 86 87 PARSERSOURCE = \ 88 Parser/ChangeTracker.cpp \ 89 Parser/FormatParser.cpp \ 90 Parser/TremoloParser.cpp \ 91 Parser/XyzParser.cpp 92 PARSERHEADER = \ 93 Parser/ChangeTracker.hpp \ 94 Parser/FormatParser.hpp \ 95 Parser/TremoloParser.hpp \ 96 Parser/XyzParser.hpp 97 98 PATTERNSOURCE = \ 99 Patterns/Observer.cpp 100 PATTERNHEADER = \ 101 Patterns/Cacheable.hpp \ 102 Patterns/Observer.hpp \ 103 Patterns/Singleton.hpp 65 104 66 105 # all these files are only used for legacy reasons while the transition is in progress … … 71 110 72 111 DESCRIPTORSOURCE = Descriptors/AtomDescriptor.cpp \ 73 74 75 76 112 Descriptors/AtomIdDescriptor.cpp \ 113 Descriptors/AtomTypeDescriptor.cpp \ 114 Descriptors/MoleculeDescriptor.cpp \ 115 Descriptors/MoleculeIdDescriptor.cpp 77 116 78 117 79 118 DESCRIPTORHEADER = Descriptors/AtomDescriptor.hpp \ 80 81 82 83 119 Descriptors/AtomIdDescriptor.hpp \ 120 Descriptors/AtomTypeDescriptor.hpp \ 121 Descriptors/MoleculeDescriptor.hpp \ 122 Descriptors/MoleculeIdDescriptor.hpp 84 123 85 86 87 124 EXCEPTIONSOURCE = Exceptions/CustomException.cpp \ 88 89 90 125 Exceptions/LinearDependenceException.cpp \ 126 Exceptions/MathException.cpp \ 127 Exceptions/ZeroVectorException.cpp 91 128 92 129 EXCEPTIONHEADER = Exceptions/CustomException.hpp \ 93 Exceptions/LinearDependenceException.hpp \ 94 Exceptions/MathException.hpp \ 95 Exceptions/ZeroVectorException.hpp 96 97 98 SOURCE = ${ANALYSISSOURCE} \ 99 ${ATOMSOURCE} \ 100 ${PATTERNSOURCE} \ 101 ${UISOURCE} \ 102 ${DESCRIPTORSOURCE} \ 103 ${HELPERSOURCE} \ 104 ${LEGACYSOURCE} \ 105 ${EXCEPTIONSOURCE} \ 106 bond.cpp \ 107 bondgraph.cpp \ 108 boundary.cpp \ 109 config.cpp \ 110 element.cpp \ 111 ellipsoid.cpp \ 112 errorlogger.cpp \ 113 graph.cpp \ 114 helpers.cpp \ 115 Helpers/Assert.cpp \ 116 info.cpp \ 117 leastsquaremin.cpp \ 118 Line.cpp \ 119 linkedcell.cpp \ 120 log.cpp \ 121 logger.cpp \ 122 memoryusageobserver.cpp \ 123 moleculelist.cpp \ 124 molecule.cpp \ 125 molecule_dynamics.cpp \ 126 molecule_fragmentation.cpp \ 127 molecule_geometry.cpp \ 128 molecule_graph.cpp \ 129 molecule_pointcloud.cpp \ 130 parser.cpp \ 131 periodentafel.cpp \ 132 Plane.cpp \ 133 tesselation.cpp \ 134 tesselationhelpers.cpp \ 135 triangleintersectionlist.cpp \ 136 vector.cpp \ 137 verbose.cpp \ 138 vector_ops.cpp \ 139 World.cpp 130 Exceptions/LinearDependenceException.hpp \ 131 Exceptions/MathException.hpp \ 132 Exceptions/ZeroVectorException.hpp 133 134 SOURCE = \ 135 ${ANALYSISSOURCE} \ 136 ${ACTIONSSOURCE} \ 137 ${ATOMSOURCE} \ 138 ${PATTERNSOURCE} \ 139 ${PARSERSOURCE} \ 140 ${DESCRIPTORSOURCE} \ 141 ${HELPERSOURCE} \ 142 ${LEGACYSOURCE} \ 143 ${EXCEPTIONSOURCE} \ 144 bond.cpp \ 145 bondgraph.cpp \ 146 boundary.cpp \ 147 CommandLineParser.cpp \ 148 config.cpp \ 149 element.cpp \ 150 elements_db.cpp \ 151 ellipsoid.cpp \ 152 errorlogger.cpp \ 153 graph.cpp \ 154 helpers.cpp \ 155 info.cpp \ 156 leastsquaremin.cpp \ 157 Line.cpp \ 158 linkedcell.cpp \ 159 log.cpp \ 160 logger.cpp \ 161 moleculelist.cpp \ 162 molecule.cpp \ 163 molecule_dynamics.cpp \ 164 molecule_fragmentation.cpp \ 165 molecule_geometry.cpp \ 166 molecule_graph.cpp \ 167 molecule_pointcloud.cpp \ 168 parser.cpp \ 169 periodentafel.cpp \ 170 Plane.cpp \ 171 Space.cpp \ 172 tesselation.cpp \ 173 tesselationhelpers.cpp \ 174 triangleintersectionlist.cpp \ 175 vector.cpp \ 176 vector_ops.cpp \ 177 verbose.cpp \ 178 World.cpp 140 179 141 180 HEADER = \ 142 ${ANALYSISHEADER} \ 143 ${ATOMHEADER} \ 144 ${PATTERNHEADER} \ 145 ${UIHEADER} \ 146 ${DESCRIPTORHEADER} \ 147 ${EXCEPTIONHEADER} \ 148 ${LEGACYHEADER} \ 149 bond.hpp \ 150 bondgraph.hpp \ 151 boundary.hpp \ 152 config.hpp \ 153 defs.hpp \ 154 element.hpp \ 155 ellipsoid.hpp \ 156 errorlogger.hpp \ 157 graph.hpp \ 158 helpers.hpp \ 159 info.hpp \ 160 leastsquaremin.hpp \ 161 Line.hpp \ 162 linkedcell.hpp \ 163 lists.hpp \ 164 log.hpp \ 165 logger.hpp \ 166 memoryallocator.hpp \ 167 memoryusageobserver.hpp \ 168 molecule.hpp \ 169 molecule_template.hpp \ 170 parser.hpp \ 171 periodentafel.hpp \ 172 Plane.hpp \ 173 stackclass.hpp \ 174 tesselation.hpp \ 175 tesselationhelpers.hpp \ 176 triangleintersectionlist.hpp \ 177 verbose.hpp \ 178 vector_ops.hpp \ 179 World.hpp 181 ${ANALYSISHEADER} \ 182 ${ACTIONSHEADER} \ 183 ${ATOMHEADER} \ 184 ${PARSERHEADER} \ 185 ${PATTERNHEADER} \ 186 ${DESCRIPTORHEADER} \ 187 ${EXCEPTIONHEADER} \ 188 ${LEGACYHEADER} \ 189 bond.hpp \ 190 bondgraph.hpp \ 191 boundary.hpp \ 192 CommandLineParser.hpp \ 193 config.hpp \ 194 defs.hpp \ 195 element.hpp \ 196 elements_db.hpp \ 197 ellipsoid.hpp \ 198 errorlogger.hpp \ 199 graph.hpp \ 200 helpers.hpp \ 201 info.hpp \ 202 leastsquaremin.hpp \ 203 Line.hpp \ 204 linkedcell.hpp \ 205 lists.hpp \ 206 log.hpp \ 207 logger.hpp \ 208 molecule.hpp \ 209 molecule_template.hpp \ 210 parser.hpp \ 211 periodentafel.hpp \ 212 Plane.hpp \ 213 stackclass.hpp \ 214 tesselation.hpp \ 215 tesselationhelpers.hpp \ 216 triangleintersectionlist.hpp \ 217 verbose.hpp \ 218 vector_ops.hpp \ 219 World.hpp 220 221 # the following files are no longer used: 222 # memoryallocator.hpp \ 223 # memoryallocator.cpp \ 224 # memoryusageobserver.hpp \ 225 # memoryusageobserver.cpp 180 226 181 227 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) 182 INCLUDES = -I$(top_srcdir)/src/unittests 228 INCLUDES = -I$(top_srcdir)/src/unittests -I$(top_srcdir)/src/Actions -I$(top_srcdir)/src/UIElements 183 229 184 230 noinst_LIBRARIES = libmolecuilder.a libgslwrapper.a … … 187 233 libmolecuilder_a_SOURCES = ${SOURCE} ${HEADER} 188 234 libgslwrapper_a_SOURCES = ${LINALGSOURCE} ${LINALGHEADER} 189 molecuilder_DATA = elements.db valence.db orbitals.db Hbonddistance.db Hbondangle.db190 235 molecuilder_LDFLAGS = $(BOOST_LDFLAGS) 191 236 molecuilder_SOURCES = builder.cpp 192 molecuilder_LDADD = libmolecuilder.a libgslwrapper.a $(BOOST_LIB) ${BOOST_THREAD_LIB}237 molecuilder_LDADD = UIElements/libMolecuilderUI.a Actions/libMolecuilderActions.a libmolecuilder.a libgslwrapper.a $(BOOST_LIB) ${BOOST_THREAD_LIB} ${BOOST_PROGRAM_OPTIONS_LIB} 193 238 joiner_SOURCES = joiner.cpp datacreator.cpp parser.cpp datacreator.hpp helpers.hpp parser.hpp periodentafel.hpp 194 239 joiner_LDADD = libmolecuilder.a $(BOOST_LIB) ${BOOST_THREAD_LIB} 195 240 analyzer_SOURCES = analyzer.cpp datacreator.cpp parser.cpp helpers.hpp periodentafel.hpp parser.hpp datacreator.hpp 196 241 analyzer_LDADD = libmolecuilder.a $(BOOST_LIB) ${BOOST_THREAD_LIB} 197 198 #EXTRA_DIST = ${molecuilder_DATA}199 242 200 243 FORCE: -
src/UIElements/Dialog.cpp
ra7b761b r1024cb 8 8 #include <cassert> 9 9 10 #include "UIElements/Dialog.hpp" 11 10 #include "Dialog.hpp" 11 12 #include "atom.hpp" 13 #include "element.hpp" 14 #include "molecule.hpp" 12 15 #include "vector.hpp" 13 16 … … 51 54 52 55 // Base class 53 Dialog::Query::Query(string _title) : 54 title(_title) 56 Dialog::Query::Query(string _title, string _description) : 57 title(_title), 58 description(_description) 55 59 {} 56 60 … … 61 65 } 62 66 67 const std::string Dialog::Query::getDescription() const{ 68 return description; 69 } 70 // empty Queries 71 72 Dialog::EmptyQuery::EmptyQuery(string title, std::string description) : 73 Query(title, description) 74 {} 75 76 Dialog::EmptyQuery::~EmptyQuery() {} 77 78 void Dialog::EmptyQuery::setResult() { 79 } 80 63 81 // Int Queries 64 82 65 Dialog::IntQuery::IntQuery(string title,int *_target ) :66 Query(title ), target(_target)83 Dialog::IntQuery::IntQuery(string title,int *_target, std::string description) : 84 Query(title, description), target(_target) 67 85 {} 68 86 … … 73 91 } 74 92 93 // Int Queries 94 95 Dialog::BooleanQuery::BooleanQuery(string title,bool *_target, std::string description) : 96 Query(title, description), target(_target) 97 {} 98 99 Dialog::BooleanQuery::~BooleanQuery() {} 100 101 void Dialog::BooleanQuery::setResult() { 102 *target = tmp; 103 } 104 75 105 // String Queries 76 106 77 Dialog::StringQuery::StringQuery(string title,string *_target ) :78 Query(title ), target(_target)107 Dialog::StringQuery::StringQuery(string title,string *_target, std::string _description) : 108 Query(title, _description), target(_target) 79 109 {} 80 110 … … 87 117 // Double Queries 88 118 89 Dialog::DoubleQuery::DoubleQuery(string title,double *_target ) :90 Query(title ), target(_target)119 Dialog::DoubleQuery::DoubleQuery(string title,double *_target, std::string _description) : 120 Query(title, _description), target(_target) 91 121 {} 92 122 … … 98 128 99 129 130 // Atom Queries 131 132 Dialog::AtomQuery::AtomQuery(string title, atom **_target, std::string _description) : 133 Query(title, _description), 134 tmp(0), 135 target(_target) 136 137 {} 138 139 Dialog::AtomQuery::~AtomQuery() {} 140 141 void Dialog::AtomQuery::setResult() { 142 *target = tmp; 143 } 144 100 145 // Molecule Queries 101 146 102 Dialog::MoleculeQuery::MoleculeQuery(string title, molecule **_target, MoleculeListClass *_molecules) :103 Query(title ),147 Dialog::MoleculeQuery::MoleculeQuery(string title, molecule **_target, std::string _description) : 148 Query(title, _description), 104 149 tmp(0), 105 molecules(_molecules),106 150 target(_target) 107 151 … … 116 160 // Vector Queries 117 161 118 Dialog::VectorQuery::VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check ) :119 Query(title ),162 Dialog::VectorQuery::VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description) : 163 Query(title, _description), 120 164 cellSize(_cellSize), 121 165 check(_check), 122 166 target(_target) 123 167 { 124 tmp = new Vector();168 tmp = new Vector(); 125 169 } 126 170 … … 134 178 } 135 179 180 // Box Queries 181 182 Dialog::BoxQuery::BoxQuery(std::string title, double ** const _cellSize, std::string _description) : 183 Query(title, _description), 184 target(_cellSize) 185 { 186 tmp = new double[6]; 187 } 188 189 Dialog::BoxQuery::~BoxQuery() 190 { 191 delete[] tmp; 192 } 193 194 void Dialog::BoxQuery::setResult() { 195 for (int i=0;i<6;i++) { 196 (*target)[i] = tmp[i]; 197 } 198 } 199 136 200 // Element Queries 137 Dialog::ElementQuery::ElementQuery(std::string title, const element **_target ) :138 Query(title ),201 Dialog::ElementQuery::ElementQuery(std::string title, const element **_target, std::string _description) : 202 Query(title, _description), 139 203 tmp(0), 140 204 target(_target) -
src/UIElements/Dialog.hpp
ra7b761b r1024cb 12 12 #include<list> 13 13 14 class MoleculeListClass; 14 class atom; 15 class element; 15 16 class molecule; 16 17 class Vector; 17 class element;18 18 19 19 class Dialog … … 23 23 virtual ~Dialog(); 24 24 25 virtual void queryInt(const char *, int *)=0; 26 virtual void queryDouble(const char*,double *)=0; 27 virtual void queryString(const char*, std::string *)=0; 28 virtual void queryMolecule(const char*,molecule**,MoleculeListClass*)=0; 29 virtual void queryVector(const char*,Vector *,const double *const,bool)=0; 30 virtual void queryElement(const char*,const element **)=0; 25 virtual void queryEmpty(const char *, std::string = "")=0; 26 virtual void queryBoolean(const char *, bool *, std::string = "")=0; 27 virtual void queryInt(const char *, int *, std::string = "")=0; 28 virtual void queryDouble(const char*,double *, std::string = "")=0; 29 virtual void queryString(const char*, std::string *, std::string = "")=0; 30 virtual void queryAtom(const char*,atom**,std::string = "")=0; 31 virtual void queryMolecule(const char*,molecule**, std::string = "")=0; 32 virtual void queryVector(const char*,Vector *,const double *const,bool, std::string = "")=0; 33 virtual void queryBox(const char*,double ** const, std::string = "")=0; 34 virtual void queryElement(const char*,const element **, std::string = "")=0; 31 35 32 36 virtual bool display(); … … 46 50 class Query { 47 51 public: 48 Query(std::string _title );52 Query(std::string _title, std::string _description = ""); 49 53 virtual ~Query(); 50 54 virtual bool handle()=0; … … 52 56 protected: 53 57 const std::string getTitle() const; 58 const std::string getDescription() const; 54 59 private: 55 std::string title; 60 std::string title; //!< short title of the query 61 std::string description; //!< longer description for tooltips or for help 62 }; 63 64 // Empty Query is just meant for showing text, such as version, help, initial message or alike 65 class EmptyQuery : public Query { 66 public: 67 EmptyQuery(std::string title, std::string _description = ""); 68 virtual ~EmptyQuery(); 69 virtual bool handle()=0; 70 virtual void setResult(); 56 71 }; 57 72 58 73 //Specialized classes for certain types. GUI-Types are not specialized at this time 74 class BooleanQuery : public Query { 75 public: 76 BooleanQuery(std::string title,bool *_target, std::string _description = ""); 77 virtual ~BooleanQuery(); 78 virtual bool handle()=0; 79 virtual void setResult(); 80 protected: 81 bool tmp; 82 private: 83 bool *target; 84 }; 85 59 86 class IntQuery : public Query { 60 87 public: 61 IntQuery(std::string title,int *_target );88 IntQuery(std::string title,int *_target, std::string _description = ""); 62 89 virtual ~IntQuery(); 63 90 virtual bool handle()=0; … … 71 98 class DoubleQuery : public Query { 72 99 public: 73 DoubleQuery(std::string title,double *_target );100 DoubleQuery(std::string title,double *_target, std::string _description = ""); 74 101 virtual ~DoubleQuery(); 75 102 virtual bool handle()=0; … … 83 110 class StringQuery : public Query { 84 111 public: 85 StringQuery(std::string title,std::string *_target );112 StringQuery(std::string title,std::string *_target, std::string _description = ""); 86 113 virtual ~StringQuery(); 87 114 virtual bool handle()=0; … … 93 120 }; 94 121 95 96 122 class MoleculeQuery : public Query { 97 123 public: 98 MoleculeQuery(std::string title, molecule **_target, MoleculeListClass *_molecules);124 MoleculeQuery(std::string title, molecule **_target, std::string _description = ""); 99 125 virtual ~MoleculeQuery(); 100 126 virtual bool handle()=0; … … 102 128 protected: 103 129 molecule *tmp; 104 MoleculeListClass *molecules;105 130 private: 106 131 molecule **target; 107 132 }; 108 133 134 class AtomQuery : public Query { 135 public: 136 AtomQuery(std::string title, atom **_target, std::string _description = ""); 137 virtual ~AtomQuery(); 138 virtual bool handle()=0; 139 virtual void setResult(); 140 protected: 141 atom *tmp; 142 private: 143 atom **target; 144 }; 145 109 146 class VectorQuery : public Query { 110 147 public: 111 VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check );148 VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = ""); 112 149 virtual ~VectorQuery(); 113 150 virtual bool handle()=0; … … 121 158 }; 122 159 160 class BoxQuery : public Query { 161 public: 162 BoxQuery(std::string title,double ** const _cellSize, std::string _description = ""); 163 virtual ~BoxQuery(); 164 virtual bool handle()=0; 165 virtual void setResult(); 166 protected: 167 double *tmp; 168 private: 169 double **target; 170 }; 171 123 172 class ElementQuery : public Query { 124 173 public: 125 ElementQuery(std::string title, const element**_target );174 ElementQuery(std::string title, const element**_target, std::string _description = ""); 126 175 virtual ~ElementQuery(); 127 176 virtual bool handle()=0; … … 140 189 }; 141 190 191 142 192 #endif /* DIALOG_HPP_ */ -
src/UIElements/MainWindow.cpp
ra7b761b r1024cb 6 6 */ 7 7 8 #include " UIElements/MainWindow.hpp"8 #include "MainWindow.hpp" 9 9 10 10 MainWindow::MainWindow() -
src/UIElements/MainWindow.hpp
ra7b761b r1024cb 25 25 }; 26 26 27 /**28 * The type of menuPopulators29 */30 typedef void (*MenuMaker)(Menu*,MoleculeListClass*, config*, periodentafel*);31 32 /**33 * This contains all Functions that are used to create the menus.34 * Needs a specific funtion for each menu. All populators will be called35 * by the UIFactory upon creation of the main menu. Thus the actuall construction36 * of the Menus can be kept independent of the concrete type of UI that is being37 * built.38 */39 struct menuPopulaters{40 MenuMaker MakeEditMoleculesMenu;41 };42 27 43 28 #endif /* MAINWINDOW_HPP_ */ -
src/UIElements/UIFactory.cpp
ra7b761b r1024cb 9 9 #include <cassert> 10 10 #include "Patterns/Singleton_impl.hpp" 11 #include "UI Elements/UIFactory.hpp"11 #include "UIFactory.hpp" 12 12 13 13 // all factories that can be used: 14 #include "UIElements/TextUIFactory.hpp" 14 #include "TextUI/TextUIFactory.hpp" 15 #include "CommandLineUI/CommandLineUIFactory.hpp" 15 16 16 17 UIFactory::UIFactory() … … 30 31 setInstance(new TextUIFactory()); 31 32 break; 33 case CommandLine: 34 setInstance(new CommandLineUIFactory()); 35 break; 32 36 33 37 default: -
src/UIElements/UIFactory.hpp
ra7b761b r1024cb 11 11 class MainWindow; 12 12 class Dialog; 13 14 class MoleculeListClass; 15 class config; 16 class periodentafel; 17 18 struct menuPopulaters; 13 class DialogDescription; 19 14 20 15 #include "Patterns/Singleton.hpp" … … 31 26 32 27 public: 33 enum InterfaceTypes {Text };28 enum InterfaceTypes {Text, CommandLine}; 34 29 virtual ~UIFactory(); 35 30 … … 37 32 * Produce some kind of main window, of whichever type was chosen when the factory was created 38 33 */ 39 virtual MainWindow* makeMainWindow( menuPopulaters,MoleculeListClass *, config *, periodentafel *, char *)=0;34 virtual MainWindow* makeMainWindow()=0; 40 35 41 36 /** -
src/World.cpp
ra7b761b r1024cb 9 9 10 10 #include "atom.hpp" 11 #include "config.hpp" 11 12 #include "molecule.hpp" 12 13 #include "periodentafel.hpp" … … 27 28 } 28 29 30 config *&World::getConfig(){ 31 return configuration; 32 } 33 29 34 // Atoms 30 35 … … 53 58 std::vector<molecule*> World::getAllMolecules(MoleculeDescriptor descriptor){ 54 59 return descriptor.findAll(); 60 } 61 62 std::vector<molecule*> World::getAllMolecules(){ 63 return getAllMolecules(AllMolecules()); 55 64 } 56 65 … … 78 87 delete[](defaultName); 79 88 const int length = strlen(name); 80 defaultName = new char[length+2];81 if (length < MAXSTRINGSIZE)89 if (length < MAXSTRINGSIZE) { 90 defaultName = new char[length+2]; 82 91 strncpy(defaultName, name, length); 83 else 84 strcpy(defaultName, "none"); 92 } else { 93 defaultName = new char[MAXSTRINGSIZE]; 94 strncpy(defaultName, "none", MAXSTRINGSIZE-1); 95 } 85 96 }; 86 97 … … 267 278 World::World() : 268 279 periode(new periodentafel), 280 configuration(new config), 269 281 atoms(), 270 282 currAtomId(0), … … 292 304 delete molecules_deprecated; 293 305 delete periode; 306 delete configuration; 294 307 MoleculeSet::iterator molIter; 295 308 for(molIter=molecules.begin();molIter!=molecules.end();++molIter){ -
src/World.hpp
ra7b761b r1024cb 30 30 31 31 // forward declarations 32 class config; 32 33 class periodentafel; 33 34 class MoleculeListClass; … … 75 76 76 77 /** 78 * returns the configuration for the world. 79 */ 80 config *&getConfig(); 81 82 /** 77 83 * returns the first atom that matches a given descriptor. 78 84 * Do not rely on ordering for descriptors that match more than one atom. … … 109 115 */ 110 116 std::vector<molecule*> getAllMolecules(MoleculeDescriptor descriptor); 117 std::vector<molecule*> getAllMolecules(); 111 118 112 119 /** … … 234 241 235 242 periodentafel *periode; 243 config *configuration; 236 244 static double *cell_size; 237 245 static char *defaultName; -
src/analysis_bonds.cpp
ra7b761b r1024cb 49 49 * \param &Max maximum distance on return, 0 if no bond between the two elements 50 50 */ 51 void MinMeanMaxBondDistanceBetweenElements(const molecule *mol, element *type1,element *type2, double &Min, double &Mean, double &Max)51 void MinMeanMaxBondDistanceBetweenElements(const molecule *mol, const element *type1, const element *type2, double &Min, double &Mean, double &Max) 52 52 { 53 53 Min = 2e+6; … … 120 120 * \param *InterfaceElement or NULL 121 121 */ 122 int CountHydrogenBridgeBonds(MoleculeListClass *molecules, element * InterfaceElement = NULL)122 int CountHydrogenBridgeBonds(MoleculeListClass *molecules, const element * InterfaceElement = NULL) 123 123 { 124 124 int count = 0; -
src/analysis_bonds.hpp
ra7b761b r1024cb 31 31 32 32 void GetMaxMinMeanBondCount(const molecule * const mol, double &Min, double &Mean, double &Max); 33 void MinMeanMaxBondDistanceBetweenElements(const molecule *mol, element *type1,element *type2, double &Min, double &Mean, double &Max);33 void MinMeanMaxBondDistanceBetweenElements(const molecule *mol, const element *type1, const element *type2, double &Min, double &Mean, double &Max); 34 34 35 int CountHydrogenBridgeBonds(MoleculeListClass * const molecules, element * InterfaceElement);35 int CountHydrogenBridgeBonds(MoleculeListClass * const molecules, const element * InterfaceElement); 36 36 int CountBondsOfTwo(MoleculeListClass * const molecules, const element * const first, const element * const second); 37 37 int CountBondsOfThree(MoleculeListClass * const molecules, const element * const first, const element * const second, const element * const third); -
src/analysis_correlation.cpp
ra7b761b r1024cb 136 136 } 137 137 } 138 Free(&FullMatrix);139 Free(&FullInverseMatrix);138 delete[](FullMatrix); 139 delete[](FullInverseMatrix); 140 140 } 141 141 … … 221 221 } 222 222 } 223 Free(&FullMatrix);224 Free(&FullInverseMatrix);223 delete[](FullMatrix); 224 delete[](FullInverseMatrix); 225 225 } 226 226 … … 328 328 } 329 329 } 330 Free(&FullMatrix);331 Free(&FullInverseMatrix);330 delete[](FullMatrix); 331 delete[](FullInverseMatrix); 332 332 } 333 333 -
src/analyzer.cpp
ra7b761b r1024cb 75 75 return 1; 76 76 } else { 77 dir = Malloc<char>(strlen(argv[2]) + 2, "main: *dir");77 dir = new char[strlen(argv[2]) + 2]; 78 78 strcpy(dir, "/"); 79 79 strcat(dir, argv[2]); … … 82 82 if (argc > 4) { 83 83 DoLog(0) && (Log() << Verbose(0) << "Loading periodentafel." << endl); 84 periode = Malloc<periodentafel>(1, "main - periode");84 periode = new periodentafel; 85 85 periode->LoadPeriodentafel(argv[4]); 86 86 } … … 558 558 // ++++++++++++++++ exit ++++++++++++++++++++++++++++++++++ 559 559 delete(periode); 560 Free(&dir);560 delete[](dir); 561 561 DoLog(0) && (Log() << Verbose(0) << "done." << endl); 562 562 return 0; -
src/atom.cpp
ra7b761b r1024cb 269 269 { 270 270 if (ComponentNr != NULL) 271 Free(&ComponentNr);272 ComponentNr = Malloc<int>(ListOfBonds.size()+1, "atom::InitComponentNumbers: *ComponentNr");271 delete[](ComponentNr); 272 ComponentNr = new int[ListOfBonds.size()+1]; 273 273 for (int i=ListOfBonds.size()+1;i--;) 274 274 ComponentNr[i] = -1; -
src/atom_bondedparticle.cpp
ra7b761b r1024cb 74 74 *BondFile << nr << "\t" << (*Runner)->GetOtherAtom(this)->nr << "\n"; 75 75 }; 76 77 /** 78 * Adds a bond between this bonded particle and another. Does nothing if this 79 * bond already exists. 80 * 81 * \param bonding partner 82 */ 83 void BondedParticle::addBond(BondedParticle* Partner) { 84 if (IsBondedTo(Partner)) { 85 return; 86 } 87 88 bond* newBond = new bond((atom*) this, (atom*) Partner, 1, 0); 89 RegisterBond(newBond); 90 Partner->RegisterBond(newBond); 91 } 76 92 77 93 /** Puts a given bond into atom::ListOfBonds. -
src/atom_bondedparticle.hpp
ra7b761b r1024cb 37 37 virtual ~BondedParticle(); 38 38 39 void addBond(BondedParticle* Partner); 39 40 bool RegisterBond(bond *Binder); 40 41 bool UnregisterBond(bond *Binder); -
src/atom_graphnodeinfo.cpp
ra7b761b r1024cb 17 17 GraphNodeInfo::~GraphNodeInfo() 18 18 { 19 Free<int>(&ComponentNr, "atom::~atom: *ComponentNr");19 delete[](ComponentNr); 20 20 }; -
src/atom_trajectoryparticle.cpp
ra7b761b r1024cb 10 10 #include "config.hpp" 11 11 #include "element.hpp" 12 #include "info.hpp" 12 13 #include "log.hpp" 13 14 #include "parser.hpp" … … 71 72 void TrajectoryParticle::ResizeTrajectory(int MaxSteps) 72 73 { 74 Info FunctionInfo(__func__); 73 75 if (Trajectory.R.size() <= (unsigned int)(MaxSteps)) { 74 //Log() << Verbose(0) << "Increasing size for trajectory array of " << keyword << " to " << (MaxSteps+1) << "." << endl;76 DoLog(0) && (Log() << Verbose(0) << "Increasing size for trajectory array of " << nr << " from " << Trajectory.R.size() << " to " << (MaxSteps+1) << "." << endl); 75 77 Trajectory.R.resize(MaxSteps+1); 76 78 Trajectory.U.resize(MaxSteps+1); -
src/bond.cpp
ra7b761b r1024cb 15 15 /** Empty Constructor for class bond. 16 16 */ 17 bond::bond() : leftatom(NULL), rightatom(NULL), previous(NULL), next(NULL), HydrogenBond(0), BondDegree(0), nr(-1), Cyclic(false), Type(Undetermined), Used(white) 17 bond::bond() 18 : leftatom(NULL), rightatom(NULL), previous(NULL), next(NULL), HydrogenBond(0), 19 BondDegree(0), nr(-1), Cyclic(false), Type(Undetermined), Used(white) 18 20 { 19 21 }; … … 25 27 * \param number increasing index 26 28 */ 27 bond::bond(atom *left, atom *right, const int degree, const int number) : leftatom(left), rightatom(right), previous(NULL), next(NULL), HydrogenBond(0), BondDegree(degree), nr(number), Cyclic(false), Type(Undetermined), Used(white) 29 bond::bond(atom *left, atom *right, const int degree, const int number) 30 : leftatom(left), rightatom(right), previous(NULL), next(NULL), HydrogenBond(0), 31 BondDegree(degree), nr(number), Cyclic(false), Type(Undetermined), Used(white) 28 32 { 29 33 if ((left != NULL) && (right != NULL)) { -
src/bondgraph.hpp
ra7b761b r1024cb 27 27 28 28 class molecule; 29 class periodentafel;29 class BondedParticle; 30 30 class MatrixContainer; 31 31 -
src/boundary.cpp
ra7b761b r1024cb 918 918 } 919 919 } 920 Free(&M);921 Free(&MInverse);920 delete[](M); 921 delete[](MInverse); 922 922 923 923 return Filling; -
src/builder.cpp
ra7b761b r1024cb 53 53 54 54 #include <cstring> 55 #include <cstdlib> 55 56 56 57 #include "analysis_bonds.hpp" … … 60 61 #include "bondgraph.hpp" 61 62 #include "boundary.hpp" 63 #include "CommandLineParser.hpp" 62 64 #include "config.hpp" 63 65 #include "element.hpp" … … 76 78 #include "Actions/ActionRegistry.hpp" 77 79 #include "Actions/ActionHistory.hpp" 80 #include "Actions/MapOfActions.hpp" 78 81 #include "Actions/MethodAction.hpp" 79 #include "Actions/ small_actions.hpp"82 #include "Actions/MoleculeAction/ChangeNameAction.hpp" 80 83 #include "World.hpp" 81 84 #include "version.h" … … 862 865 863 866 mol->CountAtoms(); // recount atoms 864 if (mol-> AtomCount!= 0) { // if there is more than none865 count = mol-> AtomCount; // is changed becausing of adding, thus has to be stored away beforehand867 if (mol->getAtomCount() != 0) { // if there is more than none 868 count = mol->getAtomCount(); // is changed becausing of adding, thus has to be stored away beforehand 866 869 Elements = new element *[count]; 867 870 vectors = new Vector *[count]; … … 1293 1296 // generate some KeySets 1294 1297 DoLog(0) && (Log() << Verbose(0) << "Generating KeySets." << endl); 1295 KeySet TestSets[mol-> AtomCount+1];1298 KeySet TestSets[mol->getAtomCount()+1]; 1296 1299 i=1; 1297 1300 while (Walker->next != mol->end) { … … 1304 1307 DoLog(0) && (Log() << Verbose(0) << "Testing insertion of already present item in KeySets." << endl); 1305 1308 KeySetTestPair test; 1306 test = TestSets[mol-> AtomCount-1].insert(Walker->nr);1309 test = TestSets[mol->getAtomCount()-1].insert(Walker->nr); 1307 1310 if (test.second) { 1308 1311 DoLog(1) && (Log() << Verbose(1) << "Insertion worked?!" << endl); … … 1310 1313 DoLog(1) && (Log() << Verbose(1) << "Insertion rejected: Present object is " << (*test.first) << "." << endl); 1311 1314 } 1312 TestSets[mol-> AtomCount].insert(mol->end->previous->nr);1313 TestSets[mol-> AtomCount].insert(mol->end->previous->previous->previous->nr);1315 TestSets[mol->getAtomCount()].insert(mol->end->previous->nr); 1316 TestSets[mol->getAtomCount()].insert(mol->end->previous->previous->previous->nr); 1314 1317 1315 1318 // constructing Graph structure … … 1319 1322 // insert KeySets into Subgraphs 1320 1323 DoLog(0) && (Log() << Verbose(0) << "Inserting KeySets into Subgraph class." << endl); 1321 for (int j=0;j<mol-> AtomCount;j++) {1324 for (int j=0;j<mol->getAtomCount();j++) { 1322 1325 Subgraphs.insert(GraphPair (TestSets[j],pair<int, double>(counter++, 1.))); 1323 1326 } 1324 1327 DoLog(0) && (Log() << Verbose(0) << "Testing insertion of already present item in Subgraph." << endl); 1325 1328 GraphTestPair test2; 1326 test2 = Subgraphs.insert(GraphPair (TestSets[mol-> AtomCount],pair<int, double>(counter++, 1.)));1329 test2 = Subgraphs.insert(GraphPair (TestSets[mol->getAtomCount()],pair<int, double>(counter++, 1.))); 1327 1330 if (test2.second) { 1328 1331 DoLog(1) && (Log() << Verbose(1) << "Insertion worked?!" << endl); … … 1479 1482 1480 1483 /** Parses the command line options. 1484 * Note that this function is from now on transitional. All commands that are not passed 1485 * here are handled by CommandLineParser and the actions of CommandLineUIFactory. 1481 1486 * \param argc argument count 1482 1487 * \param **argv arguments array … … 1486 1491 * \param *ConfigFileName pointer to config file name in **argv 1487 1492 * \param *PathToDatabases pointer to db's path in **argv 1493 * \param &ArgcList list of arguments that we do not parse here 1488 1494 * \return exit code (0 - successful, all else - something's wrong) 1489 1495 */ 1490 static int ParseCommandLineOptions(int argc, char **argv, MoleculeListClass *&molecules, periodentafel *&periode, \1491 config& configuration, char * &ConfigFileName)1496 static int ParseCommandLineOptions(int argc, char **argv, MoleculeListClass *&molecules, periodentafel *&periode, 1497 config& configuration, char **ConfigFileName, set<int> &ArgcList) 1492 1498 { 1493 1499 Vector x,y,z,n; // coordinates for absolute point in cell volume … … 1507 1513 molecule *mol = NULL; 1508 1514 string BondGraphFileName("\n"); 1509 int verbosity = 0; 1510 strncpy(configuration.databasepath, LocalPath, MAXSTRINGSIZE-1); 1515 bool DatabasePathGiven = false; 1511 1516 1512 1517 if (argc > 1) { // config file specified as option … … 1521 1526 case 'H': 1522 1527 case '?': 1523 DoLog(0) && (Log() << Verbose(0) << "MoleCuilder suite" << endl << "==================" << endl << endl); 1524 DoLog(0) && (Log() << Verbose(0) << "Usage: " << argv[0] << "[config file] [-{acefpsthH?vfrp}] [further arguments]" << endl); 1525 DoLog(0) && (Log() << Verbose(0) << "or simply " << argv[0] << " without arguments for interactive session." << endl); 1526 DoLog(0) && (Log() << Verbose(0) << "\t-a Z x1 x2 x3\tAdd new atom of element Z at coordinates (x1,x2,x3)." << endl); 1527 DoLog(0) && (Log() << Verbose(0) << "\t-A <source>\tCreate adjacency list from bonds parsed from 'dbond'-style file." <<endl); 1528 DoLog(0) && (Log() << Verbose(0) << "\t-b xx xy xz yy yz zz\tCenter atoms in domain with given symmetric matrix of (xx,xy,xz,yy,yz,zz)." << endl); 1529 DoLog(0) && (Log() << Verbose(0) << "\t-B xx xy xz yy yz zz\tBound atoms by domain with given symmetric matrix of (xx,xy,xz,yy,yz,zz)." << endl); 1530 DoLog(0) && (Log() << Verbose(0) << "\t-c x1 x2 x3\tCenter atoms in domain with a minimum distance to boundary of (x1,x2,x3)." << endl); 1531 DoLog(0) && (Log() << Verbose(0) << "\t-C <type> [params] <output> <bin output> <BinWidth> <BinStart> <BinEnd>\tPair Correlation analysis." << endl); 1532 DoLog(0) && (Log() << Verbose(0) << "\t-d x1 x2 x3\tDuplicate cell along each axis by given factor." << endl); 1533 DoLog(0) && (Log() << Verbose(0) << "\t-D <bond distance>\tDepth-First-Search Analysis of the molecule, giving cycles and tree/back edges." << endl); 1534 DoLog(0) && (Log() << Verbose(0) << "\t-e <file>\tSets the databases path to be parsed (default: ./)." << endl); 1535 DoLog(0) && (Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl); 1536 DoLog(0) && (Log() << Verbose(0) << "\t-f <dist> <order>\tFragments the molecule in BOSSANOVA manner (with/out rings compressed) and stores config files in same dir as config (return code 0 - fragmented, 2 - no fragmentation necessary)." << endl); 1537 DoLog(0) && (Log() << Verbose(0) << "\t-F <xyz of filler> <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl); 1538 DoLog(0) && (Log() << Verbose(0) << "\t-FF <MaxDistance> <xyz of filler> <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl); 1539 DoLog(0) && (Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl); 1540 DoLog(0) && (Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl); 1541 DoLog(0) && (Log() << Verbose(0) << "\t-I\t Dissect current system of molecules into a set of disconnected (subgraphs of) molecules." << endl); 1542 DoLog(0) && (Log() << Verbose(0) << "\t-j\t<path> Store all bonds to file." << endl); 1543 DoLog(0) && (Log() << Verbose(0) << "\t-J\t<path> Store adjacency per atom to file." << endl); 1544 DoLog(0) && (Log() << Verbose(0) << "\t-L <step0> <step1> <prefix>\tStore a linear interpolation between two configurations <step0> and <step1> into single config files with prefix <prefix> and as Trajectories into the current config file." << endl); 1545 DoLog(0) && (Log() << Verbose(0) << "\t-m <0/1>\tCalculate (0)/ Align in(1) PAS with greatest EV along z axis." << endl); 1546 DoLog(0) && (Log() << Verbose(0) << "\t-M <basis>\tSetting basis to store to MPQC config files." << endl); 1547 DoLog(0) && (Log() << Verbose(0) << "\t-n\tFast parsing (i.e. no trajectories are looked for)." << endl); 1548 DoLog(0) && (Log() << Verbose(0) << "\t-N <radius> <file>\tGet non-convex-envelope." << endl); 1549 DoLog(0) && (Log() << Verbose(0) << "\t-o <out>\tGet volume of the convex envelope (and store to tecplot file)." << endl); 1550 DoLog(0) && (Log() << Verbose(0) << "\t-O\tCenter atoms in origin." << endl); 1551 DoLog(0) && (Log() << Verbose(0) << "\t-p <file>\tParse given xyz file and create raw config file from it." << endl); 1552 DoLog(0) && (Log() << Verbose(0) << "\t-P <file>\tParse given forces file and append as an MD step to config file via Verlet." << endl); 1553 DoLog(0) && (Log() << Verbose(0) << "\t-r <id>\t\tRemove an atom with given id." << endl); 1554 DoLog(0) && (Log() << Verbose(0) << "\t-R <id> <radius>\t\tRemove all atoms out of sphere around a given one." << endl); 1555 DoLog(0) && (Log() << Verbose(0) << "\t-s x1 x2 x3\tScale all atom coordinates by this vector (x1,x2,x3)." << endl); 1556 DoLog(0) && (Log() << Verbose(0) << "\t-S <file> Store temperatures from the config file in <file>." << endl); 1557 DoLog(0) && (Log() << Verbose(0) << "\t-t x1 x2 x3\tTranslate all atoms by this vector (x1,x2,x3)." << endl); 1558 DoLog(0) && (Log() << Verbose(0) << "\t-T x1 x2 x3\tTranslate periodically all atoms by this vector (x1,x2,x3)." << endl); 1559 DoLog(0) && (Log() << Verbose(0) << "\t-u rho\tsuspend in water solution and output necessary cell lengths, average density rho and repetition." << endl); 1560 DoLog(0) && (Log() << Verbose(0) << "\t-v\t\tsets verbosity (more is more)." << endl); 1561 DoLog(0) && (Log() << Verbose(0) << "\t-V\t\tGives version information." << endl); 1562 DoLog(0) && (Log() << Verbose(0) << "\t-X\t\tset default name of a molecule." << endl); 1563 DoLog(0) && (Log() << Verbose(0) << "Note: config files must not begin with '-' !" << endl); 1564 return (1); 1528 ArgcList.insert(argptr-1); 1529 return(1); 1565 1530 break; 1566 1531 case 'v': 1567 while (argv[argptr-1][verbosity+1] == 'v') { 1568 verbosity++; 1569 } 1570 setVerbosity(verbosity); 1571 DoLog(0) && (Log() << Verbose(0) << "Setting verbosity to " << verbosity << "." << endl); 1532 setVerbosity(atoi(argv[argptr])); 1533 ArgcList.insert(argptr-1); 1534 ArgcList.insert(argptr); 1535 argptr++; 1572 1536 break; 1573 1537 case 'V': 1574 DoLog(0) && (Log() << Verbose(0) << argv[0] << " " << VERSIONSTRING << endl); 1575 DoLog(0) && (Log() << Verbose(0) << "Build your own molecule position set." << endl); 1576 return (1); 1538 ArgcList.insert(argptr-1); 1539 return(1); 1577 1540 break; 1578 1541 case 'B': 1542 ArgcList.insert(argptr-1); 1543 ArgcList.insert(argptr); 1544 ArgcList.insert(argptr+1); 1545 ArgcList.insert(argptr+2); 1546 ArgcList.insert(argptr+3); 1547 ArgcList.insert(argptr+4); 1548 ArgcList.insert(argptr+5); 1549 argptr+=6; 1579 1550 if (ExitFlag == 0) ExitFlag = 1; 1580 if ((argptr+5 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3])) || (!IsValidNumber(argv[argptr+4])) || (!IsValidNumber(argv[argptr+5])) ) {1581 ExitFlag = 255;1582 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for bounding in box: -B <xx> <xy> <xz> <yy> <yz> <zz>" << endl);1583 performCriticalExit();1584 } else {1585 SaveFlag = true;1586 j = -1;1587 DoLog(1) && (Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl);1588 double * const cell_size = World::getInstance().getDomain();1589 for (int i=0;i<6;i++) {1590 cell_size[i] = atof(argv[argptr+i]);1591 }1592 argptr+=6;1593 }1594 1551 break; 1595 1552 case 'e': … … 1600 1557 DoLog(0) && (Log() << Verbose(0) << "Using " << argv[argptr] << " as elements database." << endl); 1601 1558 strncpy (configuration.databasepath, argv[argptr], MAXSTRINGSIZE-1); 1559 DatabasePathGiven = true; 1602 1560 argptr+=1; 1603 1561 } … … 1613 1571 } 1614 1572 break; 1573 case 'M': 1574 if ((argptr >= argc) || (argv[argptr][0] == '-')) { 1575 ExitFlag = 255; 1576 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for setting MPQC basis: -M <basis name>" << endl); 1577 performCriticalExit(); 1578 } else { 1579 configuration.basis = argv[argptr]; 1580 DoLog(1) && (Log() << Verbose(1) << "Setting MPQC basis to " << configuration.basis << "." << endl); 1581 argptr+=1; 1582 } 1583 break; 1615 1584 case 'n': 1616 1585 DoLog(0) && (Log() << Verbose(0) << "I won't parse trajectories." << endl); … … 1620 1589 { 1621 1590 World::getInstance().setDefaultName(argv[argptr]); 1622 DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << *World::getInstance().getDefaultName() << "." << endl);1591 DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << World::getInstance().getDefaultName() << "." << endl); 1623 1592 } 1624 1593 break; … … 1632 1601 1633 1602 // 3a. Parse the element database 1634 if (periode->LoadPeriodentafel(configuration.databasepath)) { 1635 DoLog(0) && (Log() << Verbose(0) << "Element list loaded successfully." << endl); 1636 //periode->Output(); 1637 } else { 1638 DoLog(0) && (Log() << Verbose(0) << "Element list loading failed." << endl); 1639 return 1; 1640 } 1603 if (DatabasePathGiven) 1604 if (periode->LoadPeriodentafel(configuration.databasepath)) { 1605 DoLog(0) && (Log() << Verbose(0) << "Element list loaded successfully." << endl); 1606 //periode->Output(); 1607 } else { 1608 DoLog(0) && (Log() << Verbose(0) << "Element list loading failed." << endl); 1609 return 1; 1610 } 1641 1611 // 3b. Find config file name and parse if possible, also BondGraphFileName 1642 1612 if (argv[1][0] != '-') { … … 1652 1622 } else { 1653 1623 DoLog(0) && (Log() << Verbose(0) << "Empty configuration file." << endl); 1654 ConfigFileName = argv[1];1624 strcpy(*ConfigFileName, argv[1]); 1655 1625 configPresent = empty; 1656 1626 output.close(); … … 1658 1628 } else { 1659 1629 test.close(); 1660 ConfigFileName = argv[1];1630 strcpy(*ConfigFileName, argv[1]); 1661 1631 DoLog(1) && (Log() << Verbose(1) << "Specified config file found, parsing ... "); 1662 switch (configuration.TestSyntax( ConfigFileName, periode)) {1632 switch (configuration.TestSyntax(*ConfigFileName, periode)) { 1663 1633 case 1: 1664 1634 DoLog(0) && (Log() << Verbose(0) << "new syntax." << endl); 1665 configuration.Load( ConfigFileName, BondGraphFileName, periode, molecules);1635 configuration.Load(*ConfigFileName, BondGraphFileName, periode, molecules); 1666 1636 configPresent = present; 1667 1637 break; 1668 1638 case 0: 1669 1639 DoLog(0) && (Log() << Verbose(0) << "old syntax." << endl); 1670 configuration.LoadOld( ConfigFileName, BondGraphFileName, periode, molecules);1640 configuration.LoadOld(*ConfigFileName, BondGraphFileName, periode, molecules); 1671 1641 configPresent = present; 1672 1642 break; … … 1689 1659 mol = World::getInstance().createMolecule(); 1690 1660 mol->ActiveFlag = true; 1691 if ( ConfigFileName != NULL)1692 mol->SetNameFromFilename( ConfigFileName);1661 if (*ConfigFileName != NULL) 1662 mol->SetNameFromFilename(*ConfigFileName); 1693 1663 molecules->insert(mol); 1694 1664 } … … 1757 1727 if (configPresent == present) { 1758 1728 switch(argv[argptr-1][1]) { 1759 case 'M':1760 if ((argptr >= argc) || (argv[argptr][0] == '-')) {1761 ExitFlag = 255;1762 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for setting MPQC basis: -B <basis name>" << endl);1763 performCriticalExit();1764 } else {1765 configuration.basis = argv[argptr];1766 DoLog(1) && (Log() << Verbose(1) << "Setting MPQC basis to " << configuration.basis << "." << endl);1767 argptr+=1;1768 }1769 break;1770 1729 case 'D': 1771 1730 if (ExitFlag == 0) ExitFlag = 1; … … 1793 1752 delete(Subgraphs); 1794 1753 for (int i=0;i<FragmentCounter;i++) 1795 Free(&ListOfLocalAtoms[i]);1796 Free(&ListOfLocalAtoms);1754 delete[](ListOfLocalAtoms[i]); 1755 delete[](ListOfLocalAtoms); 1797 1756 } 1798 1757 delete(BackEdgeStack); … … 1834 1793 if ((argptr+6 >= argc) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+5])) || (!IsValidNumber(argv[argptr+6])) || (!IsValidNumber(argv[argptr+2])) || (argv[argptr+1][0] == '-') || (argv[argptr+2][0] == '-') || (argv[argptr+3][0] == '-') || (argv[argptr+4][0] == '-')) { 1835 1794 ExitFlag = 255; 1836 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C E <Z1> <Z2> <output> <bin output> " << endl);1795 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C E <Z1> <Z2> <output> <bin output> <binstart> <binend>" << endl); 1837 1796 performCriticalExit(); 1838 1797 } else { … … 1865 1824 if ((argptr+8 >= argc) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3])) || (!IsValidNumber(argv[argptr+4])) || (!IsValidNumber(argv[argptr+7])) || (!IsValidNumber(argv[argptr+8])) || (argv[argptr+1][0] == '-') || (argv[argptr+2][0] == '-') || (argv[argptr+3][0] == '-') || (argv[argptr+4][0] == '-') || (argv[argptr+5][0] == '-') || (argv[argptr+6][0] == '-')) { 1866 1825 ExitFlag = 255; 1867 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C P <Z1> <x> <y> <z> <output> <bin output> " << endl);1826 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for pair correlation analysis: -C P <Z1> <x> <y> <z> <output> <bin output> <binstart> <binend>" << endl); 1868 1827 performCriticalExit(); 1869 1828 } else { … … 1926 1885 counter++; 1927 1886 } 1928 bool *Actives = Malloc<bool>(counter, "ParseCommandLineOptions() - case C -- *Actives");1887 bool *Actives = new bool[counter]; 1929 1888 counter = 0; 1930 1889 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) { … … 1954 1913 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) 1955 1914 (*BigFinder)->ActiveFlag = Actives[counter++]; 1956 Free(&Actives);1915 delete[](Actives); 1957 1916 delete(LCList); 1958 1917 delete(TesselStruct); … … 2011 1970 configuration.BG->ConstructBondGraph(filler); 2012 1971 molecule *Filling = NULL; 2013 atom *second = NULL, *third = NULL;2014 first = World::getInstance().createAtom();2015 first->type = periode->FindElement(1);2016 first->x = Vector(0.441, -0.143, 0.);2017 filler->AddAtom(first);2018 second = World::getInstance().createAtom();2019 second->type = periode->FindElement(1);2020 second->x = Vector(-0.464, 1.137, 0.0);2021 filler->AddAtom(second);2022 third = World::getInstance().createAtom();2023 third->type = periode->FindElement(8);2024 third->x = Vector(-0.464, 0.177, 0.);2025 filler->AddAtom(third);2026 filler->AddBond(first, third, 1);2027 filler->AddBond(second, third, 1);2028 1972 // call routine 2029 1973 double distance[NDIM]; … … 2047 1991 } else { 2048 1992 DoLog(0) && (Log() << Verbose(0) << "Parsing bonds from " << argv[argptr] << "." << endl); 2049 ifstream *input = new ifstream(argv[argptr]);2050 mol->CreateAdjacencyListFromDbondFile( input);2051 input ->close();1993 ifstream input(argv[argptr]); 1994 mol->CreateAdjacencyListFromDbondFile(&input); 1995 input.close(); 2052 1996 argptr+=1; 2053 1997 } … … 2139 2083 if ((argptr >= argc) || (argv[argptr][0] == '-')) { 2140 2084 ExitFlag = 255; 2141 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for storing tempature: -L <step0> <step1> <prefix> <identity mapping?>" << endl);2085 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for linear interpolation: -L <step0> <step1> <prefix> <identity mapping?>" << endl); 2142 2086 performCriticalExit(); 2143 2087 } else { … … 2171 2115 case 'R': 2172 2116 if (ExitFlag == 0) ExitFlag = 1; 2173 if ((argptr+ 1 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1]))) {2117 if ((argptr+3 >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3]))) { 2174 2118 ExitFlag = 255; 2175 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for removing atoms: -R < id> <distance>" << endl);2119 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for removing atoms: -R <x> <y> <z> <distance>" << endl); 2176 2120 performCriticalExit(); 2177 2121 } else { 2178 2122 SaveFlag = true; 2179 DoLog(1) && (Log() << Verbose(1) << "Removing atoms around " << argv[argptr] << " with radius " << argv[argptr+1] << "." << endl); 2180 double tmp1 = atof(argv[argptr+1]); 2181 atom *third = mol->FindAtom(atoi(argv[argptr])); 2182 if(third){ 2183 for(molecule::iterator iter = mol->begin(); iter != mol->end();){ 2184 if ((*iter)->x.DistanceSquared(third->x) > tmp1*tmp1){ // distance to first above radius ... 2185 mol->RemoveAtom(*(iter++)); 2186 } 2187 else{ 2188 ++iter; 2189 } 2123 const double radius = atof(argv[argptr+3]); 2124 Vector point(atof(argv[argptr]),atof(argv[argptr+1]),atof(argv[argptr+2])); 2125 DoLog(1) && (Log() << Verbose(1) << "Removing atoms around " << point << " with radius " << radius << "." << endl); 2126 atom *Walker = NULL; 2127 molecule::iterator advancer = mol->begin(); 2128 for(molecule::iterator iter = advancer; advancer != mol->end();) { 2129 iter = advancer++; 2130 if ((*iter)->x.DistanceSquared(point) > radius*radius){ // distance to first above radius ... 2131 Walker = (*iter); 2132 DoLog(1) && (Log() << Verbose(1) << "Removing atom " << *Walker << "." << endl); 2133 mol->RemoveAtom(*(iter)); 2134 World::getInstance().destroyAtom(Walker); 2190 2135 } 2191 } else {2192 DoeLog(1) && (eLog()<< Verbose(1) << "Removal failed due to missing atoms on molecule or wrong id." << endl);2193 2136 } 2194 argptr+= 2;2137 argptr+=4; 2195 2138 } 2196 2139 break; … … 2229 2172 case 's': 2230 2173 if (ExitFlag == 0) ExitFlag = 1; 2231 if ((argptr >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {2174 if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) { 2232 2175 ExitFlag = 255; 2233 2176 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for scaling: -s <factor_x> [factor_y] [factor_z]" << endl); 2234 2177 performCriticalExit(); 2235 2178 } else { 2236 SaveFlag = true; 2237 j = -1; 2238 DoLog(1) && (Log() << Verbose(1) << "Scaling all ion positions by factor." << endl); 2239 factor = new double[NDIM]; 2240 factor[0] = atof(argv[argptr]); 2241 factor[1] = atof(argv[argptr+1]); 2242 factor[2] = atof(argv[argptr+2]); 2243 mol->Scale((const double ** const)&factor); 2244 double * const cell_size = World::getInstance().getDomain(); 2245 for (int i=0;i<NDIM;i++) { 2246 j += i+1; 2247 x[i] = atof(argv[NDIM+i]); 2248 cell_size[j]*=factor[i]; 2249 } 2250 delete[](factor); 2179 ArgcList.insert(argptr-1); 2180 ArgcList.insert(argptr); 2181 ArgcList.insert(argptr+1); 2182 ArgcList.insert(argptr+2); 2251 2183 argptr+=3; 2252 2184 } … … 2259 2191 performCriticalExit(); 2260 2192 } else { 2261 SaveFlag = true; 2262 j = -1; 2263 DoLog(1) && (Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl); 2264 double * const cell_size = World::getInstance().getDomain(); 2265 for (int i=0;i<6;i++) { 2266 cell_size[i] = atof(argv[argptr+i]); 2267 } 2268 // center 2269 mol->CenterInBox(); 2193 ArgcList.insert(argptr-1); 2194 ArgcList.insert(argptr); 2195 ArgcList.insert(argptr+1); 2196 ArgcList.insert(argptr+2); 2197 ArgcList.insert(argptr+3); 2198 ArgcList.insert(argptr+4); 2199 ArgcList.insert(argptr+5); 2270 2200 argptr+=6; 2271 2201 } … … 2278 2208 performCriticalExit(); 2279 2209 } else { 2280 SaveFlag = true; 2281 j = -1; 2282 DoLog(1) && (Log() << Verbose(1) << "Centering atoms in config file within given simulation box." << endl); 2283 double * const cell_size = World::getInstance().getDomain(); 2284 for (int i=0;i<6;i++) { 2285 cell_size[i] = atof(argv[argptr+i]); 2286 } 2287 // center 2288 mol->BoundInBox(); 2210 ArgcList.insert(argptr-1); 2211 ArgcList.insert(argptr); 2212 ArgcList.insert(argptr+1); 2213 ArgcList.insert(argptr+2); 2214 ArgcList.insert(argptr+3); 2215 ArgcList.insert(argptr+4); 2216 ArgcList.insert(argptr+5); 2289 2217 argptr+=6; 2290 2218 } … … 2498 2426 } while (argptr < argc); 2499 2427 if (SaveFlag) 2500 configuration.SaveAll( ConfigFileName, periode, molecules);2428 configuration.SaveAll(*ConfigFileName, periode, molecules); 2501 2429 } else { // no arguments, hence scan the elements db 2502 2430 if (periode->LoadPeriodentafel(configuration.databasepath)) … … 2509 2437 }; 2510 2438 2511 /***************************************** Functions used to build all menus **********************/2512 2513 void populateEditMoleculesMenu(Menu* editMoleculesMenu,MoleculeListClass *molecules, config *configuration, periodentafel *periode){2514 // build the EditMoleculesMenu2515 Action *createMoleculeAction = new MethodAction("createMoleculeAction",boost::bind(&MoleculeListClass::createNewMolecule,molecules,periode));2516 new ActionMenuItem('c',"create new molecule",editMoleculesMenu,createMoleculeAction);2517 2518 Action *loadMoleculeAction = new MethodAction("loadMoleculeAction",boost::bind(&MoleculeListClass::loadFromXYZ,molecules,periode));2519 new ActionMenuItem('l',"load molecule from xyz file",editMoleculesMenu,loadMoleculeAction);2520 2521 Action *changeFilenameAction = new ChangeMoleculeNameAction(molecules);2522 new ActionMenuItem('n',"change molecule's name",editMoleculesMenu,changeFilenameAction);2523 2524 Action *giveFilenameAction = new MethodAction("giveFilenameAction",boost::bind(&MoleculeListClass::setMoleculeFilename,molecules));2525 new ActionMenuItem('N',"give molecules filename",editMoleculesMenu,giveFilenameAction);2526 2527 Action *parseAtomsAction = new MethodAction("parseAtomsAction",boost::bind(&MoleculeListClass::parseXYZIntoMolecule,molecules));2528 new ActionMenuItem('p',"parse atoms in xyz file into molecule",editMoleculesMenu,parseAtomsAction);2529 2530 Action *eraseMoleculeAction = new MethodAction("eraseMoleculeAction",boost::bind(&MoleculeListClass::eraseMolecule,molecules));2531 new ActionMenuItem('r',"remove a molecule",editMoleculesMenu,eraseMoleculeAction);2532 2533 }2534 2535 2536 2439 /********************************************** Main routine **************************************/ 2537 2440 2538 void cleanUp(config *configuration){ 2539 UIFactory::purgeInstance(); 2441 void cleanUp(){ 2540 2442 World::purgeInstance(); 2541 delete(configuration);2542 Log() << Verbose(0) << "Maximum of allocated memory: "2543 << MemoryUsageObserver::getInstance()->getMaximumUsedMemory() << endl;2544 Log() << Verbose(0) << "Remaining non-freed memory: "2545 << MemoryUsageObserver::getInstance()->getUsedMemorySize() << endl;2546 MemoryUsageObserver::purgeInstance();2547 2443 logger::purgeInstance(); 2548 2444 errorLogger::purgeInstance(); 2445 UIFactory::purgeInstance(); 2446 MapOfActions::purgeInstance(); 2447 CommandLineParser::purgeInstance(); 2549 2448 ActionRegistry::purgeInstance(); 2550 2449 ActionHistory::purgeInstance(); … … 2554 2453 int main(int argc, char **argv) 2555 2454 { 2455 config *configuration = World::getInstance().getConfig(); 2556 2456 // while we are non interactive, we want to abort from asserts 2557 2457 //ASSERT_DO(Assert::Abort); 2558 2458 molecule *mol = NULL; 2559 config *configuration = new config;2560 2459 Vector x, y, z, n; 2561 2460 ifstream test; 2562 2461 ofstream output; 2563 2462 string line; 2564 char *ConfigFileName = NULL; 2565 int j; 2566 2463 char **Arguments = NULL; 2464 int ArgcSize = 0; 2465 int ExitFlag = 0; 2466 bool ArgumentsCopied = false; 2467 char *ConfigFileName = new char[MAXSTRINGSIZE]; 2468 2469 // print version check whether arguments are present at all 2567 2470 cout << ESPACKVersion << endl; 2471 if (argc < 2) { 2472 cout << "Obtain help with " << argv[0] << " -h." << endl; 2473 cleanUp(); 2474 Memory::getState(); 2475 return(1); 2476 } 2477 2568 2478 2569 2479 setVerbosity(0); 2570 2480 // need to init the history before any action is created 2571 2481 ActionHistory::init(); 2572 /* structure of ParseCommandLineOptions will be refactored later */2573 j = ParseCommandLineOptions(argc, argv, World::getInstance().getMolecules(), World::getInstance().getPeriode(), *configuration, ConfigFileName);2574 switch (j){2575 case 255:2576 case 2:2577 case 1:2578 cleanUp(configuration);2579 return (j == 1 ? 0 : j);2580 default:2581 break;2582 }2583 if(World::getInstance().numMolecules() == 0){2584 mol = World::getInstance().createMolecule();2585 World::getInstance().getMolecules()->insert(mol);2586 cout << "Molecule created" << endl;2587 if(World::getInstance().getDomain()[0] == 0.){2588 Log() << Verbose(0) << "enter lower tridiagonal form of basis matrix" << endl << endl;2589 for(int i = 0;i < 6;i++){2590 Log() << Verbose(1) << "Cell size" << i << ": ";2591 cin >> World::getInstance().getDomain()[i];2592 }2593 }2594 mol->ActiveFlag = true;2595 }2596 2482 2597 2483 // In the interactive mode, we can leave the user the choice in case of error 2598 2484 ASSERT_DO(Assert::Ask); 2599 2485 2486 // from this moment on, we need to be sure to deeinitialize in the correct order 2487 // this is handled by the cleanup function 2488 atexit(cleanUp); 2489 2490 // Parse command line options and if present create respective UI 2600 2491 { 2601 cout << ESPACKVersion << endl; 2602 2603 setVerbosity(0); 2604 2605 menuPopulaters populaters; 2606 populaters.MakeEditMoleculesMenu = populateEditMoleculesMenu; 2607 2608 UIFactory::makeUserInterface(UIFactory::Text); 2609 MainWindow *mainWindow = UIFactory::getInstance().makeMainWindow(populaters,World::getInstance().getMolecules(), configuration, World::getInstance().getPeriode(), ConfigFileName); 2492 set<int> ArgcList; 2493 ArgcList.insert(0); // push back program! 2494 ArgcList.insert(1); // push back config file name 2495 // handle arguments by ParseCommandLineOptions() 2496 ExitFlag = ParseCommandLineOptions(argc,argv,World::getInstance().getMolecules(),World::getInstance().getPeriode(),*World::getInstance().getConfig(), &ConfigFileName, ArgcList); 2497 // copy all remaining arguments to a new argv 2498 Arguments = new char *[ArgcList.size()]; 2499 cout << "The following arguments are handled by CommandLineParser: "; 2500 for (set<int>::iterator ArgcRunner = ArgcList.begin(); ArgcRunner != ArgcList.end(); ++ArgcRunner) { 2501 Arguments[ArgcSize] = new char[strlen(argv[*ArgcRunner])+2]; 2502 strcpy(Arguments[ArgcSize], argv[*ArgcRunner]); 2503 cout << " " << argv[*ArgcRunner]; 2504 ArgcSize++; 2505 } 2506 cout << endl; 2507 ArgumentsCopied = true; 2508 // handle remaining arguments by CommandLineParser 2509 MapOfActions::getInstance().AddOptionsToParser(); 2510 CommandLineParser::getInstance().Run(ArgcSize,Arguments); 2511 if (!CommandLineParser::getInstance().isEmpty()) { 2512 DoLog(0) && (Log() << Verbose(0) << "Setting UI to CommandLine." << endl); 2513 UIFactory::makeUserInterface(UIFactory::CommandLine); 2514 } else { 2515 DoLog(0) && (Log() << Verbose(0) << "Setting UI to Text." << endl); 2516 UIFactory::makeUserInterface(UIFactory::Text); 2517 } 2518 } 2519 2520 { 2521 MainWindow *mainWindow = UIFactory::getInstance().makeMainWindow(); 2610 2522 mainWindow->display(); 2611 2523 delete mainWindow; 2612 2524 } 2613 2525 2614 if(World::getInstance().getPeriode()->StorePeriodentafel(configuration->databasepath)) 2615 Log() << Verbose(0) << "Saving of elements.db successful." << endl; 2616 2617 else 2618 Log() << Verbose(0) << "Saving of elements.db failed." << endl; 2619 2620 cleanUp(configuration); 2621 2622 return (0); 2526 Log() << Verbose(0) << "Saving to " << ConfigFileName << "." << endl; 2527 World::getInstance().getConfig()->SaveAll(ConfigFileName, World::getInstance().getPeriode(), World::getInstance().getMolecules()); 2528 2529 // free the new argv 2530 if (ArgumentsCopied) { 2531 for (int i=0; i<ArgcSize;i++) 2532 delete[](Arguments[i]); 2533 delete[](Arguments); 2534 } 2535 delete[](ConfigFileName); 2536 2537 return (ExitFlag == 1 ? 0 : ExitFlag); 2623 2538 } 2624 2539 -
src/config.cpp
ra7b761b r1024cb 14 14 #include "element.hpp" 15 15 #include "helpers.hpp" 16 #include "info.hpp" 16 17 #include "lists.hpp" 17 18 #include "log.hpp" … … 93 94 return; 94 95 } else 95 buffer = Malloc<char*>(NoLines, "ConfigFileBuffer::ConfigFileBuffer: **buffer");96 buffer = new char *[NoLines]; 96 97 97 98 // scan each line and put into buffer … … 99 100 int i; 100 101 do { 101 buffer[lines] = Malloc<char>(MAXSTRINGSIZE, "ConfigFileBuffer::ConfigFileBuffer: *buffer[]");102 buffer[lines] = new char[MAXSTRINGSIZE]; 102 103 file->getline(buffer[lines], MAXSTRINGSIZE-1); 103 104 i = strlen(buffer[lines]); … … 119 120 { 120 121 for(int i=0;i<NoLines;++i) 121 Free(&buffer[i]);122 Free(&buffer);123 Free(&LineMapping);122 delete[](buffer[i]); 123 delete[](buffer); 124 delete[](LineMapping); 124 125 } 125 126 … … 129 130 void ConfigFileBuffer::InitMapping() 130 131 { 131 LineMapping = Malloc<int>(NoLines, "ConfigFileBuffer::InitMapping: *LineMapping");132 LineMapping = new int[NoLines]; 132 133 for (int i=0;i<NoLines;i++) 133 134 LineMapping[i] = i; … … 179 180 MaxLevel(5), RiemannTensor(0), LevRFactor(0), RiemannLevel(0), Lev0Factor(2), RTActualUse(0), AddPsis(0), RCut(20.), StructOpt(0), IsAngstroem(1), RelativeCoord(0), 180 181 MaxTypes(0) { 181 mainname = Malloc<char>(MAXSTRINGSIZE,"config constructor: mainname");182 defaultpath = Malloc<char>(MAXSTRINGSIZE,"config constructor: defaultpath");183 pseudopotpath = Malloc<char>(MAXSTRINGSIZE,"config constructor: pseudopotpath");184 databasepath = Malloc<char>(MAXSTRINGSIZE,"config constructor: databasepath");185 configpath = Malloc<char>(MAXSTRINGSIZE,"config constructor: configpath");186 configname = Malloc<char>(MAXSTRINGSIZE,"config constructor: configname");182 mainname = new char[MAXSTRINGSIZE]; 183 defaultpath = new char[MAXSTRINGSIZE]; 184 pseudopotpath = new char[MAXSTRINGSIZE]; 185 databasepath = new char[MAXSTRINGSIZE]; 186 configpath = new char[MAXSTRINGSIZE]; 187 configname = new char[MAXSTRINGSIZE]; 187 188 strcpy(mainname,"pcp"); 188 189 strcpy(defaultpath,"not specified"); … … 199 200 config::~config() 200 201 { 201 Free(&mainname);202 Free(&defaultpath);203 Free(&pseudopotpath);204 Free(&databasepath);205 Free(&configpath);206 Free(&configname);207 Free(&ThermostatImplemented);202 delete[](mainname); 203 delete[](defaultpath); 204 delete[](pseudopotpath); 205 delete[](databasepath); 206 delete[](configpath); 207 delete[](configname); 208 delete[](ThermostatImplemented); 208 209 for (int j=0;j<MaxThermostats;j++) 209 Free(&ThermostatNames[j]);210 Free(&ThermostatNames);210 delete[](ThermostatNames[j]); 211 delete[](ThermostatNames); 211 212 212 213 if (BG != NULL) … … 218 219 void config::InitThermostats() 219 220 { 220 ThermostatImplemented = Malloc<int>(MaxThermostats, "config constructor: *ThermostatImplemented");221 ThermostatNames = Malloc<char*>(MaxThermostats, "config constructor: *ThermostatNames");221 ThermostatImplemented = new int[MaxThermostats]; 222 ThermostatNames = new char *[MaxThermostats]; 222 223 for (int j=0;j<MaxThermostats;j++) 223 ThermostatNames[j] = Malloc<char>(12, "config constructor: ThermostatNames[]");224 ThermostatNames[j] = new char[12]; 224 225 225 226 strcpy(ThermostatNames[0],"None"); … … 242 243 void config::ParseThermostats(class ConfigFileBuffer * const fb) 243 244 { 244 char * const thermo = Malloc<char>(12, "IonsInitRead: thermo");245 char * const thermo = new char[12]; 245 246 const int verbose = 0; 246 247 … … 309 310 Thermostat = None; 310 311 } 311 Free(thermo);312 delete[](thermo); 312 313 }; 313 314 … … 1560 1561 1561 1562 for (MoleculeList::const_iterator MolRunner = MolList->ListOfMolecules.begin(); MolRunner != MolList->ListOfMolecules.end(); MolRunner++) { 1562 int *elementNo = Calloc<int>(MAX_ELEMENTS, "config::SavePDB - elementNo"); 1563 int *elementNo = new int[MAX_ELEMENTS]; 1564 for (int i=0;i<MAX_ELEMENTS;i++) 1565 elementNo[i] = 0; 1563 1566 AtomNo = 0; 1564 1567 for (molecule::const_iterator iter = (*MolRunner)->begin(); iter != (*MolRunner)->end(); ++iter) { … … 1582 1585 AtomNo++; 1583 1586 } 1584 Free(&elementNo);1587 delete[](elementNo); 1585 1588 MolNo++; 1586 1589 } … … 1600 1603 FILE *f = NULL; 1601 1604 1602 int *elementNo = Calloc<int>(MAX_ELEMENTS, "config::SavePDB - elementNo"); 1605 int *elementNo = new int[MAX_ELEMENTS]; 1606 for (int i=0;i<MAX_ELEMENTS;i++) 1607 elementNo[i] = 0; 1603 1608 char name[MAXSTRINGSIZE]; 1604 1609 strncpy(name, filename, MAXSTRINGSIZE-1); … … 1607 1612 if (f == NULL) { 1608 1613 DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open pdb output file:" << name << endl); 1609 Free(&elementNo);1614 delete[](elementNo); 1610 1615 return false; 1611 1616 } … … 1634 1639 } 1635 1640 fclose(f); 1636 Free(&elementNo);1641 delete[](elementNo); 1637 1642 1638 1643 return true; … … 1697 1702 bool config::SaveTREMOLO(const char * const filename, const MoleculeListClass * const MolList) const 1698 1703 { 1704 Info FunctionInfo(__func__); 1699 1705 ofstream *output = NULL; 1700 1706 stringstream * const fname = new stringstream; … … 1720 1726 1721 1727 // create global to local id map 1722 int **LocalNotoGlobalNoMap = Calloc<int *>(MolList->ListOfMolecules.size(), "config::SaveTREMOLO - **LocalNotoGlobalNoMap");1728 map<int, int> LocalNotoGlobalNoMap; 1723 1729 { 1724 int MolCounter = 0;1725 int AtomNo = 0;1730 unsigned int MolCounter = 0; 1731 int AtomNo = 1; 1726 1732 for (MoleculeList::const_iterator MolWalker = MolList->ListOfMolecules.begin(); MolWalker != MolList->ListOfMolecules.end(); MolWalker++) { 1727 LocalNotoGlobalNoMap[MolCounter] = Calloc<int>(MolList->CountAllAtoms(), "config::SaveTREMOLO - *LocalNotoGlobalNoMap[]"); 1728 1729 (*MolWalker)->SetIndexedArrayForEachAtomTo( LocalNotoGlobalNoMap[MolCounter], &atom::nr, IncrementalAbsoluteValue, &AtomNo); 1730 1733 for(molecule::iterator AtomRunner = (*MolWalker)->begin(); AtomRunner != (*MolWalker)->end(); ++AtomRunner) { 1734 LocalNotoGlobalNoMap.insert( pair<int,int>((*AtomRunner)->getId(), AtomNo++) ); 1735 } 1731 1736 MolCounter++; 1732 1737 } 1738 ASSERT(MolCounter == MolList->ListOfMolecules.size(), "SaveTREMOLO: LocalNotoGlobalNoMap[] has not been correctly initialized for each molecule"); 1733 1739 } 1734 1740 … … 1739 1745 for (MoleculeList::const_iterator MolWalker = MolList->ListOfMolecules.begin(); MolWalker != MolList->ListOfMolecules.end(); MolWalker++) { 1740 1746 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 1741 *output << AtomNo+1<< "\t";1747 *output << LocalNotoGlobalNoMap[ (*iter)->getId() ] << "\t"; 1742 1748 *output << (*iter)->getName() << "\t"; 1743 1749 *output << (*MolWalker)->name << "\t"; … … 1747 1753 *output << (*iter)->type->symbol << "\t"; 1748 1754 for (BondList::iterator runner = (*iter)->ListOfBonds.begin(); runner != (*iter)->ListOfBonds.end(); runner++) 1749 *output << LocalNotoGlobalNoMap[ MolCounter][ (*runner)->GetOtherAtom(*iter)->nr ]+1<< "\t";1755 *output << LocalNotoGlobalNoMap[ (*runner)->GetOtherAtom((*iter))->getId() ] << "\t"; 1750 1756 for(int i=(*iter)->ListOfBonds.size(); i < MaxNeighbours; i++) 1751 1757 *output << "-\t"; … … 1762 1768 delete(output); 1763 1769 delete(fname); 1764 for(size_t i=0;i<MolList->ListOfMolecules.size(); i++)1765 Free(&LocalNotoGlobalNoMap[i]);1766 Free(&LocalNotoGlobalNoMap);1767 1770 1768 1771 return true; … … 1792 1795 if (output == NULL) 1793 1796 strcpy(filename,"main_pcp_linux"); 1794 Log() << Verbose(0) << "Saving as pdb input ";1797 Log() << Verbose(0) << "Saving as pdb input ... " << endl; 1795 1798 if (SavePDB(filename, molecules)) 1796 Log() << Verbose(0) << " done." << endl;1799 Log() << Verbose(0) << "\t... done." << endl; 1797 1800 else 1798 Log() << Verbose(0) << " failed." << endl;1801 Log() << Verbose(0) << "\t... failed." << endl; 1799 1802 1800 1803 // then save as tremolo data file … … 1803 1806 if (output == NULL) 1804 1807 strcpy(filename,"main_pcp_linux"); 1805 Log() << Verbose(0) << "Saving as tremolo data input ";1808 Log() << Verbose(0) << "Saving as tremolo data input ... " << endl; 1806 1809 if (SaveTREMOLO(filename, molecules)) 1807 Log() << Verbose(0) << " done." << endl;1810 Log() << Verbose(0) << "\t... done." << endl; 1808 1811 else 1809 Log() << Verbose(0) << " failed." << endl;1812 Log() << Verbose(0) << "\t... failed." << endl; 1810 1813 1811 1814 // translate each to its center and merge all molecules in MoleculeListClass into this molecule … … 1843 1846 output.close(); 1844 1847 output.clear(); 1845 Log() << Verbose(0) << "Saving of config file ";1848 Log() << Verbose(0) << "Saving of config file ... " << endl; 1846 1849 if (Save(filename, periode, mol)) 1847 Log() << Verbose(0) << " successful." << endl;1850 Log() << Verbose(0) << "\t... successful." << endl; 1848 1851 else 1849 Log() << Verbose(0) << " failed." << endl;1852 Log() << Verbose(0) << "\t... failed." << endl; 1850 1853 1851 1854 // and save to xyz file … … 1860 1863 output.open(filename, ios::trunc); 1861 1864 } 1862 Log() << Verbose(0) << "Saving of XYZ file ";1865 Log() << Verbose(0) << "Saving of XYZ file ... " << endl; 1863 1866 if (mol->MDSteps <= 1) { 1864 1867 if (mol->OutputXYZ(&output)) 1865 Log() << Verbose(0) << " successful." << endl;1868 Log() << Verbose(0) << "\t... successful." << endl; 1866 1869 else 1867 Log() << Verbose(0) << " failed." << endl;1870 Log() << Verbose(0) << "\t... failed." << endl; 1868 1871 } else { 1869 1872 if (mol->OutputTrajectoriesXYZ(&output)) 1870 Log() << Verbose(0) << " successful." << endl;1873 Log() << Verbose(0) << "\t... successful." << endl; 1871 1874 else 1872 Log() << Verbose(0) << " failed." << endl;1875 Log() << Verbose(0) << "\t... failed." << endl; 1873 1876 } 1874 1877 output.close(); … … 1880 1883 if (output == NULL) 1881 1884 strcpy(filename,"main_pcp_linux"); 1882 Log() << Verbose(0) << "Saving as mpqc input ";1885 Log() << Verbose(0) << "Saving as mpqc input .. " << endl; 1883 1886 if (SaveMPQC(filename, mol)) 1884 Log() << Verbose(0) << " done." << endl;1887 Log() << Verbose(0) << "\t... done." << endl; 1885 1888 else 1886 Log() << Verbose(0) << " failed." << endl;1889 Log() << Verbose(0) << "\t... failed." << endl; 1887 1890 1888 1891 if (!strcmp(configpath, GetDefaultPath())) { … … 1922 1925 char *dummy1 = NULL; 1923 1926 char *dummy = NULL; 1924 char * const free_dummy = Malloc<char>(256, "config::ParseForParameter: *free_dummy"); // pointers in the line that is read in per step1927 char free_dummy[MAXSTRINGSIZE]; // pointers in the line that is read in per step 1925 1928 dummy1 = free_dummy; 1926 1929 … … 1938 1941 if (file->eof()) { 1939 1942 if ((critical) && (found == 0)) { 1940 Free(free_dummy);1941 1943 //Error(InitReading, name); 1942 1944 fprintf(stderr,"Error:InitReading, critical %s not found\n", name); … … 1946 1948 file->clear(); 1947 1949 file->seekg(file_position, ios::beg); // rewind to start position 1948 Free(free_dummy);1949 1950 return 0; 1950 1951 } … … 1977 1978 dummy = strchr(dummy1, '\n'); // set on line end then (whole line = keyword) 1978 1979 //fprintf(stderr,"Error: Cannot find tabs or spaces on line %i in search for %s\n", line, name); 1979 //Free((void **)&free_dummy);1980 1980 //Error(FileOpenParams, NULL); 1981 1981 } else { … … 1998 1998 if (file->eof()) { 1999 1999 if ((critical) && (found == 0)) { 2000 Free(free_dummy);2001 2000 //Error(InitReading, name); 2002 2001 fprintf(stderr,"Error:InitReading, critical %s not found\n", name); … … 2006 2005 file->clear(); 2007 2006 file->seekg(file_position, ios::beg); // rewind to start position 2008 Free(free_dummy);2009 2007 return 0; 2010 2008 } … … 2047 2045 if (critical) { 2048 2046 if (verbose) fprintf(stderr,"Error: EoL at %i and still missing %i value(s) for parameter %s\n", line, yth-j, name); 2049 Free(free_dummy);2050 2047 //return 0; 2051 2048 exit(255); … … 2055 2052 file->clear(); 2056 2053 file->seekg(file_position, ios::beg); // rewind to start position 2057 Free(free_dummy);2058 2054 return 0; 2059 2055 } … … 2068 2064 file->seekg(file_position, ios::beg); // rewind to start position 2069 2065 } 2070 Free(free_dummy);2071 2066 return 0; 2072 2067 } … … 2124 2119 if ((type >= row_int) && (verbose)) 2125 2120 fprintf(stderr,"\n"); 2126 Free(free_dummy);2127 2121 if (!sequential) { 2128 2122 file->clear(); … … 2205 2199 dummy = strchr(dummy1, '\n'); // set on line end then (whole line = keyword) 2206 2200 //fprintf(stderr,"Error: Cannot find tabs or spaces on line %i in search for %s\n", line, name); 2207 //Free(&free_dummy);2208 2201 //Error(FileOpenParams, NULL); 2209 2202 } else { -
src/elements.db
-
Property mode
changed from
100755
to100644
ra7b761b r1024cb 2 2 #Element Name Symbol Period Group Block Atomic Number AtomicWeight Covalent Radius vdW Radius 3 3 Hydrogen H 1 1 s 1 1.008 0.23 1.09 4 Helium He 1 18 p 2 4.003 1.5 0 1.404 Helium He 1 18 p 2 4.003 1.5 1.4 5 5 Lithium Li 2 1 s 3 6.941 0.68 1.82 6 Beryllium Be 2 2 s 4 9.012 0.35 2 .007 Boron B 2 13 p 5 10.811 0.83 2 .008 Carbon C 2 14 p 6 12.011 0.68 1.7 06 Beryllium Be 2 2 s 4 9.012 0.35 2 7 Boron B 2 13 p 5 10.811 0.83 2 8 Carbon C 2 14 p 6 12.011 0.68 1.7 9 9 Nitrogen N 2 15 p 7 14.007 0.68 1.55 10 10 Oxygen O 2 16 p 8 15.999 0.68 1.52 11 11 Fluorine F 2 17 p 9 18.998 0.64 1.47 12 Neon Ne 2 18 p 10 20.18 0 1.501.5412 Neon Ne 2 18 p 10 20.18 1.5 1.54 13 13 Sodium Na 3 1 s 11 22.991 0.97 2.27 14 Magnesium Mg 3 2 s 12 24.305 1.1 01.7315 Aluminium Al 3 13 p 13 26.982 1.35 2 .0016 Silicon Si 3 14 p 14 28.086 1.2 0 2.1017 Phosphorus P 3 15 p 15 30.974 1.05 1.8 018 Sulphur S 3 16 p 16 32.066 1.02 1.8 014 Magnesium Mg 3 2 s 12 24.305 1.1 1.73 15 Aluminium Al 3 13 p 13 26.982 1.35 2 16 Silicon Si 3 14 p 14 28.086 1.2 2.1 17 Phosphorus P 3 15 p 15 30.974 1.05 1.8 18 Sulphur S 3 16 p 16 32.066 1.02 1.8 19 19 Chlorine Cl 3 17 p 17 35.453 0.99 1.75 20 20 Argon Ar 3 18 p 18 39.948 1.51 1.88 21 21 Potassium K 4 1 s 19 39.098 1.33 2.75 22 Calcium Ca 4 2 s 20 40.078 0.99 2 .0023 Scandium Sc 4 3 d 21 44.956 1.44 2 .0024 Titanium Ti 4 4 d 22 47.867 1.47 2 .0025 Vanadium V 4 5 d 23 50.942 1.33 2 .0026 Chromium Cr 4 6 d 24 51.996 1.35 2 .0027 Manganese Mn 4 7 d 25 54.938 1.35 2 .0028 Iron Fe 4 8 d 26 55.845 1.34 2 .0029 Cobalt Co 4 9 d 27 58.933 1.33 2 .0030 Nickel Ni 4 10 d 28 58.693 1.5 01.6331 Copper Cu 4 11 d 29 63.546 1.52 1.4 032 Zinc Zn 4 12 d 30 65.39 01.45 1.3922 Calcium Ca 4 2 s 20 40.078 0.99 2 23 Scandium Sc 4 3 d 21 44.956 1.44 2 24 Titanium Ti 4 4 d 22 47.867 1.47 2 25 Vanadium V 4 5 d 23 50.942 1.33 2 26 Chromium Cr 4 6 d 24 51.996 1.35 2 27 Manganese Mn 4 7 d 25 54.938 1.35 2 28 Iron Fe 4 8 d 26 55.845 1.34 2 29 Cobalt Co 4 9 d 27 58.933 1.33 2 30 Nickel Ni 4 10 d 28 58.693 1.5 1.63 31 Copper Cu 4 11 d 29 63.546 1.52 1.4 32 Zinc Zn 4 12 d 30 65.39 1.45 1.39 33 33 Gallium Ga 4 13 p 31 69.723 1.22 1.87 34 Germanium Ge 4 14 p 32 72.61 0 1.17 2.0034 Germanium Ge 4 14 p 32 72.61 1.17 2 35 35 Arsenic As 4 15 p 33 74.922 1.21 1.85 36 Selenium Se 4 16 p 34 78.96 0 1.22 1.9036 Selenium Se 4 16 p 34 78.96 1.22 1.9 37 37 Bromine Br 4 17 p 35 79.904 1.21 1.85 38 Krypton Kr 4 18 p 36 83.8 00 1.502.0239 Rubidium Rb 5 1 s 37 85.468 1.47 2 .0040 Strontium Sr 5 2 s 38 87.62 0 1.12 2.0041 Yttrium Y 5 3 d 39 88.906 1.78 2 .0042 Zirconium Zr 5 4 d 40 91.224 1.56 2 .0043 Niobium Nb 5 5 d 41 92.906 1.48 2 .0044 Molybdenum Mo 5 6 d 42 95.94 0 1.47 2.0045 Technetium Tc 5 7 d 43 98 1.35 2 .0046 Ruthenium Ru 5 8 d 44 101.07 0 1.40 2.0047 Rhodium Rh 5 9 d 45 102.906 1.45 2 .0048 Palladium Pd 5 10 d 46 106.42 0 1.501.6338 Krypton Kr 4 18 p 36 83.8 1.5 2.02 39 Rubidium Rb 5 1 s 37 85.468 1.47 2 40 Strontium Sr 5 2 s 38 87.62 1.12 2 41 Yttrium Y 5 3 d 39 88.906 1.78 2 42 Zirconium Zr 5 4 d 40 91.224 1.56 2 43 Niobium Nb 5 5 d 41 92.906 1.48 2 44 Molybdenum Mo 5 6 d 42 95.94 1.47 2 45 Technetium Tc 5 7 d 43 98 1.35 2 46 Ruthenium Ru 5 8 d 44 101.07 1.4 2 47 Rhodium Rh 5 9 d 45 102.906 1.45 2 48 Palladium Pd 5 10 d 46 106.42 1.5 1.63 49 49 Silver Ag 5 11 d 47 107.868 1.59 1.72 50 50 Cadmium Cd 5 12 d 48 112.411 1.69 1.58 51 51 Indium In 5 13 p 49 114.818 1.63 1.93 52 52 Tin Sn 5 14 p 50 118.71 1.46 2.17 53 Antimony Sb 5 15 p 51 121.760 1.46 2.00 54 Tellurium Te 5 16 p 52 127.600 1.47 2.06 55 Iodine I 5 17 p 53 126.904 1.40 1.98 56 Xenon Xe 5 18 p 54 131.290 1.50 2.16 57 Caesium Cs 6 1 s 55 132.905 1.67 2.00 58 Barium Ba 6 2 s 56 137.327 1.34 2.00 59 Lutetium Lu 6 3 d 71 174.967 1.72 2.00 60 Hafnium Hf 6 4 d 72 178.490 1.57 2.00 61 Tantalum Ta 6 5 d 73 180.948 1.43 2.00 62 Tungsten W 6 6 d 74 183.840 1.37 2.00 63 Rhenium Re 6 7 d 75 186.207 1.35 2.00 64 Osmium Os 6 8 d 76 190.230 1.37 2.00 65 Iridium Ir 6 9 d 77 192.217 1.32 2.00 66 Platinum Pt 6 10 d 78 195.078 1.50 1.72 67 Gold Au 6 11 d 79 196.967 1.50 1.66 68 Mercury Hg 6 12 d 80 200.590 1.70 1.55 53 Antimony Sb 5 15 p 51 121.76 1.46 2 54 Tellurium Te 5 16 p 52 127.6 1.47 2.06 55 Iodine I 5 17 p 53 126.904 1.4 1.98 56 Xenon Xe 5 18 p 54 131.29 1.5 2.16 57 Caesium Cs 6 1 s 55 132.905 1.67 2 58 Barium Ba 6 2 s 56 137.327 1.34 2 59 Lanthanum La 6Lan 19 f 57 138.906 1.87 2 60 Cerium Ce 6Lan 19 f 58 140.116 1.83 2 61 Praseodymium Pr 6Lan 19 f 59 140.908 1.82 2 62 Neodymium Nd 6Lan 19 f 60 144.24 1.81 2 63 Promethium Pm 6Lan 19 f 61 145 1.8 2 64 Samarium Sm 6Lan 19 f 62 150.36 1.8 2 65 Europium Eu 6Lan 19 f 63 151.964 1.99 2 66 Gadolinium Gd 6Lan 19 f 64 157.25 1.79 2 67 Terbium Tb 6Lan 19 f 65 158.925 1.76 2 68 Dysprosium Dy 6Lan 19 f 66 162.5 1.75 2 69 Holmium Ho 6Lan 19 f 67 164.93 1.74 2 70 Erbium Er 6Lan 19 f 68 167.26 1.73 2 71 Thulium Tm 6Lan 19 f 69 168.934 1.72 2 72 Ytterbium Yb 6Lan 19 f 70 173.04 1.94 2 73 Lutetium Lu 6 3 d 71 174.967 1.72 2 74 Hafnium Hf 6 4 d 72 178.49 1.57 2 75 Tantalum Ta 6 5 d 73 180.948 1.43 2 76 Tungsten W 6 6 d 74 183.84 1.37 2 77 Rhenium Re 6 7 d 75 186.207 1.35 2 78 Osmium Os 6 8 d 76 190.23 1.37 2 79 Iridium Ir 6 9 d 77 192.217 1.32 2 80 Platinum Pt 6 10 d 78 195.078 1.5 1.72 81 Gold Au 6 11 d 79 196.967 1.5 1.66 82 Mercury Hg 6 12 d 80 200.59 1.7 1.55 69 83 Thallium Tl 6 13 p 81 204.383 1.55 1.96 70 Lead Pb 6 14 p 82 207.200 1.54 2.02 71 Bismuth Bi 6 15 p 83 208.980 1.54 2.00 72 Polonium Po 6 16 p 84 210 1.68 2.00 73 Astatine At 6 17 p 85 210 1.21 2.00 74 Radon Rn 6 18 p 86 222 1.50 2.00 75 Cerium Ce 6Lan 19 f 58 140.116 1.83 2.00 76 Dysprosium Dy 6Lan 19 f 66 162.500 1.75 2.00 77 Erbium Er 6Lan 19 f 68 167.260 1.73 2.00 78 Europium Eu 6Lan 19 f 63 151.964 1.99 2.00 79 Gadolinium Gd 6Lan 19 f 64 157.250 1.79 2.00 80 Holmium Ho 6Lan 19 f 67 164.930 1.74 2.00 81 Lanthanum La 6Lan 19 f 57 138.906 1.87 2.00 82 Neodymium Nd 6Lan 19 f 60 144.240 1.81 2.00 83 Promethium Pm 6Lan 19 f 61 145 1.80 2.00 84 Praseodymium Pr 6Lan 19 f 59 140.908 1.82 2.00 85 Samarium Sm 6Lan 19 f 62 150.360 1.80 2.00 86 Terbium Tb 6Lan 19 f 65 158.925 1.76 2.00 87 Thulium Tm 6Lan 19 f 69 168.934 1.72 2.00 88 Ytterbium Yb 6Lan 19 f 70 173.040 1.94 2.00 89 Francium Fr 7 1 s 87 223 1.50 2.00 90 Radium Ra 7 2 s 88 226 1.90 2.00 91 Lawrencium Lr 7 3 d 103 262 1.50 2.00 92 Rutherfordium Rf 7 4 d 104 261 1.50 2.00 93 Dubnium Db 7 5 d 105 262 1.50 2.00 94 Seaborgium Sg 7 6 d 106 266 1.50 2.00 95 Bohrium Bh 7 7 d 107 264 1.50 2.00 96 Hassium Hs 7 8 d 108 269 1.50 2.00 97 Meitnerium Mt 7 9 d 109 268 1.50 2.00 98 Darmstadtium Ds 7 10 d 110 271 1.50 2.00 99 Actinium Ac 7Act 20 f 89 227 1.88 2.00 100 Americium Am 7Act 20 f 95 243 1.51 2.00 101 Berkelium Bk 7Act 20 f 97 247 1.54 2.00 102 Californium Cf 7Act 20 f 98 251 1.83 2.00 103 Curium Cm 7Act 20 f 96 247 0.99 2.00 104 Einsteinium Es 7Act 20 f 99 252 1.50 2.00 105 Fermium Fm 7Act 20 f 100 257 1.50 2.00 106 Mendelevium Md 7Act 20 f 101 258 1.50 2.00 107 Nobelium No 7Act 20 f 102 259 1.50 2.00 108 Neptunium Np 7Act 20 f 93 237 1.55 2.00 109 Protactinium Pa 7Act 20 f 91 231.036 1.61 2.00 110 Plutonium Pu 7Act 20 f 94 244 1.53 2.00 111 Thorium Th 7Act 20 f 90 232.038 1.79 2.00 84 Lead Pb 6 14 p 82 207.2 1.54 2.02 85 Bismuth Bi 6 15 p 83 208.98 1.54 2 86 Polonium Po 6 16 p 84 210 1.68 2 87 Astatine At 6 17 p 85 210 1.21 2 88 Radon Rn 6 18 p 86 222 1.5 2 89 Francium Fr 7 1 s 87 223 1.5 2 90 Radium Ra 7 2 s 88 226 1.9 2 91 Actinium Ac 7Act 20 f 89 227 1.88 2 92 Thorium Th 7Act 20 f 90 232.038 1.79 2 93 Protactinium Pa 7Act 20 f 91 231.036 1.61 2 112 94 Uranium U 7Act 20 f 92 238.029 1.58 1.86 95 Neptunium Np 7Act 20 f 93 237 1.55 2 96 Plutonium Pu 7Act 20 f 94 244 1.53 2 97 Americium Am 7Act 20 f 95 243 1.51 2 98 Curium Cm 7Act 20 f 96 247 0.99 2 99 Berkelium Bk 7Act 20 f 97 247 1.54 2 100 Californium Cf 7Act 20 f 98 251 1.83 2 101 Einsteinium Es 7Act 20 f 99 252 1.5 2 102 Fermium Fm 7Act 20 f 100 257 1.5 2 103 Mendelevium Md 7Act 20 f 101 258 1.5 2 104 Nobelium No 7Act 20 f 102 259 1.5 2 105 Lawrencium Lr 7 3 d 103 262 1.5 2 106 Rutherfordium Rf 7 4 d 104 261 1.5 2 107 Dubnium Db 7 5 d 105 262 1.5 2 108 Seaborgium Sg 7 6 d 106 266 1.5 2 109 Bohrium Bh 7 7 d 107 264 1.5 2 110 Hassium Hs 7 8 d 108 269 1.5 2 111 Meitnerium Mt 7 9 d 109 268 1.5 2 112 Darmstadtium Ds 7 10 d 110 271 1.5 2 -
Property mode
changed from
-
src/helpers.cpp
ra7b761b r1024cb 58 58 int CountLinesinFile(ifstream &InputFile) 59 59 { 60 char *buffer = Malloc<char>(MAXSTRINGSIZE, "CountLinesinFile: *buffer");60 char *buffer = new char[MAXSTRINGSIZE]; 61 61 int lines=0; 62 62 … … 70 70 } 71 71 InputFile.seekg(PositionMarker, ios::beg); 72 Free(&buffer);72 delete[](buffer); 73 73 return lines; 74 74 }; … … 90 90 } 91 91 // allocate string 92 returnstring = Malloc<char>(order + 2, "FixedDigitNumber: *returnstring");92 returnstring = new char[order + 2]; 93 93 // terminate and fill string array from end backward 94 94 returnstring[order] = '\0'; … … 122 122 double * ReturnFullMatrixforSymmetric(const double * const symm) 123 123 { 124 double *matrix = Malloc<double>(NDIM * NDIM, "molecule::ReturnFullMatrixforSymmetric: *matrix");124 double *matrix = new double[NDIM * NDIM]; 125 125 matrix[0] = symm[0]; 126 126 matrix[1] = symm[1]; … … 140 140 double * InverseMatrix( const double * const A) 141 141 { 142 double *B = Malloc<double>(NDIM * NDIM, "Vector::InverseMatrix: *B");142 double *B = new double[NDIM * NDIM]; 143 143 double detA = RDET3(A); 144 144 double detAReci; … … 180 180 181 181 182 /** Allocates a memory range using malloc().183 * Prints the provided error message in case of a failure.184 *185 * \param number of memory slices of type X to allocate186 * \param failure message which is printed if the allocation fails187 * \return pointer to the allocated memory range, will be NULL if a failure occurred188 */189 template <> char* Malloc<char>(size_t size, const char* output)190 {191 char* buffer = NULL;192 buffer = (char*) malloc(sizeof(char) * (size + 1));193 for (size_t i = size; i--;)194 buffer[i] = (i % 2 == 0) ? 'p': 'c';195 buffer[size] = '\0';196 197 if (buffer != NULL) {198 MemoryUsageObserver::getInstance()->addMemory(buffer, size);199 } else {200 Log() << Verbose(0) << "Malloc for datatype " << typeid(char).name()201 << " failed - pointer is NULL: " << output << endl;202 }203 204 return buffer;205 };206 207 182 /** 208 * Frees all memory registered by the memory observer and calls exit(225) afterwards.183 * Calls exit(255). 209 184 */ 210 185 void performCriticalExit() { 211 map<void*, size_t> pointers = MemoryUsageObserver::getInstance()->getPointersToAllocatedMemory();212 for (map<void*, size_t>::iterator runner = pointers.begin(); runner != pointers.end(); runner++) {213 Free(((void**) &runner->first));214 }215 216 186 exit(255); 217 187 } -
src/helpers.hpp
ra7b761b r1024cb 83 83 }; 84 84 85 /** Creates a lookup table for true father's Atom::Nr -> atom ptr. 86 * \param *start begin of chain list 87 * \paran *end end of chain list 88 * \param **Lookuptable pointer to return allocated lookup table (should be NULL on start) 89 * \param count optional predetermined size for table (otherwise we set the count to highest true father id) 90 * \return true - success, false - failure 91 */ 92 template <typename T> bool CreateFatherLookupTable(T *start, T *end, T **&LookupTable, int count = 0) 93 { 94 bool status = true; 95 T *Walker = NULL; 96 int AtomNo; 97 98 if (LookupTable != NULL) { 99 DoLog(0) && (Log() << Verbose(0) << "Pointer for Lookup table is not NULL! Aborting ..." <<endl); 100 return false; 101 } 102 103 // count them 104 if (count == 0) { 105 Walker = start; 106 while (Walker->next != end) { // create a lookup table (Atom::nr -> atom) used as a marker table lateron 107 Walker = Walker->next; 108 count = (count < Walker->GetTrueFather()->nr) ? Walker->GetTrueFather()->nr : count; 109 } 110 } 111 if (count <= 0) { 112 DoLog(0) && (Log() << Verbose(0) << "Count of lookup list is 0 or less." << endl); 113 return false; 114 } 115 116 // allocate and fill 117 LookupTable = new T*[count]; 118 if (LookupTable == NULL) { 119 DoeLog(0) && (eLog()<< Verbose(0) << "LookupTable memory allocation failed!" << endl); 120 performCriticalExit(); 121 status = false; 122 } else { 123 Walker = start; 124 while (Walker->next != end) { // create a lookup table (Atom::nr -> atom) used as a marker table lateron 125 Walker = Walker->next; 126 AtomNo = Walker->GetTrueFather()->nr; 127 if ((AtomNo >= 0) && (AtomNo < count)) { 128 //*out << "Setting LookupTable[" << AtomNo << "] to " << *Walker << endl; 129 LookupTable[AtomNo] = Walker; 130 } else { 131 DoLog(0) && (Log() << Verbose(0) << "Walker " << *Walker << " exceeded range of nuclear ids [0, " << count << ")." << endl); 132 status = false; 133 break; 134 } 135 } 136 } 137 138 return status; 139 }; 140 141 85 142 /** Frees a two-dimensional array. 86 143 * \param *ptr pointer to array -
src/joiner.cpp
ra7b761b r1024cb 58 58 return 1; 59 59 } else { 60 dir = Malloc<char>(strlen(argv[2]) + 2, "main: *dir");60 dir = new char[strlen(argv[2]) + 2]; 61 61 strcpy(dir, "/"); 62 62 strcat(dir, argv[2]); … … 243 243 // exit 244 244 delete(periode); 245 Free(&dir);245 delete[](dir); 246 246 DoLog(0) && (Log() << Verbose(0) << "done." << endl); 247 247 return 0; -
src/molecule.cpp
ra7b761b r1024cb 293 293 Orthovector1.MatrixMultiplication(matrix); 294 294 InBondvector -= Orthovector1; // subtract just the additional translation 295 Free(&matrix);295 delete[](matrix); 296 296 bondlength = InBondvector.Norm(); 297 297 // Log() << Verbose(4) << "Corrected InBondvector is now: "; … … 302 302 InBondvector.Normalize(); 303 303 // get typical bond length and store as scale factor for later 304 ASSERT(TopOrigin->type != NULL, "AddHydrogenReplacementAtom: element of TopOrigin is not given."); 304 305 BondRescale = TopOrigin->type->HBondDistance[TopBond->BondDegree-1]; 305 306 if (BondRescale == -1) { … … 523 524 break; 524 525 } 525 Free(&matrix);526 delete[](matrix); 526 527 527 528 // Log() << Verbose(3) << "End of AddHydrogenReplacementAtom." << endl; … … 1079 1080 if (result) { 1080 1081 DoLog(5) && (Log() << Verbose(5) << "Calculating distances" << endl); 1081 Distances = Calloc<double>(getAtomCount(), "molecule::IsEqualToWithinThreshold: Distances");1082 OtherDistances = Calloc<double>(getAtomCount(), "molecule::IsEqualToWithinThreshold: OtherDistances");1082 Distances = new double[getAtomCount()]; 1083 OtherDistances = new double[getAtomCount()]; 1083 1084 SetIndexedArrayForEachAtomTo ( Distances, &atom::nr, &atom::DistanceSquaredToVector, (const Vector &)CenterOfGravity); 1084 1085 SetIndexedArrayForEachAtomTo ( OtherDistances, &atom::nr, &atom::DistanceSquaredToVector, (const Vector &)CenterOfGravity); 1086 for(int i=0;i<getAtomCount();i++) { 1087 Distances[i] = 0.; 1088 OtherDistances[i] = 0.; 1089 } 1085 1090 1086 1091 /// ... sort each list (using heapsort (o(N log N)) from GSL) 1087 1092 DoLog(5) && (Log() << Verbose(5) << "Sorting distances" << endl); 1088 PermMap = Calloc<size_t>(getAtomCount(), "molecule::IsEqualToWithinThreshold: *PermMap"); 1089 OtherPermMap = Calloc<size_t>(getAtomCount(), "molecule::IsEqualToWithinThreshold: *OtherPermMap"); 1093 PermMap = new size_t[getAtomCount()]; 1094 OtherPermMap = new size_t[getAtomCount()]; 1095 for(int i=0;i<getAtomCount();i++) { 1096 PermMap[i] = 0; 1097 OtherPermMap[i] = 0; 1098 } 1090 1099 gsl_heapsort_index (PermMap, Distances, getAtomCount(), sizeof(double), CompareDoubles); 1091 1100 gsl_heapsort_index (OtherPermMap, OtherDistances, getAtomCount(), sizeof(double), CompareDoubles); 1092 PermutationMap = Calloc<int>(getAtomCount(), "molecule::IsEqualToWithinThreshold: *PermutationMap"); 1101 PermutationMap = new int[getAtomCount()]; 1102 for(int i=0;i<getAtomCount();i++) 1103 PermutationMap[i] = 0; 1093 1104 DoLog(5) && (Log() << Verbose(5) << "Combining Permutation Maps" << endl); 1094 1105 for(int i=getAtomCount();i--;) … … 1105 1116 1106 1117 // free memory 1107 Free(&PermMap);1108 Free(&OtherPermMap);1109 Free(&Distances);1110 Free(&OtherDistances);1118 delete[](PermMap); 1119 delete[](OtherPermMap); 1120 delete[](Distances); 1121 delete[](OtherDistances); 1111 1122 if (flag) { // if not equal 1112 Free(&PermutationMap);1123 delete[](PermutationMap); 1113 1124 result = false; 1114 1125 } … … 1135 1146 { 1136 1147 DoLog(3) && (Log() << Verbose(3) << "Begin of GetFatherAtomicMap." << endl); 1137 int *AtomicMap = Malloc<int>(getAtomCount(), "molecule::GetAtomicMap: *AtomicMap");1148 int *AtomicMap = new int[getAtomCount()]; 1138 1149 for (int i=getAtomCount();i--;) 1139 1150 AtomicMap[i] = -1; … … 1150 1161 for (molecule::const_iterator runner = OtherMolecule->begin(); runner != OtherMolecule->end(); ++runner) { 1151 1162 //for (int i=0;i<AtomCount;i++) { // search atom 1152 //for (int j=0;j<OtherMolecule-> AtomCount;j++) {1163 //for (int j=0;j<OtherMolecule->getAtomCount();j++) { 1153 1164 //Log() << Verbose(4) << "Comparing father " << (*iter)->father << " with the other one " << (*runner)->father << "." << endl; 1154 1165 if ((*iter)->father == (*runner)) -
src/molecule.hpp
ra7b761b r1024cb 36 36 #include "Patterns/ObservedIterator.hpp" 37 37 #include "Patterns/Cacheable.hpp" 38 39 #include "Descriptors/MoleculeDescriptor_impl.hpp" 38 40 39 41 /****************************************** forward declarations *****************************/ … … 273 275 Vector * DetermineCenterOfGravity(); 274 276 Vector * DetermineCenterOfAll() const; 277 Vector * DetermineCenterOfBox() const; 275 278 void SetNameFromFilename(const char *filename); 276 279 void SetBoxDimension(Vector *dim); -
src/molecule_dynamics.cpp
ra7b761b r1024cb 10 10 #include "config.hpp" 11 11 #include "element.hpp" 12 #include "info.hpp" 12 13 #include "log.hpp" 13 14 #include "memoryallocator.hpp" … … 183 184 { 184 185 stringstream zeile1, zeile2; 185 int *DoubleList = Calloc<int>(AtomCount, "PrintPermutationMap: *DoubleList"); 186 int *DoubleList = new int[AtomCount]; 187 for(int i=0;i<AtomCount;i++) 188 DoubleList[i] = 0; 186 189 int doubles = 0; 187 190 zeile1 << "PermutationMap: "; … … 197 200 if (doubles >0) 198 201 DoLog(2) && (Log() << Verbose(2) << "Found " << doubles << " Doubles." << endl); 199 Free(&DoubleList);202 delete[](DoubleList); 200 203 // Log() << Verbose(2) << zeile1.str() << endl << zeile2.str() << endl; 201 204 }; … … 329 332 double Potential, OldPotential, OlderPotential; 330 333 struct EvaluatePotential Params; 331 Params.PermutationMap = Calloc<atom*>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.**PermutationMap");332 Params.DistanceList = Malloc<DistanceMap*>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.**DistanceList");333 Params.DistanceIterators = Malloc<DistanceMap::iterator>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.*DistanceIterators");334 Params.DoubleList = Calloc<int>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.*DoubleList");335 Params.StepList = Malloc<DistanceMap::iterator>(getAtomCount(), "molecule::MinimiseConstrainedPotential: Params.*StepList");334 Params.PermutationMap = new atom *[getAtomCount()]; 335 Params.DistanceList = new DistanceMap *[getAtomCount()]; 336 Params.DistanceIterators = new DistanceMap::iterator[getAtomCount()]; 337 Params.DoubleList = new int[getAtomCount()]; 338 Params.StepList = new DistanceMap::iterator[getAtomCount()]; 336 339 int round; 337 340 atom *Sprinter = NULL; 338 341 DistanceMap::iterator Rider, Strider; 342 343 // set to zero 344 for (int i=0;i<getAtomCount();i++) { 345 Params.PermutationMap[i] = NULL; 346 Params.DoubleList[i] = 0; 347 } 339 348 340 349 /// Minimise the potential … … 353 362 DoLog(1) && (Log() << Verbose(1) << "Making the PermutationMap injective ... " << endl); 354 363 MakeInjectivePermutation(this, Params); 355 Free(&Params.DoubleList);364 delete[](Params.DoubleList); 356 365 357 366 // argument minimise the constrained potential in this injective PermutationMap … … 434 443 for (int i=getAtomCount(); i--;) 435 444 Params.DistanceList[i]->clear(); 436 Free(&Params.DistanceList);437 Free(&Params.DistanceIterators);445 delete[](Params.DistanceList); 446 delete[](Params.DistanceIterators); 438 447 return ConstrainedPotential(Params); 439 448 }; … … 477 486 MinimiseConstrainedPotential(PermutationMap, startstep, endstep, configuration.GetIsAngstroem()); 478 487 else { 479 PermutationMap = Malloc<atom *>(getAtomCount(), "molecule::LinearInterpolationBetweenConfiguration: **PermutationMap");488 PermutationMap = new atom *[getAtomCount()]; 480 489 SetIndexedArrayForEachAtomTo( PermutationMap, &atom::nr ); 481 490 } … … 510 519 511 520 // store the list to single step files 512 int *SortIndex = Malloc<int>(getAtomCount(), "molecule::LinearInterpolationBetweenConfiguration: *SortIndex");521 int *SortIndex = new int[getAtomCount()]; 513 522 for (int i=getAtomCount(); i--; ) 514 523 SortIndex[i] = i; 515 524 status = MoleculePerStep->OutputConfigForListOfFragments(&configuration, SortIndex); 525 delete[](SortIndex); 516 526 517 527 // free and return 518 Free(&PermutationMap);528 delete[](PermutationMap); 519 529 delete(MoleculePerStep); 520 530 return status; … … 536 546 bool molecule::VerletForceIntegration(char *file, config &configuration) 537 547 { 548 Info FunctionInfo(__func__); 538 549 ifstream input(file); 539 550 string token; … … 576 587 ConstrainedPotentialEnergy = MinimiseConstrainedPotential(PermutationMap,configuration.DoConstrainedMD, 0, configuration.GetIsAngstroem()); 577 588 EvaluateConstrainedForces(configuration.DoConstrainedMD, 0, PermutationMap, &Force); 578 Free(&PermutationMap);589 delete[](PermutationMap); 579 590 } 580 591 581 592 // and perform Verlet integration for each atom with position, velocity and force vector 582 593 // check size of vectors 583 ActOnAllAtoms( &atom::ResizeTrajectory, MDSteps+10 );584 585 ActOnAllAtoms( &atom::VelocityVerletUpdate, MDSteps , &configuration, &Force);594 //ActOnAllAtoms( &atom::ResizeTrajectory, MDSteps+10 ); 595 596 ActOnAllAtoms( &atom::VelocityVerletUpdate, MDSteps+1, &configuration, &Force); 586 597 } 587 598 // correct velocities (rather momenta) so that center of mass remains motionless 588 599 Velocity.Zero(); 589 600 IonMass = 0.; 590 ActOnAllAtoms ( &atom::SumUpKineticEnergy, MDSteps , &IonMass, &Velocity );601 ActOnAllAtoms ( &atom::SumUpKineticEnergy, MDSteps+1, &IonMass, &Velocity ); 591 602 592 603 // correct velocities (rather momenta) so that center of mass remains motionless 593 604 Velocity.Scale(1./IonMass); 594 605 ActualTemp = 0.; 595 ActOnAllAtoms ( &atom::CorrectVelocity, &ActualTemp, MDSteps , &Velocity );606 ActOnAllAtoms ( &atom::CorrectVelocity, &ActualTemp, MDSteps+1, &Velocity ); 596 607 Thermostats(configuration, ActualTemp, Berendsen); 597 608 MDSteps++; -
src/molecule_fragmentation.cpp
ra7b761b r1024cb 92 92 GraphTestPair testGraphInsert; 93 93 int NumberOfFragments = 0; 94 char *filename = Malloc<char>(MAXSTRINGSIZE, "molecule::ParseKeySetFile - filename");94 char filename[MAXSTRINGSIZE]; 95 95 96 96 if (FragmentList == NULL) { // check list pointer … … 104 104 if (InputFile != NULL) { 105 105 // each line represents a new fragment 106 char *buffer = Malloc<char>(MAXSTRINGSIZE, "molecule::ParseKeySetFile - *buffer");106 char buffer[MAXSTRINGSIZE]; 107 107 // 1. parse keysets and insert into temp. graph 108 108 while (!InputFile.eof()) { … … 120 120 InputFile.close(); 121 121 InputFile.clear(); 122 Free(&buffer);123 122 DoLog(1) && (Log() << Verbose(1) << "done." << endl); 124 123 } else { … … 127 126 } 128 127 129 Free(&filename);130 128 return status; 131 129 }; … … 146 144 int NumberOfFragments = 0; 147 145 double TEFactor; 148 char *filename = Malloc<char>(MAXSTRINGSIZE, "molecule::ParseTEFactorsFile - filename");146 char filename[MAXSTRINGSIZE]; 149 147 150 148 if (FragmentList == NULL) { // check list pointer … … 177 175 } 178 176 179 // free memory180 Free(&filename);181 182 177 return status; 183 178 }; … … 315 310 int No = 0, FragOrder = 0; 316 311 double Value = 0.; 317 char *buffer = Malloc<char>(MAXSTRINGSIZE, "molecule::CheckOrderAtSite: *buffer");312 char buffer[MAXSTRINGSIZE]; 318 313 sprintf(buffer, "%s/%s%s.dat", path, FRAGMENTPREFIX, ENERGYPERFRAGMENT); 319 314 ifstream InputFile(buffer, ios::in); … … 343 338 InputFile.clear(); 344 339 } 345 Free(&buffer);346 340 347 341 return AdaptiveCriteriaList; … … 470 464 MarkUpdateCandidates(AtomMask, *FinalRootCandidates, Order, this); 471 465 472 Free(&IndexKeySetList);473 Free(&AdaptiveCriteriaList);474 Free(&FinalRootCandidates);466 delete[](IndexKeySetList); 467 delete[](AdaptiveCriteriaList); 468 delete[](FinalRootCandidates); 475 469 } else { // global increase of Bond Order 476 470 for(molecule::const_iterator iter = begin(); iter != end(); ++iter) { … … 511 505 return false; 512 506 } 513 SortIndex = Malloc<int>(getAtomCount(), "molecule::CreateMappingLabelsToConfigSequence: *SortIndex");507 SortIndex = new int[getAtomCount()]; 514 508 for(int i=getAtomCount();i--;) 515 509 SortIndex[i] = -1; … … 552 546 553 547 // allocate and fill 554 LookupTable = Calloc<atom *>(count, "CreateFatherLookupTable - **LookupTable");548 LookupTable = new atom *[count]; 555 549 if (LookupTable == NULL) { 556 550 eLog() << Verbose(0) << "LookupTable memory allocation failed!" << endl; … … 558 552 status = false; 559 553 } else { 554 for (int i=0;i<count;i++) 555 LookupTable[i] = NULL; 560 556 for (molecule::iterator iter = begin(); iter != end(); ++iter) { 561 557 AtomNo = (*iter)->GetTrueFather()->nr; … … 595 591 { 596 592 MoleculeListClass *BondFragments = NULL; 597 int *SortIndex = NULL;598 593 int *MinimumRingSize = new int[getAtomCount()]; 599 594 int FragmentCounter; … … 628 623 // === compare it with adjacency file === 629 624 FragmentationToDo = FragmentationToDo && CheckAdjacencyFileAgainstMolecule(configuration->configpath, ListOfAtoms); 630 Free(&ListOfAtoms);625 delete[](ListOfAtoms); 631 626 632 627 // ===== 2. perform a DFS analysis to gather info on cyclic structure and a list of disconnected subgraphs ===== … … 646 641 // // check the list of local atoms for debugging 647 642 // Log() << Verbose(0) << "ListOfLocalAtoms for this subgraph is:" << endl; 648 // for (int i=0;i< AtomCount;i++)643 // for (int i=0;i<getAtomCount();i++) 649 644 // if (ListOfLocalAtoms[FragmentCounter][i] == NULL) 650 645 // Log() << Verbose(0) << "\tNULL"; … … 720 715 delete(Subgraphs); 721 716 } 722 Free(&FragmentList);717 delete[](FragmentList); 723 718 724 719 // ===== 8b. gather keyset lists (graphs) from all subgraphs and transform into MoleculeListClass ===== … … 738 733 if (BondFragments->ListOfMolecules.size() != 0) { 739 734 // create the SortIndex from BFS labels to order in the config file 735 int *SortIndex = NULL; 740 736 CreateMappingLabelsToConfigSequence(SortIndex); 741 737 … … 752 748 StoreKeySetFile(TotalGraph, configuration->configpath); 753 749 754 // store Adjacency file 755 char *filename = Malloc<char> (MAXSTRINGSIZE, "molecule::FragmentMolecule - *filename"); 756 strcpy(filename, FRAGMENTPREFIX); 757 strcat(filename, ADJACENCYFILE); 758 StoreAdjacencyToFile(configuration->configpath, filename); 759 Free(&filename); 750 { 751 // store Adjacency file 752 char filename[MAXSTRINGSIZE]; 753 strcpy(filename, FRAGMENTPREFIX); 754 strcat(filename, ADJACENCYFILE); 755 StoreAdjacencyToFile(configuration->configpath, filename); 756 } 760 757 761 758 // store Hydrogen saturation correction file … … 770 767 // free memory for bond part 771 768 DoLog(1) && (Log() << Verbose(1) << "Freeing bond memory" << endl); 772 Free(&FragmentList); // remove bond molecule from memory 773 Free(&SortIndex); 769 delete[](SortIndex); 774 770 } else { 775 771 DoLog(1) && (Log() << Verbose(1) << "FragmentList is zero on return, splitting failed." << endl); … … 816 812 bool molecule::ParseOrderAtSiteFromFile(char *path) 817 813 { 818 unsigned char *OrderArray = Calloc<unsigned char>(getAtomCount(), "molecule::ParseOrderAtSiteFromFile - *OrderArray");819 bool *MaxArray = Calloc<bool>(getAtomCount(), "molecule::ParseOrderAtSiteFromFile - *MaxArray");814 unsigned char *OrderArray = new unsigned char[getAtomCount()]; 815 bool *MaxArray = new bool[getAtomCount()]; 820 816 bool status; 821 817 int AtomNr, value; 822 818 stringstream line; 823 819 ifstream file; 820 821 for(int i=0;i<getAtomCount();i++) { 822 OrderArray[i] = 0; 823 MaxArray[i] = false; 824 } 824 825 825 826 DoLog(1) && (Log() << Verbose(1) << "Begin of ParseOrderAtSiteFromFile" << endl); … … 850 851 status = false; 851 852 } 852 Free(&OrderArray);853 Free(&MaxArray);853 delete[](OrderArray); 854 delete[](MaxArray); 854 855 855 856 DoLog(1) && (Log() << Verbose(1) << "End of ParseOrderAtSiteFromFile" << endl); … … 981 982 molecule * molecule::StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem) 982 983 { 983 atom **SonList = Calloc<atom*>(getAtomCount(), "molecule::StoreFragmentFromStack: **SonList");984 atom **SonList = new atom*[getAtomCount()]; 984 985 molecule *Leaf = World::getInstance().createMolecule(); 986 987 for(int i=0;i<getAtomCount();i++) 988 SonList[i] = NULL; 985 989 986 990 // Log() << Verbose(1) << "Begin of StoreFragmentFromKeyset." << endl; … … 991 995 992 996 //Leaflet->Leaf->ScanForPeriodicCorrection(out); 993 Free(&SonList);997 delete[](SonList); 994 998 // Log() << Verbose(1) << "End of StoreFragmentFromKeyset." << endl; 995 999 return Leaf; … … 1136 1140 int bits, TouchedIndex, SubSetDimension, SP, Added; 1137 1141 int SpaceLeft; 1138 int *TouchedList = Malloc<int>(SubOrder + 1, "molecule::SPFragmentGenerator: *TouchedList");1142 int *TouchedList = new int[SubOrder + 1]; 1139 1143 bond **BondsList = NULL; 1140 1144 KeySetTestPair TestKeySetInsert; … … 1176 1180 1177 1181 // then allocate and fill the list 1178 BondsList = Malloc<bond*>(SubSetDimension, "molecule::SPFragmentGenerator: **BondsList");1182 bond *BondsList[SubSetDimension]; 1179 1183 SubSetDimension = FillBondsList(BondsList, FragmentSearch->BondsPerSPList[2*SP], FragmentSearch->BondsPerSPList[2*SP+1], TouchedList, TouchedIndex); 1180 1184 … … 1182 1186 Log() << Verbose(2+verbosity) << "Calling subset generator " << SP << " away from root " << *FragmentSearch->Root << " with sub set dimension " << SubSetDimension << "." << endl; 1183 1187 SPFragmentGenerator(FragmentSearch, SP, BondsList, SubSetDimension, SubOrder-bits); 1184 1185 Free(&BondsList);1186 1188 } 1187 1189 } else { … … 1205 1207 } 1206 1208 } 1207 Free(&TouchedList);1209 delete[](TouchedList); 1208 1210 Log() << Verbose(1+verbosity) << "End of SPFragmentGenerator, " << RootDistance << " away from Root " << *FragmentSearch->Root << " and SubOrder is " << SubOrder << "." << endl; 1209 1211 }; … … 1217 1219 void InitialiseSPList(int Order, struct UniqueFragments &FragmentSearch) 1218 1220 { 1219 FragmentSearch.BondsPerSPList = Malloc<bond*>(Order * 2, "molecule::PowerSetGenerator: ***BondsPerSPList");1220 FragmentSearch.BondsPerSPCount = Malloc<int>(Order, "molecule::PowerSetGenerator: *BondsPerSPCount");1221 FragmentSearch.BondsPerSPList = new bond* [Order * 2]; 1222 FragmentSearch.BondsPerSPCount = new int[Order]; 1221 1223 for (int i=Order;i--;) { 1222 1224 FragmentSearch.BondsPerSPList[2*i] = new bond(); // start node … … 1236 1238 void FreeSPList(int Order, struct UniqueFragments &FragmentSearch) 1237 1239 { 1238 Free(&FragmentSearch.BondsPerSPCount);1240 delete[](FragmentSearch.BondsPerSPCount); 1239 1241 for (int i=Order;i--;) { 1240 1242 delete(FragmentSearch.BondsPerSPList[2*i]); 1241 1243 delete(FragmentSearch.BondsPerSPList[2*i+1]); 1242 1244 } 1243 Free(&FragmentSearch.BondsPerSPList);1245 delete[](FragmentSearch.BondsPerSPList); 1244 1246 }; 1245 1247 … … 1446 1448 1447 1449 // prepare the subset and call the generator 1448 BondsList = Calloc<bond*>(FragmentSearch.BondsPerSPCount[0], "molecule::PowerSetGenerator: **BondsList"); 1450 bond* BondsList[FragmentSearch.BondsPerSPCount[0]]; 1451 for(int i=0;i<FragmentSearch.BondsPerSPCount[0];i++) 1452 BondsList[i] = NULL; 1449 1453 BondsList[0] = FragmentSearch.BondsPerSPList[0]->next; // on SP level 0 there's only the root bond 1450 1454 1451 1455 SPFragmentGenerator(&FragmentSearch, 0, BondsList, FragmentSearch.BondsPerSPCount[0], Order); 1452 1453 Free(&BondsList);1454 1456 } else { 1455 1457 DoLog(0) && (Log() << Verbose(0) << "Not enough total number of edges to build " << Order << "-body fragments." << endl); … … 1559 1561 } 1560 1562 } 1561 Free(&FragmentLowerOrdersList[RootNr]);1563 delete[](FragmentLowerOrdersList[RootNr]); 1562 1564 RootNr++; 1563 1565 } 1564 Free(&FragmentLowerOrdersList);1566 delete[](FragmentLowerOrdersList); 1565 1567 }; 1566 1568 … … 1601 1603 // FragmentLowerOrdersList is a 2D-array of pointer to MoleculeListClass objects, one dimension represents the ANOVA expansion of a single order (i.e. 5) 1602 1604 // with all needed lower orders that are subtracted, the other dimension is the BondOrder (i.e. from 1 to 5) 1603 NumMoleculesOfOrder = Calloc<int>(UpgradeCount, "molecule::FragmentBOSSANOVA: *NumMoleculesOfOrder"); 1604 FragmentLowerOrdersList = Calloc<Graph**>(UpgradeCount, "molecule::FragmentBOSSANOVA: ***FragmentLowerOrdersList"); 1605 NumMoleculesOfOrder = new int[UpgradeCount]; 1606 FragmentLowerOrdersList = new Graph**[UpgradeCount]; 1607 1608 for(int i=0;i<UpgradeCount;i++) { 1609 NumMoleculesOfOrder[i] = 0; 1610 FragmentLowerOrdersList[i] = NULL; 1611 } 1605 1612 1606 1613 // initialise the fragments structure … … 1608 1615 FragmentSearch.FragmentSet = new KeySet; 1609 1616 FragmentSearch.Root = FindAtom(RootKeyNr); 1610 FragmentSearch.ShortestPathList = Malloc<int>(getAtomCount(), "molecule::PowerSetGenerator: *ShortestPathList");1617 FragmentSearch.ShortestPathList = new int[getAtomCount()]; 1611 1618 for (int i=getAtomCount();i--;) { 1612 1619 FragmentSearch.ShortestPathList[i] = -1; … … 1642 1649 // allocate memory for all lower level orders in this 1D-array of ptrs 1643 1650 NumLevels = 1 << (Order-1); // (int)pow(2,Order); 1644 FragmentLowerOrdersList[RootNr] = Calloc<Graph*>(NumLevels, "molecule::FragmentBOSSANOVA: **FragmentLowerOrdersList[]"); 1651 FragmentLowerOrdersList[RootNr] = new Graph*[NumLevels]; 1652 for (int i=0;i<NumLevels;i++) 1653 FragmentLowerOrdersList[RootNr][i] = NULL; 1645 1654 1646 1655 // create top order where nothing is reduced … … 1678 1687 1679 1688 // cleanup FragmentSearch structure 1680 Free(&FragmentSearch.ShortestPathList);1689 delete[](FragmentSearch.ShortestPathList); 1681 1690 delete(FragmentSearch.FragmentSet); 1682 1691 … … 1691 1700 CombineAllOrderListIntoOne(FragmentList, FragmentLowerOrdersList, RootStack, this); 1692 1701 FreeAllOrdersList(FragmentLowerOrdersList, RootStack, this); 1693 Free(&NumMoleculesOfOrder);1702 delete[](NumMoleculesOfOrder); 1694 1703 1695 1704 DoLog(0) && (Log() << Verbose(0) << "End of FragmentBOSSANOVA." << endl); … … 1719 1728 DoLog(2) && (Log() << Verbose(2) << "Begin of ScanForPeriodicCorrection." << endl); 1720 1729 1721 ColorList = Calloc<enum Shading>(getAtomCount(), "molecule::ScanForPeriodicCorrection: *ColorList"); 1730 ColorList = new enum Shading[getAtomCount()]; 1731 for (int i=0;i<getAtomCount();i++) 1732 ColorList[i] = (enum Shading)0; 1722 1733 while (flag) { 1723 1734 // remove bonds that are beyond bonddistance … … 1777 1788 // free allocated space from ReturnFullMatrixforSymmetric() 1778 1789 delete(AtomStack); 1779 Free(&ColorList);1780 Free(&matrix);1790 delete[](ColorList); 1791 delete[](matrix); 1781 1792 DoLog(2) && (Log() << Verbose(2) << "End of ScanForPeriodicCorrection." << endl); 1782 1793 }; -
src/molecule_geometry.cpp
ra7b761b r1024cb 27 27 bool status = true; 28 28 const Vector *Center = DetermineCenterOfAll(); 29 const Vector *CenterBox = DetermineCenterOfBox(); 29 30 double * const cell_size = World::getInstance().getDomain(); 30 31 double *M = ReturnFullMatrixforSymmetric(cell_size); … … 33 34 // go through all atoms 34 35 ActOnAllVectors( &Vector::SubtractVector, *Center); 36 ActOnAllVectors( &Vector::SubtractVector, *CenterBox); 35 37 ActOnAllVectors( &Vector::WrapPeriodically, (const double *)M, (const double *)Minv); 36 38 37 Free(&M);38 Free(&Minv);39 delete[](M); 40 delete[](Minv); 39 41 delete(Center); 40 42 return status; … … 55 57 ActOnAllVectors( &Vector::WrapPeriodically, (const double *)M, (const double *)Minv); 56 58 57 Free(&M);58 Free(&Minv);59 delete[](M); 60 delete[](Minv); 59 61 return status; 60 62 }; … … 125 127 molecule::const_iterator iter = begin(); // start at first in list 126 128 Vector *a = new Vector(); 127 Vector tmp;128 129 double Num = 0; 129 130 … … 133 134 for (; iter != end(); ++iter) { // continue with second if present 134 135 Num += 1.; 135 tmp = (*iter)->x; 136 (*a) += tmp; 136 (*a) += (*iter)->x; 137 137 } 138 138 a->Scale(1./Num); // divide through total mass (and sign for direction) 139 139 } 140 return a; 141 }; 142 143 /** Returns vector pointing to center of the domain. 144 * \return pointer to center of the domain 145 */ 146 Vector * molecule::DetermineCenterOfBox() const 147 { 148 Vector *a = new Vector(0.5,0.5,0.5); 149 150 const double *cell_size = World::getInstance().getDomain(); 151 double *M = ReturnFullMatrixforSymmetric(cell_size); 152 a->MatrixMultiplication(M); 153 delete[](M); 154 140 155 return a; 141 156 }; … … 228 243 229 244 // go through all atoms 230 ActOnAllVectors( &Vector:: SubtractVector, *trans);245 ActOnAllVectors( &Vector::AddVector, *trans); 231 246 ActOnAllVectors( &Vector::WrapPeriodically, (const double *)M, (const double *)Minv); 232 247 233 Free(&M);234 Free(&Minv);248 delete[](M); 249 delete[](Minv); 235 250 }; 236 251 … … 300 315 } 301 316 } while (!flag); 302 Free(&matrix);303 Free(&inversematrix);317 delete[](matrix); 318 delete[](inversematrix); 304 319 305 320 Center.Scale(1./static_cast<double>(getAtomCount())); -
src/molecule_graph.cpp
ra7b761b r1024cb 12 12 #include "element.hpp" 13 13 #include "helpers.hpp" 14 #include "info.hpp" 14 15 #include "linkedcell.hpp" 15 16 #include "lists.hpp" … … 56 57 void molecule::CreateAdjacencyListFromDbondFile(ifstream *input) 57 58 { 58 59 Info FunctionInfo(__func__); 59 60 // 1 We will parse bonds out of the dbond file created by tremolo. 60 61 int atom1, atom2; 61 62 atom *Walker, *OtherWalker; 62 63 if (!input) { 64 DoLog(1) && (Log() << Verbose(1) << "Opening silica failed \n"); 63 char line[MAXSTRINGSIZE]; 64 65 if (input->fail()) { 66 DoeLog(0) && (eLog() << Verbose(0) << "Opening of bond file failed \n"); 67 performCriticalExit(); 65 68 }; 66 69 67 *input >> ws >> atom1;68 *input >> ws >> atom2;69 DoLog(1) && (Log() << Verbose(1) << "Scanning file \n");70 // skip header 71 input->getline(line,MAXSTRINGSIZE); 72 DoLog(1) && (Log() << Verbose(1) << "Scanning file ... \n"); 70 73 while (!input->eof()) // Check whether we read everything already 71 74 { 72 *input >> ws >> atom1; 73 *input >> ws >> atom2; 74 75 input->getline(line,MAXSTRINGSIZE); 76 stringstream zeile(line); 77 zeile >> atom1; 78 zeile >> atom2; 79 80 DoLog(2) && (Log() << Verbose(2) << "Looking for atoms " << atom1 << " and " << atom2 << "." << endl); 75 81 if (atom2 < atom1) //Sort indices of atoms in order 76 82 flip(atom1, atom2); … … 626 632 { 627 633 BFS.AtomCount = AtomCount; 628 BFS.PredecessorList = Calloc<atom*> (AtomCount, "molecule::BreadthFirstSearchAdd_Init: **PredecessorList");629 BFS.ShortestPathList = Malloc<int> (AtomCount, "molecule::BreadthFirstSearchAdd_Init: *ShortestPathList");630 BFS.ColorList = Calloc<enum Shading> (AtomCount, "molecule::BreadthFirstSearchAdd_Init: *ColorList");634 BFS.PredecessorList = new atom*[AtomCount]; 635 BFS.ShortestPathList = new int[AtomCount]; 636 BFS.ColorList = new enum Shading[AtomCount]; 631 637 BFS.BFSStack = new StackClass<atom *> (AtomCount); 632 638 633 for (int i = AtomCount; i--;) 639 for (int i = AtomCount; i--;) { 634 640 BFS.ShortestPathList[i] = -1; 641 BFS.PredecessorList[i] = 0; 642 } 635 643 }; 636 644 … … 641 649 void FinalizeBFSAccounting(struct BFSAccounting &BFS) 642 650 { 643 Free(&BFS.PredecessorList);644 Free(&BFS.ShortestPathList);645 Free(&BFS.ColorList);651 delete[](BFS.PredecessorList); 652 delete[](BFS.ShortestPathList); 653 delete[](BFS.ColorList); 646 654 delete (BFS.BFSStack); 647 655 BFS.AtomCount = 0; … … 1062 1070 1063 1071 // allocate storage structure 1064 CurrentBonds = Calloc<int> (8, "molecule::CheckAdjacencyFileAgainstMolecule - CurrentBonds"); // contains parsed bonds of current atom 1072 CurrentBonds = new int[8]; // contains parsed bonds of current atom 1073 for(int i=0;i<8;i++) 1074 CurrentBonds[i] = 0; 1065 1075 return true; 1066 1076 } … … 1071 1081 File.close(); 1072 1082 File.clear(); 1073 Free(&CurrentBonds);1083 delete[](CurrentBonds); 1074 1084 } 1075 1085 ; … … 1115 1125 bool status = true; 1116 1126 atom *Walker = NULL; 1117 char *buffer = NULL;1118 1127 int *CurrentBonds = NULL; 1119 1128 int NonMatchNumber = 0; // will number of atoms with differing bond structure … … 1125 1134 } 1126 1135 1127 buffer = Malloc<char> (MAXSTRINGSIZE, "molecule::CheckAdjacencyFileAgainstMolecule: *buffer");1136 char buffer[MAXSTRINGSIZE]; 1128 1137 // Parse the file line by line and count the bonds 1129 1138 while (!File.eof()) { … … 1143 1152 } 1144 1153 } 1145 Free(&buffer);1146 1154 CheckAdjacencyFileAgainstMolecule_Finalize(File, CurrentBonds); 1147 1155 … … 1197 1205 BFS.AtomCount = AtomCount; 1198 1206 BFS.BondOrder = BondOrder; 1199 BFS.PredecessorList = Calloc<atom*> (AtomCount, "molecule::BreadthFirstSearchAdd_Init: **PredecessorList");1200 BFS.ShortestPathList = Calloc<int> (AtomCount, "molecule::BreadthFirstSearchAdd_Init: *ShortestPathList");1201 BFS.ColorList = Malloc<enum Shading> (AtomCount, "molecule::BreadthFirstSearchAdd_Init: *ColorList");1207 BFS.PredecessorList = new atom*[AtomCount]; 1208 BFS.ShortestPathList = new int[AtomCount]; 1209 BFS.ColorList = new enum Shading[AtomCount]; 1202 1210 BFS.BFSStack = new StackClass<atom *> (AtomCount); 1203 1211 … … 1208 1216 // initialise each vertex as white with no predecessor, empty queue, color Root lightgray 1209 1217 for (int i = AtomCount; i--;) { 1218 BFS.PredecessorList[i] = NULL; 1210 1219 BFS.ShortestPathList[i] = -1; 1211 1220 if ((AddedAtomList != NULL) && (AddedAtomList[i] != NULL)) // mark already present atoms (i.e. Root and maybe others) as visited … … 1214 1223 BFS.ColorList[i] = white; 1215 1224 } 1216 //BFS.ShortestPathList[Root->nr] = 0; // is set due to Calloc()1225 //BFS.ShortestPathList[Root->nr] = 0; // done by Calloc 1217 1226 } 1218 1227 ; … … 1220 1229 void BreadthFirstSearchAdd_Free(struct BFSAccounting &BFS) 1221 1230 { 1222 Free(&BFS.PredecessorList);1223 Free(&BFS.ShortestPathList);1224 Free(&BFS.ColorList);1231 delete[](BFS.PredecessorList); 1232 delete[](BFS.ShortestPathList); 1233 delete[](BFS.ColorList); 1225 1234 delete (BFS.BFSStack); 1226 1235 BFS.AtomCount = 0; … … 1361 1370 { 1362 1371 // reset parent list 1363 ParentList = Calloc<atom*> (AtomCount, "molecule::BuildInducedSubgraph_Init: **ParentList"); 1372 ParentList = new atom*[AtomCount]; 1373 for (int i=0;i<AtomCount;i++) 1374 ParentList[i] = NULL; 1364 1375 DoLog(3) && (Log() << Verbose(3) << "Resetting ParentList." << endl); 1365 1376 } … … 1379 1390 void BuildInducedSubgraph_Finalize(atom **&ParentList) 1380 1391 { 1381 Free(&ParentList);1392 delete[](ParentList); 1382 1393 } 1383 1394 ; -
src/moleculelist.cpp
ra7b761b r1024cb 20 20 #include "memoryallocator.hpp" 21 21 #include "periodentafel.hpp" 22 #include "Helpers/Assert.hpp" 23 22 24 #include "Helpers/Assert.hpp" 23 25 … … 416 418 417 419 // 0b. allocate memory for constants 418 FitConstant = Calloc<double**>(3, "MoleculeListClass::AddHydrogenCorrection: ***FitConstant");420 FitConstant = new double**[3]; 419 421 for (int k = 0; k < 3; k++) { 420 FitConstant[k] = Calloc<double*>(a, "MoleculeListClass::AddHydrogenCorrection: **FitConstant[]");422 FitConstant[k] = new double*[a]; 421 423 for (int i = a; i--;) { 422 FitConstant[k][i] = Calloc<double>(b, "MoleculeListClass::AddHydrogenCorrection: *FitConstant[][]"); 424 FitConstant[k][i] = new double[b]; 425 for (int j = b; j--;) { 426 FitConstant[k][i][j] = 0.; 427 } 423 428 } 424 429 } … … 466 471 467 472 // 0d. allocate final correction matrix 468 correction = Calloc<double*>(a, "MoleculeListClass::AddHydrogenCorrection: **correction");473 correction = new double*[a]; 469 474 for (int i = a; i--;) 470 correction[i] = Calloc<double>(b, "MoleculeListClass::AddHydrogenCorrection: *correction[]");475 correction[i] = new double[b]; 471 476 472 477 // 1a. go through every molecule in the list … … 516 521 FragmentNumber = FixedDigitNumber(ListOfMolecules.size(), (*ListRunner)->IndexNr); 517 522 line += FragmentNumber; 518 delete (FragmentNumber);523 delete[] (FragmentNumber); 519 524 line += HCORRECTIONSUFFIX; 520 525 output.open(line.c_str()); … … 527 532 output.close(); 528 533 } 534 for (int i = a; i--;) 535 delete[](correction[i]); 536 delete[](correction); 537 529 538 line = path; 530 539 line.append("/"); … … 541 550 for (int k = 0; k < 3; k++) { 542 551 for (int i = a; i--;) { 543 Free(&FitConstant[k][i]);544 } 545 Free(&FitConstant[k]);546 } 547 Free(&FitConstant);552 delete[](FitConstant[k][i]); 553 } 554 delete[](FitConstant[k]); 555 } 556 delete[](FitConstant); 548 557 DoLog(0) && (Log() << Verbose(0) << "done." << endl); 549 558 return true; … … 604 613 * \param *configuration standard configuration to attach atoms in fragment molecule to. 605 614 * \param *SortIndex Index to map from the BFS labeling to the sequence how of Ion_Type in the config 606 * \param DoPeriodic true - call ScanForPeriodicCorrection, false - don't607 * \param DoCentering true - call molecule::CenterEdge(), false - don't608 615 * \return true - success (each file was written), false - something went wrong. 609 616 */ … … 703 710 //outputFragment.close(); 704 711 //outputFragment.clear(); 705 Free(&FragmentNumber);712 delete[](FragmentNumber); 706 713 } 707 714 DoLog(0) && (Log() << Verbose(0) << " done." << endl); … … 784 791 const int MolCount = Subgraphs->next->Count(); 785 792 char number[MAXSTRINGSIZE]; 786 molecule **molecules = Malloc<molecule *>(MolCount, "config::Load() - **molecules");793 molecule **molecules = new molecule *[MolCount]; 787 794 for (int i=0;i<MolCount;i++) { 788 795 molecules[i] = World::getInstance().createMolecule(); … … 799 806 // 4b. create and fill map of which atom is associated to which connected molecule (note, counting starts at 1) 800 807 int FragmentCounter = 0; 801 int *MolMap = Calloc<int>(mol->getAtomCount(), "config::Load() - *MolMap"); 808 int *MolMap = new int[mol->getAtomCount()]; 809 for (int i=0;i<mol->getAtomCount();i++) 810 MolMap[i] = 0; 802 811 MoleculeLeafClass *MolecularWalker = Subgraphs; 803 812 while (MolecularWalker->next != NULL) { … … 840 849 } 841 850 delete(MolecularWalker); 842 Free(&MolMap);843 Free(&molecules);851 delete[](MolMap); 852 delete[](molecules); 844 853 DoLog(1) && (Log() << Verbose(1) << "I scanned " << FragmentCounter << " molecules." << endl); 845 854 }; … … 1069 1078 if ((FreeList) && (ListOfLocalAtoms != NULL)) { 1070 1079 // free the index lookup list 1071 Free(&ListOfLocalAtoms[FragmentCounter]);1080 delete[](ListOfLocalAtoms[FragmentCounter]); 1072 1081 if (FragmentCounter == 0) // first fragments frees the initial pointer to list 1073 Free(&ListOfLocalAtoms);1082 delete[](ListOfLocalAtoms); 1074 1083 } 1075 1084 DoLog(1) && (Log() << Verbose(1) << "End of FillBondStructureFromReference." << endl); … … 1130 1139 // allocate and set each field to NULL 1131 1140 const int Counter = Count(); 1132 ListOfLocalAtoms = Calloc<atom**>(Counter, "MoleculeLeafClass::FillListOfLocalAtoms - ***ListOfLocalAtoms"); 1141 ASSERT(FragmentCounter < Counter, "FillListOfLocalAtoms: FragmenCounter greater than present fragments."); 1142 ListOfLocalAtoms = new atom**[Counter]; 1133 1143 if (ListOfLocalAtoms == NULL) { 1134 1144 FreeList = FreeList && false; 1135 1145 status = false; 1136 1146 } 1147 for (int i=0;i<Counter;i++) 1148 ListOfLocalAtoms[i] = NULL; 1137 1149 } 1138 1150 … … 1170 1182 if (FragmentList == NULL) { 1171 1183 KeySetCounter = Count(); 1172 FragmentList = Calloc<Graph*>(KeySetCounter, "MoleculeLeafClass::AssignKeySetsToFragment - **FragmentList"); 1184 FragmentList = new Graph*[KeySetCounter]; 1185 for (int i=0;i<KeySetCounter;i++) 1186 FragmentList[i] = NULL; 1173 1187 KeySetCounter = 0; 1174 1188 } … … 1204 1218 if ((FreeList) && (ListOfLocalAtoms != NULL)) { 1205 1219 // free the index lookup list 1206 Free(&ListOfLocalAtoms[FragmentCounter]);1220 delete[](ListOfLocalAtoms[FragmentCounter]); 1207 1221 if (FragmentCounter == 0) // first fragments frees the initial pointer to list 1208 Free(&ListOfLocalAtoms);1222 delete[](ListOfLocalAtoms); 1209 1223 } 1210 1224 DoLog(1) && (Log() << Verbose(1) << "End of AssignKeySetsToFragment." << endl); -
src/parser.cpp
ra7b761b r1024cb 59 59 MatrixContainer::MatrixContainer() { 60 60 Indices = NULL; 61 Header = Malloc<char*>(1, "MatrixContainer::MatrixContainer: **Header");62 Matrix = Malloc<double**>(1, "MatrixContainer::MatrixContainer: ***Matrix"); // one more each for the total molecule63 RowCounter = Malloc<int>(1, "MatrixContainer::MatrixContainer: *RowCounter");64 ColumnCounter = Malloc<int>(1, "MatrixContainer::MatrixContainer: *ColumnCounter");61 Header = new char*[1]; 62 Matrix = new double**[1]; // one more each for the total molecule 63 RowCounter = new int[1]; 64 ColumnCounter = new int[1]; 65 65 Header[0] = NULL; 66 66 Matrix[0] = NULL; … … 77 77 if ((ColumnCounter != NULL) && (RowCounter != NULL)) { 78 78 for(int j=RowCounter[i]+1;j--;) 79 Free(&Matrix[i][j]);80 Free(&Matrix[i]);79 delete[](Matrix[i][j]); 80 delete[](Matrix[i]); 81 81 } 82 82 } 83 83 if ((ColumnCounter != NULL) && (RowCounter != NULL) && (Matrix[MatrixCounter] != NULL)) 84 84 for(int j=RowCounter[MatrixCounter]+1;j--;) 85 Free(&Matrix[MatrixCounter][j]);85 delete[](Matrix[MatrixCounter][j]); 86 86 if (MatrixCounter != 0) 87 Free(&Matrix[MatrixCounter]);88 Free(&Matrix);87 delete[](Matrix[MatrixCounter]); 88 delete[](Matrix); 89 89 } 90 90 if (Indices != NULL) 91 91 for(int i=MatrixCounter+1;i--;) { 92 Free(&Indices[i]);93 } 94 Free(&Indices);92 delete[](Indices[i]); 93 } 94 delete[](Indices); 95 95 96 96 if (Header != NULL) 97 97 for(int i=MatrixCounter+1;i--;) 98 Free(&Header[i]);99 Free(&Header);100 Free(&RowCounter);101 Free(&ColumnCounter);98 delete[](Header[i]); 99 delete[](Header); 100 delete[](RowCounter); 101 delete[](ColumnCounter); 102 102 }; 103 103 … … 112 112 if (Matrix == NULL) { 113 113 DoLog(0) && (Log() << Verbose(0) << " with trivial mapping." << endl); 114 Indices = Malloc<int*>(MatrixCounter + 1, "MatrixContainer::InitialiseIndices: **Indices");114 Indices = new int*[MatrixCounter + 1]; 115 115 for(int i=MatrixCounter+1;i--;) { 116 Indices[i] = Malloc<int>(RowCounter[i], "MatrixContainer::InitialiseIndices: *Indices[]");116 Indices[i] = new int[RowCounter[i]]; 117 117 for(int j=RowCounter[i];j--;) 118 118 Indices[i][j] = j; … … 122 122 if (MatrixCounter != Matrix->MatrixCounter) 123 123 return false; 124 Indices = Malloc<int*>(MatrixCounter + 1, "MatrixContainer::InitialiseIndices: **Indices");124 Indices = new int*[MatrixCounter + 1]; 125 125 for(int i=MatrixCounter+1;i--;) { 126 126 if (RowCounter[i] != Matrix->RowCounter[i]) 127 127 return false; 128 Indices[i] = Malloc<int>(Matrix->RowCounter[i], "MatrixContainer::InitialiseIndices: *Indices[]");128 Indices[i] = new int[Matrix->RowCounter[i]]; 129 129 for(int j=Matrix->RowCounter[i];j--;) { 130 130 Indices[i][j] = Matrix->Indices[i][j]; … … 166 166 167 167 // parse header 168 Header[MatrixNr] = Malloc<char>(1024, "MatrixContainer::ParseMatrix: *Header[]");168 Header[MatrixNr] = new char[1024]; 169 169 for (int m=skiplines+1;m--;) 170 170 input.getline(Header[MatrixNr], 1023); … … 205 205 // allocate matrix if it's not zero dimension in one direction 206 206 if ((ColumnCounter[MatrixNr] > 0) && (RowCounter[MatrixNr] > -1)) { 207 Matrix[MatrixNr] = Malloc<double*>(RowCounter[MatrixNr] + 1, "MatrixContainer::ParseMatrix: **Matrix[]");207 Matrix[MatrixNr] = new double*[RowCounter[MatrixNr] + 1]; 208 208 209 209 // parse in each entry for this matrix … … 217 217 strncpy(Header[MatrixNr], line.str().c_str(), 1023); 218 218 for(int j=0;j<RowCounter[MatrixNr];j++) { 219 Matrix[MatrixNr][j] = Malloc<double>(ColumnCounter[MatrixNr], "MatrixContainer::ParseMatrix: *Matrix[][]");219 Matrix[MatrixNr][j] = new double[ColumnCounter[MatrixNr]]; 220 220 input.getline(filename, 1023); 221 221 stringstream lines(filename); … … 227 227 //Log() << Verbose(1) << " " << setprecision(2) << Matrix[MatrixNr][j][k] << endl; 228 228 } 229 Matrix[MatrixNr][ RowCounter[MatrixNr] ] = Malloc<double>(ColumnCounter[MatrixNr], "MatrixContainer::ParseMatrix: *Matrix[RowCounter[MatrixNr]][]");229 Matrix[MatrixNr][ RowCounter[MatrixNr] ] = new double[ColumnCounter[MatrixNr]]; 230 230 for(int j=ColumnCounter[MatrixNr];j--;) 231 231 Matrix[MatrixNr][ RowCounter[MatrixNr] ][j] = 0.; … … 281 281 282 282 DoLog(0) && (Log() << Verbose(0) << "Parsing through each fragment and retrieving " << prefix << suffix << "." << endl); 283 Header = ReAlloc<char*>(Header, MatrixCounter + 1, "MatrixContainer::ParseFragmentMatrix: **Header"); // one more each for the total molecule 284 Matrix = ReAlloc<double**>(Matrix, MatrixCounter + 1, "MatrixContainer::ParseFragmentMatrix: ***Matrix"); // one more each for the total molecule 285 RowCounter = ReAlloc<int>(RowCounter, MatrixCounter + 1, "MatrixContainer::ParseFragmentMatrix: *RowCounter"); 286 ColumnCounter = ReAlloc<int>(ColumnCounter, MatrixCounter + 1, "MatrixContainer::ParseFragmentMatrix: *ColumnCounter"); 283 delete[](Header); 284 delete[](Matrix); 285 delete[](RowCounter); 286 delete[](ColumnCounter); 287 Header = new char*[MatrixCounter + 1]; // one more each for the total molecule 288 Matrix = new double**[MatrixCounter + 1]; // one more each for the total molecule 289 RowCounter = new int[MatrixCounter + 1]; 290 ColumnCounter = new int[MatrixCounter + 1]; 287 291 for(int i=MatrixCounter+1;i--;) { 288 292 Matrix[i] = NULL; … … 298 302 if (!ParseMatrix(file.str().c_str(), skiplines, skipcolumns, i)) 299 303 return false; 300 Free(&FragmentNumber);304 delete[](FragmentNumber); 301 305 } 302 306 return true; … … 313 317 { 314 318 MatrixCounter = MCounter; 315 Header = Malloc<char*>(MatrixCounter + 1, "MatrixContainer::AllocateMatrix: *Header");316 Matrix = Malloc<double**>(MatrixCounter + 1, "MatrixContainer::AllocateMatrix: ***Matrix"); // one more each for the total molecule317 RowCounter = Malloc<int>(MatrixCounter + 1, "MatrixContainer::AllocateMatrix: *RowCounter");318 ColumnCounter = Malloc<int>(MatrixCounter + 1, "MatrixContainer::AllocateMatrix: *ColumnCounter");319 Header = new char*[MatrixCounter + 1]; 320 Matrix = new double**[MatrixCounter + 1]; // one more each for the total molecule 321 RowCounter = new int[MatrixCounter + 1]; 322 ColumnCounter = new int[MatrixCounter + 1]; 319 323 for(int i=MatrixCounter+1;i--;) { 320 Header[i] = Malloc<char>(1024, "MatrixContainer::AllocateMatrix: *Header[i]");324 Header[i] = new char[1024]; 321 325 strncpy(Header[i], GivenHeader[i], 1023); 322 326 RowCounter[i] = RCounter[i]; 323 327 ColumnCounter[i] = CCounter[i]; 324 Matrix[i] = Malloc<double*>(RowCounter[i] + 1, "MatrixContainer::AllocateMatrix: **Matrix[]");328 Matrix[i] = new double*[RowCounter[i] + 1]; 325 329 for(int j=RowCounter[i]+1;j--;) { 326 Matrix[i][j] = Malloc<double>(ColumnCounter[i], "MatrixContainer::AllocateMatrix: *Matrix[][]");330 Matrix[i][j] = new double[ColumnCounter[i]]; 327 331 for(int k=ColumnCounter[i];k--;) 328 332 Matrix[i][j][k] = 0.; … … 474 478 FragmentNumber = FixedDigitNumber(MatrixCounter, i); 475 479 line << name << FRAGMENTPREFIX << FragmentNumber << "/" << prefix; 476 Free(&FragmentNumber);480 delete[](FragmentNumber); 477 481 output.open(line.str().c_str(), ios::out); 478 482 if (output == NULL) { … … 530 534 { 531 535 DoLog(0) && (Log() << Verbose(0) << "Parsing energy indices." << endl); 532 Indices = Malloc<int*>(MatrixCounter + 1, "EnergyMatrix::ParseIndices: **Indices");536 Indices = new int*[MatrixCounter + 1]; 533 537 for(int i=MatrixCounter+1;i--;) { 534 Indices[i] = Malloc<int>(RowCounter[i], "EnergyMatrix::ParseIndices: *Indices[]");538 Indices[i] = new int[RowCounter[i]]; 535 539 for(int j=RowCounter[i];j--;) 536 540 Indices[i][j] = j; … … 589 593 // allocate last plus one matrix 590 594 DoLog(0) && (Log() << Verbose(0) << "Allocating last plus one matrix with " << (RowCounter[MatrixCounter]+1) << " rows and " << ColumnCounter[MatrixCounter] << " columns." << endl); 591 Matrix[MatrixCounter] = Malloc<double*>(RowCounter[MatrixCounter] + 1, "MatrixContainer::ParseFragmentMatrix: **Matrix[]");595 Matrix[MatrixCounter] = new double*[RowCounter[MatrixCounter] + 1]; 592 596 for(int j=0;j<=RowCounter[MatrixCounter];j++) 593 Matrix[MatrixCounter][j] = Malloc<double>(ColumnCounter[MatrixCounter], "MatrixContainer::ParseFragmentMatrix: *Matrix[][]");597 Matrix[MatrixCounter][j] = new double[ColumnCounter[MatrixCounter]]; 594 598 595 599 // try independently to parse global energysuffix file if present … … 616 620 617 621 DoLog(0) && (Log() << Verbose(0) << "Parsing force indices for " << MatrixCounter << " matrices." << endl); 618 Indices = Malloc<int*>(MatrixCounter + 1, "ForceMatrix::ParseIndices: **Indices");622 Indices = new int*[MatrixCounter + 1]; 619 623 line << name << FRAGMENTPREFIX << FORCESFILE; 620 624 input.open(line.str().c_str(), ios::in); … … 629 633 line.str(filename); 630 634 // parse the values 631 Indices[i] = Malloc<int>(RowCounter[i], "ForceMatrix::ParseIndices: *Indices[]");635 Indices[i] = new int[RowCounter[i]]; 632 636 FragmentNumber = FixedDigitNumber(MatrixCounter, i); 633 637 //Log() << Verbose(0) << FRAGMENTPREFIX << FragmentNumber << "[" << RowCounter[i] << "]:"; 634 Free(&FragmentNumber);638 delete[](FragmentNumber); 635 639 for(int j=0;(j<RowCounter[i]) && (!line.eof());j++) { 636 640 line >> Indices[i][j]; … … 639 643 //Log() << Verbose(0) << endl; 640 644 } 641 Indices[MatrixCounter] = Malloc<int>(RowCounter[MatrixCounter], "ForceMatrix::ParseIndices: *Indices[]");645 Indices[MatrixCounter] = new int[RowCounter[MatrixCounter]]; 642 646 for(int j=RowCounter[MatrixCounter];j--;) { 643 647 Indices[MatrixCounter][j] = j; … … 725 729 // allocate last plus one matrix 726 730 DoLog(0) && (Log() << Verbose(0) << "Allocating last plus one matrix with " << (RowCounter[MatrixCounter]+1) << " rows and " << ColumnCounter[MatrixCounter] << " columns." << endl); 727 Matrix[MatrixCounter] = Malloc<double*>(RowCounter[MatrixCounter] + 1, "MatrixContainer::ParseFragmentMatrix: **Matrix[]");731 Matrix[MatrixCounter] = new double*[RowCounter[MatrixCounter] + 1]; 728 732 for(int j=0;j<=RowCounter[MatrixCounter];j++) 729 Matrix[MatrixCounter][j] = Malloc<double>(ColumnCounter[MatrixCounter], "MatrixContainer::ParseFragmentMatrix: *Matrix[][]");733 Matrix[MatrixCounter][j] = new double[ColumnCounter[MatrixCounter]]; 730 734 731 735 // try independently to parse global forcesuffix file if present … … 754 758 755 759 DoLog(0) && (Log() << Verbose(0) << "Parsing hessian indices for " << MatrixCounter << " matrices." << endl); 756 Indices = Malloc<int*>(MatrixCounter + 1, "HessianMatrix::ParseIndices: **Indices");760 Indices = new int*[MatrixCounter + 1]; 757 761 line << name << FRAGMENTPREFIX << FORCESFILE; 758 762 input.open(line.str().c_str(), ios::in); … … 767 771 line.str(filename); 768 772 // parse the values 769 Indices[i] = Malloc<int>(RowCounter[i], "HessianMatrix::ParseIndices: *Indices[]");773 Indices[i] = new int[RowCounter[i]]; 770 774 FragmentNumber = FixedDigitNumber(MatrixCounter, i); 771 775 //Log() << Verbose(0) << FRAGMENTPREFIX << FragmentNumber << "[" << RowCounter[i] << "]:"; 772 Free(&FragmentNumber);776 delete[](FragmentNumber); 773 777 for(int j=0;(j<RowCounter[i]) && (!line.eof());j++) { 774 778 line >> Indices[i][j]; … … 777 781 //Log() << Verbose(0) << endl; 778 782 } 779 Indices[MatrixCounter] = Malloc<int>(RowCounter[MatrixCounter], "HessianMatrix::ParseIndices: *Indices[]");783 Indices[MatrixCounter] = new int[RowCounter[MatrixCounter]]; 780 784 for(int j=RowCounter[MatrixCounter];j--;) { 781 785 Indices[MatrixCounter][j] = j; … … 953 957 // allocate last plus one matrix 954 958 DoLog(0) && (Log() << Verbose(0) << "Allocating last plus one matrix with " << (RowCounter[MatrixCounter]+1) << " rows and " << ColumnCounter[MatrixCounter] << " columns." << endl); 955 Matrix[MatrixCounter] = Malloc<double*>(RowCounter[MatrixCounter] + 1, "MatrixContainer::ParseFragmentMatrix: **Matrix[]");959 Matrix[MatrixCounter] = new double*[RowCounter[MatrixCounter] + 1]; 956 960 for(int j=0;j<=RowCounter[MatrixCounter];j++) 957 Matrix[MatrixCounter][j] = Malloc<double>(ColumnCounter[MatrixCounter], "MatrixContainer::ParseFragmentMatrix: *Matrix[][]");961 Matrix[MatrixCounter][j] = new double[ColumnCounter[MatrixCounter]]; 958 962 959 963 // try independently to parse global forcesuffix file if present … … 985 989 KeySetsContainer::~KeySetsContainer() { 986 990 for(int i=FragmentCounter;i--;) 987 Free(&KeySets[i]);991 delete[](KeySets[i]); 988 992 for(int i=Order;i--;) 989 Free(&OrderSet[i]);990 Free(&KeySets);991 Free(&OrderSet);992 Free(&AtomCounter);993 Free(&FragmentsPerOrder);993 delete[](OrderSet[i]); 994 delete[](KeySets); 995 delete[](OrderSet); 996 delete[](AtomCounter); 997 delete[](FragmentsPerOrder); 994 998 }; 995 999 … … 1008 1012 FragmentCounter = FCounter; 1009 1013 DoLog(0) && (Log() << Verbose(0) << "Parsing key sets." << endl); 1010 KeySets = Malloc<int*>(FragmentCounter, "KeySetsContainer::ParseKeySets: **KeySets");1014 KeySets = new int*[FragmentCounter]; 1011 1015 for(int i=FragmentCounter;i--;) 1012 1016 KeySets[i] = NULL; … … 1018 1022 } 1019 1023 1020 AtomCounter = Malloc<int>(FragmentCounter, "KeySetsContainer::ParseKeySets: *RowCounter");1024 AtomCounter = new int[FragmentCounter]; 1021 1025 for(int i=0;(i<FragmentCounter) && (!input.eof());i++) { 1022 1026 stringstream line; 1023 1027 AtomCounter[i] = ACounter[i]; 1024 1028 // parse the values 1025 KeySets[i] = Malloc<int>(AtomCounter[i], "KeySetsContainer::ParseKeySets: *KeySets[]");1029 KeySets[i] = new int[AtomCounter[i]]; 1026 1030 for(int j=AtomCounter[i];j--;) 1027 1031 KeySets[i][j] = -1; 1028 1032 FragmentNumber = FixedDigitNumber(FragmentCounter, i); 1029 1033 //Log() << Verbose(0) << FRAGMENTPREFIX << FragmentNumber << "[" << AtomCounter[i] << "]:"; 1030 Free(&FragmentNumber);1034 delete[](FragmentNumber); 1031 1035 input.getline(filename, 1023); 1032 1036 line.str(filename); … … 1062 1066 1063 1067 // scan through all to determine fragments per order 1064 FragmentsPerOrder = Malloc<int>(Order, "KeySetsContainer::ParseManyBodyTerms: *FragmentsPerOrder");1068 FragmentsPerOrder = new int[Order]; 1065 1069 for(int i=Order;i--;) 1066 1070 FragmentsPerOrder[i] = 0; … … 1076 1080 1077 1081 // scan through all to gather indices to each order set 1078 OrderSet = Malloc<int*>(Order, "KeySetsContainer::ParseManyBodyTerms: **OrderSet");1082 OrderSet = new int*[Order]; 1079 1083 for(int i=Order;i--;) 1080 OrderSet[i] = Malloc<int>(FragmentsPerOrder[i], "KeySetsContainer::ParseManyBodyTermsKeySetsContainer::ParseManyBodyTerms: *OrderSet[]");1084 OrderSet[i] = new int[FragmentsPerOrder[i]]; 1081 1085 for(int i=Order;i--;) 1082 1086 FragmentsPerOrder[i] = 0; -
src/periodentafel.cpp
ra7b761b r1024cb 8 8 9 9 #include <iomanip> 10 #include <iostream> 10 11 #include <fstream> 11 12 #include <cstring> 12 #include <cassert> 13 13 14 #include "Helpers/Assert.hpp" 14 15 #include "element.hpp" 16 #include "elements_db.hpp" 15 17 #include "helpers.hpp" 16 18 #include "lists.hpp" … … 27 29 */ 28 30 periodentafel::periodentafel() 29 {}; 31 { 32 ASSERT(LoadElementsDatabase(new stringstream(elementsDB,ios_base::in)), "General element initialization failed"); 33 ASSERT(LoadValenceDatabase(new stringstream(valenceDB,ios_base::in)), "Valence entry of element initialization failed"); 34 ASSERT(LoadOrbitalsDatabase(new stringstream(orbitalsDB,ios_base::in)), "Orbitals entry of element initialization failed"); 35 ASSERT(LoadHBondAngleDatabase(new stringstream(HbondangleDB,ios_base::in)), "HBond angle entry of element initialization failed"); 36 ASSERT(LoadHBondLengthsDatabase(new stringstream(HbonddistanceDB,ios_base::in)), "HBond distance entry of element initialization failed"); 37 }; 30 38 31 39 /** destructor for class periodentafel 32 40 * Removes every element and afterwards deletes start and end of list. 41 * TODO: Handle when elements have changed and store databases then 33 42 */ 34 43 periodentafel::~periodentafel() … … 39 48 /** Adds element to period table list 40 49 * \param *pointer element to be added 41 * \return true - succeeded, false - does not occur50 * \return iterator to added element 42 51 */ 43 52 periodentafel::iterator periodentafel::AddElement(element * const pointer) 44 53 { 45 54 atomicNumber_t Z = pointer->getNumber(); 46 assert(!elements.count(Z));55 ASSERT(!elements.count(Z), "Element is already present."); 47 56 pointer->sort = &pointer->Z; 48 57 if (pointer->getNumber() < 1 && pointer->getNumber() >= MAX_ELEMENTS) … … 54 63 /** Removes element from list. 55 64 * \param *pointer element to be removed 56 * \return true - succeeded, false - element not found57 65 */ 58 66 void periodentafel::RemoveElement(element * const pointer) 59 67 { 60 atomicNumber_t Z = pointer->getNumber(); 68 RemoveElement(pointer->getNumber()); 69 }; 70 71 /** Removes element from list. 72 * \param Z element to be removed 73 */ 74 void periodentafel::RemoveElement(atomicNumber_t Z) 75 { 61 76 elements.erase(Z); 62 77 }; 63 78 64 79 /** Removes every element from the period table. 65 * \return true - succeeded, false - does not occur66 80 */ 67 81 void periodentafel::CleanupPeriodtable() … … 78 92 * \return pointer to element or NULL if not found 79 93 */ 80 const element *periodentafel::FindElement(atomicNumber_t Z) const94 element * const periodentafel::FindElement(atomicNumber_t Z) const 81 95 { 82 96 const_iterator res = elements.find(Z); … … 89 103 * \return pointer to element 90 104 */ 91 const element *periodentafel::FindElement(const char * const shorthand) const105 element * const periodentafel::FindElement(const char * const shorthand) const 92 106 { 93 107 element *res = 0; … … 102 116 103 117 /** Asks for element number and returns pointer to element 104 */ 105 const element * periodentafel::AskElement() const 106 { 107 const element *walker = NULL; 118 * \return desired element or NULL 119 */ 120 element * const periodentafel::AskElement() const 121 { 122 element * walker = NULL; 108 123 int Z; 109 124 do { … … 118 133 * \return pointer to either present or newly created element 119 134 */ 120 const element * periodentafel::EnterElement() 121 { 122 const element *res = NULL; 135 element * const periodentafel::EnterElement() 136 { 123 137 atomicNumber_t Z = 0; 124 138 DoLog(0) && (Log() << Verbose(0) << "Atomic number: " << Z << endl); 125 139 cin >> Z; 126 res = FindElement(Z);140 element * const res = FindElement(Z); 127 141 if (!res) { 128 142 // TODO: make this using the constructor 129 element *tmp;130 143 DoLog(0) && (Log() << Verbose(0) << "Element not found in database, please enter." << endl); 131 tmp = new element;144 element *tmp = new element; 132 145 tmp->Z = Z; 133 146 DoLog(0) && (Log() << Verbose(0) << "Mass: " << endl); … … 138 151 cin >> tmp->symbol; 139 152 AddElement(tmp); 140 re s =tmp;153 return tmp; 141 154 } 142 155 return res; … … 204 217 bool periodentafel::LoadPeriodentafel(const char *path) 205 218 { 206 ifstream infile; 207 element *ptr; 208 map<atomicNumber_t,element*> parsedElems; 219 ifstream input; 209 220 bool status = true; 210 221 bool otherstatus = true; … … 215 226 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 216 227 strncat(filename, STANDARDELEMENTSDB, MAXSTRINGSIZE-strlen(filename)); 217 infile.open(filename); 218 if (infile != NULL) { 219 infile.getline(header1, MAXSTRINGSIZE); 220 infile.getline(header2, MAXSTRINGSIZE); // skip first two header lines 228 input.open(filename); 229 status = status && LoadElementsDatabase(&input); 230 231 // fill valence DB per element 232 strncpy(filename, path, MAXSTRINGSIZE); 233 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 234 strncat(filename, STANDARDVALENCEDB, MAXSTRINGSIZE-strlen(filename)); 235 input.open(filename); 236 otherstatus = otherstatus && LoadValenceDatabase(&input); 237 238 // fill orbitals DB per element 239 strncpy(filename, path, MAXSTRINGSIZE); 240 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 241 strncat(filename, STANDARDORBITALDB, MAXSTRINGSIZE-strlen(filename)); 242 input.open(filename); 243 otherstatus = otherstatus && LoadOrbitalsDatabase(&input); 244 245 // fill H-BondAngle DB per element 246 strncpy(filename, path, MAXSTRINGSIZE); 247 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 248 strncat(filename, STANDARDHBONDANGLEDB, MAXSTRINGSIZE-strlen(filename)); 249 input.open(filename); 250 otherstatus = otherstatus && LoadHBondAngleDatabase(&input); 251 252 // fill H-BondDistance DB per element 253 strncpy(filename, path, MAXSTRINGSIZE); 254 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 255 strncat(filename, STANDARDHBONDDISTANCEDB, MAXSTRINGSIZE-strlen(filename)); 256 input.open(filename); 257 otherstatus = otherstatus && LoadHBondLengthsDatabase(&input); 258 259 if (!otherstatus){ 260 DoeLog(2) && (eLog()<< Verbose(2) << "Something went wrong while parsing the other databases!" << endl); 261 } 262 263 return status; 264 }; 265 266 /** load the element info. 267 * \param *input stream to parse from 268 * \return true - parsing successful, false - something went wrong 269 */ 270 bool periodentafel::LoadElementsDatabase(istream *input) 271 { 272 bool status = true; 273 int counter = 0; 274 if (!(*input).fail()) { 275 (*input).getline(header1, MAXSTRINGSIZE); 276 (*input).getline(header2, MAXSTRINGSIZE); // skip first two header lines 221 277 DoLog(0) && (Log() << Verbose(0) << "Parsed elements:"); 222 while (! infile.eof()) {278 while (!(*input).eof()) { 223 279 element *neues = new element; 224 infile >> neues->name; 225 //infile >> ws; 226 infile >> neues->symbol; 227 //infile >> ws; 228 infile >> neues->period; 229 //infile >> ws; 230 infile >> neues->group; 231 //infile >> ws; 232 infile >> neues->block; 233 //infile >> ws; 234 infile >> neues->Z; 235 //infile >> ws; 236 infile >> neues->mass; 237 //infile >> ws; 238 infile >> neues->CovalentRadius; 239 //infile >> ws; 240 infile >> neues->VanDerWaalsRadius; 241 //infile >> ws; 242 infile >> ws; 243 DoLog(0) && (Log() << Verbose(0) << " " << neues->symbol); 280 (*input) >> neues->name; 281 //(*input) >> ws; 282 (*input) >> neues->symbol; 283 //(*input) >> ws; 284 (*input) >> neues->period; 285 //(*input) >> ws; 286 (*input) >> neues->group; 287 //(*input) >> ws; 288 (*input) >> neues->block; 289 //(*input) >> ws; 290 (*input) >> neues->Z; 291 //(*input) >> ws; 292 (*input) >> neues->mass; 293 //(*input) >> ws; 294 (*input) >> neues->CovalentRadius; 295 //(*input) >> ws; 296 (*input) >> neues->VanDerWaalsRadius; 297 //(*input) >> ws; 298 (*input) >> ws; 299 if (elements.count(neues->Z)) {// if element already present, remove and delete it 300 element * const Elemental = FindElement(neues->Z); 301 ASSERT(Elemental != NULL, "element should be present but is not??"); 302 RemoveElement(Elemental); 303 delete(Elemental); 304 } 244 305 //neues->Output((ofstream *)&cout); 245 if ((neues->Z > 0) && (neues->Z < MAX_ELEMENTS)) 246 parsedElems[neues->getNumber()] = neues; 247 else { 248 DoLog(0) && (Log() << Verbose(0) << "Could not parse element: "); 249 neues->Output((ofstream *)&cout); 306 if ((neues->Z > 0) && (neues->Z < MAX_ELEMENTS)) { 307 DoLog(0) && (Log() << Verbose(0) << " " << neues->symbol); 308 elements[neues->getNumber()] = neues; 309 counter++; 310 } else { 311 DoeLog(2) && (eLog() << Verbose(2) << "Detected empty line or invalid element in elements db, discarding." << endl); 312 DoLog(0) && (Log() << Verbose(0) << " <?>"); 250 313 delete(neues); 251 314 } 252 315 } 253 316 DoLog(0) && (Log() << Verbose(0) << endl); 254 infile.close();255 infile.clear();256 317 } else 257 318 status = false; 258 319 259 // fill valence DB per element 260 strncpy(filename, path, MAXSTRINGSIZE); 261 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 262 strncat(filename, STANDARDVALENCEDB, MAXSTRINGSIZE-strlen(filename)); 263 infile.open(filename); 264 if (infile != NULL) { 265 while (!infile.eof()) { 320 if (counter == 0) 321 status = false; 322 323 return status; 324 } 325 326 /** load the valence info. 327 * \param *input stream to parse from 328 * \return true - parsing successful, false - something went wrong 329 */ 330 bool periodentafel::LoadValenceDatabase(istream *input) 331 { 332 char dummy[MAXSTRINGSIZE]; 333 if (!(*input).fail()) { 334 (*input).getline(dummy, MAXSTRINGSIZE); 335 while (!(*input).eof()) { 266 336 atomicNumber_t Z; 267 infile >> Z; 268 infile >> ws; 269 infile >> parsedElems[Z]->Valence; 270 infile >> ws; 337 (*input) >> Z; 338 ASSERT(elements.count(Z), "Element not present"); 339 (*input) >> ws; 340 (*input) >> elements[Z]->Valence; 341 (*input) >> ws; 271 342 //Log() << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->Valence << " valence electrons." << endl; 272 343 } 273 infile.close(); 274 infile.clear(); 275 } else 276 otherstatus = false; 277 278 // fill valence DB per element 279 strncpy(filename, path, MAXSTRINGSIZE); 280 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 281 strncat(filename, STANDARDORBITALDB, MAXSTRINGSIZE-strlen(filename)); 282 infile.open(filename); 283 if (infile != NULL) { 284 while (!infile.eof()) { 344 return true; 345 } else 346 return false; 347 } 348 349 /** load the orbitals info. 350 * \param *input stream to parse from 351 * \return true - parsing successful, false - something went wrong 352 */ 353 bool periodentafel::LoadOrbitalsDatabase(istream *input) 354 { 355 char dummy[MAXSTRINGSIZE]; 356 if (!(*input).fail()) { 357 (*input).getline(dummy, MAXSTRINGSIZE); 358 while (!(*input).eof()) { 285 359 atomicNumber_t Z; 286 infile >> Z; 287 infile >> ws; 288 infile >> parsedElems[Z]->NoValenceOrbitals; 289 infile >> ws; 360 (*input) >> Z; 361 ASSERT(elements.count(Z), "Element not present"); 362 (*input) >> ws; 363 (*input) >> elements[Z]->NoValenceOrbitals; 364 (*input) >> ws; 290 365 //Log() << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->NoValenceOrbitals << " number of singly occupied valence orbitals." << endl; 291 366 } 292 infile.close(); 293 infile.clear(); 294 } else 295 otherstatus = false; 296 297 // fill H-BondDistance DB per element 298 strncpy(filename, path, MAXSTRINGSIZE); 299 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 300 strncat(filename, STANDARDHBONDDISTANCEDB, MAXSTRINGSIZE-strlen(filename)); 301 infile.open(filename); 302 if (infile != NULL) { 303 while (!infile.eof()) { 367 return true; 368 } else 369 return false; 370 } 371 372 /** load the hbond angles info. 373 * \param *input stream to parse from 374 * \return true - parsing successful, false - something went wrong 375 */ 376 bool periodentafel::LoadHBondAngleDatabase(istream *input) 377 { 378 char dummy[MAXSTRINGSIZE]; 379 if (!(*input).fail()) { 380 (*input).getline(dummy, MAXSTRINGSIZE); 381 while (!(*input).eof()) { 304 382 atomicNumber_t Z; 305 infile >> Z; 306 ptr = parsedElems[Z]; 307 infile >> ws; 308 infile >> ptr->HBondDistance[0]; 309 infile >> ptr->HBondDistance[1]; 310 infile >> ptr->HBondDistance[2]; 311 infile >> ws; 383 (*input) >> Z; 384 ASSERT(elements.count(Z), "Element not present"); 385 (*input) >> ws; 386 (*input) >> elements[Z]->HBondAngle[0]; 387 (*input) >> elements[Z]->HBondAngle[1]; 388 (*input) >> elements[Z]->HBondAngle[2]; 389 (*input) >> ws; 390 //Log() << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->HBondAngle[0] << ", " << FindElement((int)tmp)->HBondAngle[1] << ", " << FindElement((int)tmp)->HBondAngle[2] << " degrees bond angle for one, two, three connected hydrogens." << endl; 391 } 392 return true; 393 } else 394 return false; 395 } 396 397 /** load the hbond lengths info. 398 * \param *input stream to parse from 399 * \return true - parsing successful, false - something went wrong 400 */ 401 bool periodentafel::LoadHBondLengthsDatabase(istream *input) 402 { 403 char dummy[MAXSTRINGSIZE]; 404 if (!(*input).fail()) { 405 (*input).getline(dummy, MAXSTRINGSIZE); 406 while (!(*input).eof()) { 407 atomicNumber_t Z; 408 (*input) >> Z; 409 ASSERT(elements.count(Z), "Element not present"); 410 (*input) >> ws; 411 (*input) >> elements[Z]->HBondDistance[0]; 412 (*input) >> elements[Z]->HBondDistance[1]; 413 (*input) >> elements[Z]->HBondDistance[2]; 414 (*input) >> ws; 312 415 //Log() << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->HBondDistance[0] << " Angstrom typical distance to hydrogen." << endl; 313 416 } 314 infile.close(); 315 infile.clear(); 316 } else 317 otherstatus = false; 318 319 // fill H-BondAngle DB per element 320 strncpy(filename, path, MAXSTRINGSIZE); 321 strncat(filename, "/", MAXSTRINGSIZE-strlen(filename)); 322 strncat(filename, STANDARDHBONDANGLEDB, MAXSTRINGSIZE-strlen(filename)); 323 infile.open(filename); 324 if (infile != NULL) { 325 while (!infile.eof()) { 326 atomicNumber_t Z; 327 infile >> Z; 328 ptr = parsedElems[Z]; 329 infile >> ws; 330 infile >> ptr->HBondAngle[0]; 331 infile >> ptr->HBondAngle[1]; 332 infile >> ptr->HBondAngle[2]; 333 infile >> ws; 334 //Log() << Verbose(3) << "Element " << (int)tmp << " has " << FindElement((int)tmp)->HBondAngle[0] << ", " << FindElement((int)tmp)->HBondAngle[1] << ", " << FindElement((int)tmp)->HBondAngle[2] << " degrees bond angle for one, two, three connected hydrogens." << endl; 335 } 336 infile.close(); 337 } else 338 otherstatus = false; 339 340 if (otherstatus){ 341 map<atomicNumber_t,element*>::iterator iter; 342 for(iter=parsedElems.begin();iter!=parsedElems.end();++iter){ 343 AddElement((*iter).second); 344 } 345 } 346 else{ 347 DoeLog(2) && (eLog()<< Verbose(2) << "Something went wrong while parsing the other databases!" << endl); 348 map<atomicNumber_t,element*>::iterator iter; 349 for(iter=parsedElems.begin();iter!=parsedElems.end();++iter){ 350 AddElement((*iter).second); 351 } 352 } 353 354 return status; 355 }; 417 return true; 418 } else 419 return false; 420 } 356 421 357 422 /** Stores element list to file. … … 374 439 } 375 440 f.close(); 376 } else377 result = false;378 return result;379 }; 441 return true; 442 } else 443 return result; 444 }; -
src/periodentafel.hpp
ra7b761b r1024cb 13 13 #include <iterator> 14 14 15 #include "unittests/periodentafelTest.hpp" 15 16 #include "defs.hpp" 16 17 #include "types.hpp" … … 27 28 class periodentafel { 28 29 /******* Types *********/ 30 friend class periodentafelTest; 29 31 private: 30 32 typedef std::map<atomicNumber_t,element*> elementSet; … … 43 45 iterator AddElement(element * const pointer); 44 46 void RemoveElement(element * const pointer); 47 void RemoveElement(atomicNumber_t); 45 48 void CleanupPeriodtable(); 46 const element *FindElement(atomicNumber_t) const;47 const element *FindElement(const char * const shorthand) const;48 const element *AskElement() const;49 const element *EnterElement();49 element * const FindElement(atomicNumber_t) const; 50 element * const FindElement(const char * const shorthand) const; 51 element * const AskElement() const; 52 element * const EnterElement(); 50 53 51 54 const_iterator begin(); … … 59 62 60 63 private: 64 65 bool LoadElementsDatabase(std::istream *input); 66 bool LoadValenceDatabase(std::istream *input); 67 bool LoadOrbitalsDatabase(std::istream *input); 68 bool LoadHBondAngleDatabase(std::istream *input); 69 bool LoadHBondLengthsDatabase(std::istream *input); 70 61 71 elementSet elements; 62 72 }; -
src/stackclass.hpp
ra7b761b r1024cb 50 50 template <typename T> StackClass<T>::StackClass(int dimension) : StackList(NULL), EntryCount(dimension), CurrentLastEntry(0), CurrentFirstEntry(0), NextFreeField(0) 51 51 { 52 StackList = Calloc<T>(EntryCount, "StackClass::StackClass: **StackList"); 52 StackList = new T[EntryCount]; 53 for (int i=0;i<EntryCount;i++) 54 StackList[i] = NULL; 53 55 }; 54 56 … … 57 59 template <typename T> StackClass<T>::~StackClass() 58 60 { 59 Free(&StackList);61 delete[](StackList); 60 62 }; 61 63 -
src/unittests/ActOnAllUnitTest.cpp
ra7b761b r1024cb 46 46 // Ref was copy constructed, hence has to be cleaned, too! 47 47 Ref.EmptyList(); 48 MemoryUsageObserver::purgeInstance();49 48 }; 50 49 … … 77 76 78 77 // scaling by three values 79 double *factors = Malloc<double>(NDIM, "ActOnAllTest::ScaleTest - factors");80 double *inverses = Malloc<double>(NDIM, "ActOnAllTest::ScaleTest - inverses");78 double *factors = new double[NDIM]; 79 double *inverses = new double[NDIM]; 81 80 for (int i=0;i<NDIM;++i) { 82 81 factors[i] = 2.; … … 88 87 VL.ActOnAll<Vector,void,const double*>(&Vector::ScaleAll, inverses ); 89 88 CPPUNIT_ASSERT_EQUAL( VL == Ref , true ); 90 Free(factors);91 Free(inverses);89 delete[](factors); 90 delete[](inverses); 92 91 }; 93 92 -
src/unittests/AnalysisCorrelationToPointUnitTest.cpp
ra7b761b r1024cb 17 17 #include "AnalysisCorrelationToPointUnitTest.hpp" 18 18 19 #include "World.hpp"20 19 #include "atom.hpp" 21 #include "boundary.hpp"22 20 #include "element.hpp" 23 21 #include "molecule.hpp" 24 22 #include "linkedcell.hpp" 25 23 #include "periodentafel.hpp" 26 #include " tesselation.hpp"24 #include "World.hpp" 27 25 28 26 #ifdef HAVE_TESTRUNNER … … 42 40 TestList = NULL; 43 41 TestMolecule = NULL; 44 hydrogen = NULL;45 tafel = NULL;46 42 pointmap = NULL; 47 43 binmap = NULL; 48 44 point = NULL; 49 45 50 // construct element51 hydrogen = new element;52 hydrogen->Z = 1;53 strcpy(hydrogen->name, "hydrogen");54 strcpy(hydrogen->symbol, "H");55 56 57 // construct periodentafel58 tafel = World::getInstance().getPeriode();59 tafel->AddElement(hydrogen);60 61 46 // construct molecule (tetraeder of hydrogens) 47 hydrogen = World::getInstance().getPeriode()->FindElement(1); 48 CPPUNIT_ASSERT(hydrogen != NULL && "hydrogen element not found"); 62 49 TestMolecule = World::getInstance().createMolecule(); 63 50 Walker = World::getInstance().createAtom(); … … 104 91 delete(point); 105 92 World::purgeInstance(); 106 MemoryUsageObserver::purgeInstance();107 93 logger::purgeInstance(); 108 94 }; -
src/unittests/AnalysisCorrelationToPointUnitTest.hpp
ra7b761b r1024cb 12 12 13 13 class element; 14 class LinkedCell;15 14 class molecule; 16 15 class MoleculeListClass; 17 class periodentafel;18 class Tesselation;19 16 class Vector; 20 17 … … 40 37 MoleculeListClass *TestList; 41 38 molecule *TestMolecule; 42 element *hydrogen; 43 periodentafel *tafel; 39 const element *hydrogen; 44 40 45 41 CorrelationToPointMap *pointmap; -
src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
ra7b761b r1024cb 17 17 #include "AnalysisCorrelationToSurfaceUnitTest.hpp" 18 18 19 #include "World.hpp"20 19 #include "atom.hpp" 21 20 #include "boundary.hpp" … … 48 47 TestList = NULL; 49 48 TestSurfaceMolecule = NULL; 50 hydrogen = NULL;51 tafel = NULL;52 49 surfacemap = NULL; 53 50 binmap = NULL; … … 55 52 LC = NULL; 56 53 57 // construct element58 hydrogen = new element;59 hydrogen->Z = 1;60 strcpy(hydrogen->name, "hydrogen");61 strcpy(hydrogen->symbol, "H");62 carbon = new element;63 carbon->Z = 6;64 strcpy(carbon->name, "carbon");65 strcpy(carbon->symbol, "C");66 67 // construct periodentafel68 tafel = World::getInstance().getPeriode();69 tafel->AddElement(hydrogen);70 tafel->AddElement(carbon);71 72 54 // construct molecule (tetraeder of hydrogens) base 55 hydrogen = World::getInstance().getPeriode()->FindElement(1); 73 56 TestSurfaceMolecule = World::getInstance().createMolecule(); 74 57 … … 106 89 107 90 // add outer atoms 91 carbon = World::getInstance().getPeriode()->FindElement(6); 108 92 TestSurfaceMolecule = World::getInstance().createMolecule(); 109 93 Walker = World::getInstance().createAtom(); … … 149 133 delete(LC); 150 134 World::purgeInstance(); 151 MemoryUsageObserver::purgeInstance();152 135 logger::purgeInstance(); 153 136 }; -
src/unittests/AnalysisCorrelationToSurfaceUnitTest.hpp
ra7b761b r1024cb 45 45 MoleculeListClass *TestList; 46 46 molecule *TestSurfaceMolecule; 47 element *hydrogen; 48 element *carbon; 49 periodentafel *tafel; 47 const element *hydrogen; 48 const element *carbon; 50 49 51 50 CorrelationToSurfaceMap *surfacemap; -
src/unittests/AnalysisPairCorrelationUnitTest.cpp
ra7b761b r1024cb 44 44 TestList = NULL; 45 45 TestMolecule = NULL; 46 hydrogen = NULL;47 tafel = NULL;48 46 correlationmap = NULL; 49 47 binmap = NULL; 50 48 51 // construct element52 hydrogen = new element;53 hydrogen->Z = 1;54 strcpy(hydrogen->name, "hydrogen");55 strcpy(hydrogen->symbol, "H");56 57 // construct periodentafel58 tafel = World::getInstance().getPeriode();59 tafel->AddElement(hydrogen);60 61 49 // construct molecule (tetraeder of hydrogens) 50 hydrogen = World::getInstance().getPeriode()->FindElement(1); 62 51 TestMolecule = World::getInstance().createMolecule(); 63 52 Walker = World::getInstance().createAtom(); … … 101 90 // note that all the atoms are cleaned by TestMolecule 102 91 World::purgeInstance(); 103 MemoryUsageObserver::purgeInstance();104 92 logger::purgeInstance(); 105 93 errorLogger::purgeInstance(); -
src/unittests/AnalysisPairCorrelationUnitTest.hpp
ra7b761b r1024cb 12 12 13 13 class element; 14 class LinkedCell;15 14 class molecule; 16 15 class MoleculeListClass; 17 class periodentafel;18 class Tesselation;19 16 class Vector; 20 17 … … 40 37 MoleculeListClass *TestList; 41 38 molecule *TestMolecule; 42 element *hydrogen; 43 periodentafel *tafel; 39 const element *hydrogen; 44 40 45 41 PairCorrelationMap *correlationmap; -
src/unittests/CountBondsUnitTest.cpp
ra7b761b r1024cb 16 16 #include <stdio.h> 17 17 #include <cstring> 18 19 #include "Helpers/Assert.hpp" 18 20 19 21 #include "analysis_bonds.hpp" … … 40 42 { 41 43 atom *Walker = NULL; 42 BG = NULL;43 filename = NULL;44 45 // init private all pointers to zero46 molecules = NULL;47 TestMolecule1 = NULL;48 TestMolecule2 = NULL;49 hydrogen = NULL;50 oxygen = NULL;51 tafel = NULL;52 44 53 45 // construct element 54 hydrogen = new element; 55 hydrogen->Z = 1; 56 hydrogen->CovalentRadius = 0.23; 57 strcpy(hydrogen->name, "hydrogen"); 58 strcpy(hydrogen->symbol, "H"); 59 oxygen = new element; 60 oxygen->Z = 8; 61 oxygen->CovalentRadius = 0.68; 62 strcpy(oxygen->name, "oxygen"); 63 strcpy(oxygen->symbol, "O"); 64 65 // construct periodentafel 66 tafel = World::getInstance().getPeriode(); 67 tafel->AddElement(hydrogen); 68 tafel->AddElement(oxygen); 46 hydrogen = World::getInstance().getPeriode()->FindElement(1); 47 oxygen = World::getInstance().getPeriode()->FindElement(8); 48 CPPUNIT_ASSERT(hydrogen != NULL && "could not find element hydrogen"); 49 CPPUNIT_ASSERT(oxygen != NULL && "could not find element oxygen"); 69 50 70 51 // construct molecule (water molecule) 71 52 TestMolecule1 = World::getInstance().createMolecule(); 72 Walker = World::getInstance().createAtom(); 53 CPPUNIT_ASSERT(TestMolecule1 != NULL && "could not create first molecule"); 54 Walker = World::getInstance().createAtom(); 55 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 73 56 Walker->type = hydrogen; 74 57 *Walker->node = Vector(-0.2418, 0.9350, 0. ); 75 58 TestMolecule1->AddAtom(Walker); 76 59 Walker = World::getInstance().createAtom(); 60 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 77 61 Walker->type = hydrogen; 78 62 *Walker->node = Vector(0.9658, 0., 0. ); 79 63 TestMolecule1->AddAtom(Walker); 80 64 Walker = World::getInstance().createAtom(); 65 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 81 66 Walker->type = oxygen; 82 67 *Walker->node = Vector(0., 0., 0. ); … … 84 69 85 70 TestMolecule2 = World::getInstance().createMolecule(); 86 Walker = World::getInstance().createAtom(); 71 CPPUNIT_ASSERT(TestMolecule2 != NULL && "could not create second molecule"); 72 Walker = World::getInstance().createAtom(); 73 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 87 74 Walker->type = hydrogen; 88 75 *Walker->node = Vector(-0.2418, 0.9350, 0. ); 89 76 TestMolecule2->AddAtom(Walker); 90 77 Walker = World::getInstance().createAtom(); 78 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 91 79 Walker->type = hydrogen; 92 80 *Walker->node = Vector(0.9658, 0., 0. ); 93 81 TestMolecule2->AddAtom(Walker); 94 82 Walker = World::getInstance().createAtom(); 83 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 95 84 Walker->type = oxygen; 96 85 *Walker->node = Vector(0., 0., 0. ); … … 98 87 99 88 molecules = World::getInstance().getMolecules(); 89 CPPUNIT_ASSERT(molecules != NULL && "could not obtain list of molecules"); 100 90 molecules->insert(TestMolecule1); 101 91 molecules->insert(TestMolecule2); … … 107 97 // create a small file with table 108 98 BG = new BondGraph(true); 99 CPPUNIT_ASSERT(BG != NULL && "could not create BondGraph"); 109 100 110 101 // construct bond graphs … … 122 113 123 114 World::purgeInstance(); 124 MemoryUsageObserver::purgeInstance();125 115 }; 126 116 … … 154 144 { 155 145 double *mirror = new double[3]; 146 CPPUNIT_ASSERT(mirror != NULL && "could not create array of doubles"); 156 147 for (int i=0;i<3;i++) 157 148 mirror[i] = -1.; -
src/unittests/CountBondsUnitTest.hpp
ra7b761b r1024cb 39 39 molecule *TestMolecule1; 40 40 molecule *TestMolecule2; 41 element *hydrogen; 42 element *oxygen; 43 periodentafel *tafel; 41 const element *hydrogen; 42 const element *oxygen; 44 43 45 44 BondGraph *BG; -
src/unittests/LinkedCellUnitTest.cpp
ra7b761b r1024cb 38 38 atom *Walker = NULL; 39 39 40 // init private all pointers to zero41 TestMolecule = NULL;42 hydrogen = NULL;43 tafel = NULL;44 45 40 // construct element 46 hydrogen = new element; 47 hydrogen->Z = 1; 48 hydrogen->CovalentRadius = 0.23; 49 strcpy(hydrogen->name, "hydrogen"); 50 strcpy(hydrogen->symbol, "H"); 51 52 // construct periodentafel 53 tafel = World::getInstance().getPeriode(); 54 tafel->AddElement(hydrogen); 41 hydrogen = World::getInstance().getPeriode()->FindElement(1); 42 CPPUNIT_ASSERT(hydrogen != NULL && "could not find element hydrogen"); 55 43 56 44 // construct molecule (water molecule) 57 45 TestMolecule = World::getInstance().createMolecule(); 46 CPPUNIT_ASSERT(TestMolecule != NULL && "could not create molecule"); 58 47 for (double x=0.5;x<3;x+=1.) 59 48 for (double y=0.5;y<3;y+=1.) 60 49 for (double z=0.5;z<3;z+=1.) { 61 50 Walker = World::getInstance().createAtom(); 51 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 62 52 Walker->type = hydrogen; 63 53 *Walker->node = Vector(x, y, z ); … … 67 57 // construct linked cell 68 58 LC = new LinkedCell (TestMolecule, 1.); 59 CPPUNIT_ASSERT(LC != NULL && "could not create LinkedCell"); 69 60 70 61 // check that TestMolecule was correctly constructed … … 77 68 delete(LC); 78 69 World::purgeInstance(); 79 MemoryUsageObserver::purgeInstance();80 70 }; 81 71 -
src/unittests/LinkedCellUnitTest.hpp
ra7b761b r1024cb 48 48 49 49 molecule *TestMolecule; 50 element *hydrogen; 51 periodentafel *tafel; 50 const element *hydrogen; 52 51 LinkedCell *LC; 53 52 }; -
src/unittests/Makefile.am
ra7b761b r1024cb 1 # PLEASE adhere to the alphabetical ordering in this Makefile! 2 # Also indentation by a single tab 3 1 4 INCLUDES = -I$(top_srcdir)/src 2 5 … … 30 33 MemoryAllocatorUnitTest \ 31 34 MoleculeDescriptorTest \ 35 ObserverTest \ 36 ParserUnitTest \ 37 periodentafelTest \ 32 38 PlaneUnittest \ 33 ObserverTest \34 39 SingletonTest \ 35 40 StackClassUnitTest \ … … 71 76 memoryusageobserverunittest.cpp \ 72 77 MoleculeDescriptorTest.cpp \ 78 ObserverTest.cpp \ 79 ParserUnitTest.cpp \ 80 periodentafelTest.cpp \ 73 81 PlaneUnittest.cpp \ 74 ObserverTest.cpp \75 82 SingletonTest.cpp \ 76 83 stackclassunittest.cpp \ … … 104 111 memoryusageobserverunittest.hpp \ 105 112 MoleculeDescriptorTest.hpp \ 113 periodentafelTest.hpp \ 106 114 PlaneUnittest.hpp \ 107 115 ObserverTest.hpp \ … … 114 122 115 123 124 ActionSequenceTest_SOURCES = UnitTestMain.cpp ../../../TestRunnerClient.hpp ActionSequenceTest.cpp ActionSequenceTest.hpp 125 ActionSequenceTest_LDADD = ${ALLLIBS} 126 116 127 ActOnAllUnitTest_SOURCES = UnitTestMain.cpp ../test/ActOnAllTest.hpp ActOnAllUnitTest.cpp ActOnAllUnitTest.hpp 117 128 ActOnAllUnitTest_LDADD = ${ALLLIBS} … … 132 143 atomsCalculationTest_LDADD = ${ALLLIBS} 133 144 145 AtomDescriptorTest_SOURCES = UnitTestMain.cpp AtomDescriptorTest.cpp AtomDescriptorTest.hpp 146 AtomDescriptorTest_LDADD = ${ALLLIBS} 147 134 148 BondGraphUnitTest_SOURCES = UnitTestMain.cpp bondgraphunittest.cpp bondgraphunittest.hpp 135 149 BondGraphUnitTest_LDADD = ${ALLLIBS} 136 150 151 CacheableTest_SOURCES = UnitTestMain.cpp CacheableTest.cpp CacheableTest.hpp 152 CacheableTest_LDADD = ${ALLLIBS} 153 137 154 CountBondsUnitTest_SOURCES = UnitTestMain.cpp CountBondsUnitTest.cpp CountBondsUnitTest.hpp 138 155 CountBondsUnitTest_LDADD = ${ALLLIBS} … … 162 179 LogUnitTest_LDADD = ${ALLLIBS} 163 180 164 MemoryAllocatorUnitTest_SOURCES = UnitTestMain.cpp memoryallocatorunittest.cpp memoryallocatorunittest.hpp 181 manipulateAtomsTest_SOURCES = UnitTestMain.cpp manipulateAtomsTest.cpp manipulateAtomsTest.hpp 182 manipulateAtomsTest_LDADD = ${ALLLIBS} 183 184 MemoryAllocatorUnitTest_SOURCES = UnitTestMain.cpp ../memoryallocator.hpp ../memoryallocator.cpp ../memoryusageobserver.cpp ../memoryusageobserver.hpp memoryallocatorunittest.cpp memoryallocatorunittest.hpp 165 185 MemoryAllocatorUnitTest_LDADD = ${ALLLIBS} 166 186 167 MemoryUsageObserverUnitTest_SOURCES = UnitTestMain.cpp memoryusageobserverunittest.cpp memoryusageobserverunittest.hpp187 MemoryUsageObserverUnitTest_SOURCES = UnitTestMain.cpp ../memoryallocator.hpp ../memoryusageobserver.cpp ../memoryusageobserver.hpp memoryusageobserverunittest.cpp memoryusageobserverunittest.hpp 168 188 MemoryUsageObserverUnitTest_LDADD = ${ALLLIBS} 169 189 … … 171 191 MoleculeDescriptorTest_LDADD = ${ALLLIBS} 172 192 193 ObserverTest_SOURCES = UnitTestMain.cpp ObserverTest.cpp ObserverTest.hpp 194 ObserverTest_LDADD = ${ALLLIBS} 195 196 ParserUnitTest_SOURCES = UnitTestMain.cpp ParserUnitTest.cpp ParserUnitTest.hpp 197 ParserUnitTest_LDADD = ${ALLLIBS} 198 199 periodentafelTest_SOURCES = UnitTestMain.cpp periodentafelTest.cpp periodentafelTest.hpp 200 periodentafelTest_LDADD = ${ALLLIBS} 201 173 202 PlaneUnittest_SOURCES = UnitTestMain.cpp PlaneUnittest.cpp PlaneUnittest.hpp 174 203 PlaneUnittest_LDADD = ${ALLLIBS} … … 189 218 Tesselation_InOutsideUnitTest_LDADD = ${ALLLIBS} 190 219 220 TestRunner_SOURCES = TestRunnerMain.cpp ../memoryallocator.hpp ../memoryallocator.cpp ../memoryusageobserver.cpp ../memoryusageobserver.hpp $(TESTSOURCES) $(TESTHEADERS) 221 TestRunner_LDADD = ${ALLLIBS} 222 191 223 VectorUnitTest_SOURCES = UnitTestMain.cpp vectorunittest.cpp vectorunittest.hpp 192 224 VectorUnitTest_LDADD = ${ALLLIBS} 193 225 194 ActionSequenceTest_SOURCES = UnitTestMain.cpp ../../../TestRunnerClient.hpp ActionSequenceTest.cpp ActionSequenceTest.hpp195 ActionSequenceTest_LDADD = ${ALLLIBS}196 197 ObserverTest_SOURCES = UnitTestMain.cpp ObserverTest.cpp ObserverTest.hpp198 ObserverTest_LDADD = ${ALLLIBS}199 200 CacheableTest_SOURCES = UnitTestMain.cpp CacheableTest.cpp CacheableTest.hpp201 CacheableTest_LDADD = ${ALLLIBS}202 203 AtomDescriptorTest_SOURCES = UnitTestMain.cpp AtomDescriptorTest.cpp AtomDescriptorTest.hpp204 AtomDescriptorTest_LDADD = ${ALLLIBS}205 206 manipulateAtomsTest_SOURCES = UnitTestMain.cpp manipulateAtomsTest.cpp manipulateAtomsTest.hpp207 manipulateAtomsTest_LDADD = ${ALLLIBS}208 209 TestRunner_SOURCES = TestRunnerMain.cpp $(TESTSOURCES) $(TESTHEADERS)210 TestRunner_LDADD = ${ALLLIBS}211 212 226 #AUTOMAKE_OPTIONS = parallel-tests 213 -
src/unittests/SingletonTest.cpp
ra7b761b r1024cb 52 52 count1++; 53 53 } 54 // explicit copy constructor to catch if th siis ever called54 // explicit copy constructor to catch if this is ever called 55 55 SingletonStub2(const SingletonStub2&){ 56 56 CPPUNIT_FAIL ( "Copy constructor of Singleton called" ); -
src/unittests/TestRunnerMain.cpp
ra7b761b r1024cb 6 6 */ 7 7 8 // include config.h 9 #ifdef HAVE_CONFIG_H 10 #include <config.h> 11 #endif 12 13 #ifdef HAVE_ECUT 8 14 // give the main function its correct name 9 15 #define CPPUNIT_MAIN main 10 11 16 // include the TestRunnerClient file containing the main class 12 17 #include "../../../TestRunnerClient.h" 13 18 #include "../../../TestRunnerClient.cpp" 19 #else 20 #include "UnitTestMain.cpp" 21 #endif 22 -
src/unittests/analysisbondsunittest.cpp
ra7b761b r1024cb 41 41 atom *Walker = NULL; 42 42 43 // init private all pointers to zero 44 TestMolecule = NULL; 45 hydrogen = NULL; 46 tafel = NULL; 47 48 // construct element 49 hydrogen = new element; 50 hydrogen->Z = 1; 51 hydrogen->Valence = 1; 52 hydrogen->NoValenceOrbitals = 1; 53 strcpy(hydrogen->name, "hydrogen"); 54 strcpy(hydrogen->symbol, "H"); 55 carbon = new element; 56 carbon->Z = 2; 57 carbon->Valence = 4; 58 carbon->NoValenceOrbitals = 4; 59 strcpy(carbon->name, "carbon"); 60 strcpy(carbon->symbol, "C"); 61 62 63 // construct periodentafel 64 tafel = World::getInstance().getPeriode(); 65 tafel->AddElement(hydrogen); 66 tafel->AddElement(carbon); 43 // get elements 44 hydrogen = World::getInstance().getPeriode()->FindElement(1); 45 carbon = World::getInstance().getPeriode()->FindElement(6); 46 CPPUNIT_ASSERT(hydrogen != NULL && "could not find element hydrogen"); 47 CPPUNIT_ASSERT(carbon != NULL && "could not find element carbon"); 67 48 68 49 // construct molecule (tetraeder of hydrogens) 69 50 TestMolecule = World::getInstance().createMolecule(); 51 CPPUNIT_ASSERT(TestMolecule != NULL && "could not create molecule"); 70 52 Walker = World::getInstance().createAtom(); 53 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 71 54 Walker->type = hydrogen; 72 55 *Walker->node = Vector(1.5, 0., 1.5 ); 73 56 TestMolecule->AddAtom(Walker); 74 57 Walker = World::getInstance().createAtom(); 58 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 75 59 Walker->type = hydrogen; 76 60 *Walker->node = Vector(0., 1.5, 1.5 ); 77 61 TestMolecule->AddAtom(Walker); 78 62 Walker = World::getInstance().createAtom(); 63 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 79 64 Walker->type = hydrogen; 80 65 *Walker->node = Vector(1.5, 1.5, 0. ); 81 66 TestMolecule->AddAtom(Walker); 82 67 Walker = World::getInstance().createAtom(); 68 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 83 69 Walker->type = hydrogen; 84 70 *Walker->node = Vector(0., 0., 0. ); 85 71 TestMolecule->AddAtom(Walker); 86 72 Walker = World::getInstance().createAtom(); 73 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 87 74 Walker->type = carbon; 88 75 *Walker->node = Vector(0.5, 0.5, 0.5 ); … … 94 81 // create a small file with table 95 82 filename = new string("test.dat"); 83 CPPUNIT_ASSERT(filename != NULL && "could not create string"); 96 84 ofstream test(filename->c_str()); 97 test << ".\tH\tC\n"; 98 test << "H\t1.\t1.2\n"; 99 test << "C\t1.2\t1.5\n"; 85 test << ".\tH\tHe\tLi\tBe\tB\tC\n"; 86 test << "H\t1.\t1.\t1.\t1.\t1.\t1.2\n"; 87 test << "He\t1.\t1.\t1.\t1.\t1.\t1.\n"; 88 test << "Li\t1.\t1.\t1.\t1.\t1.\t1.\n"; 89 test << "Be\t1.\t1.\t1.\t1.\t1.\t1.\n"; 90 test << "B\t1.\t1.\t1.\t1.\t1.\t1.\n"; 91 test << "C\t1.2\t1.\t1.\t1.\t1.\t1.5\n"; 100 92 test.close(); 101 93 BG = new BondGraph(true); 94 CPPUNIT_ASSERT(BG != NULL && "could not create BondGraph"); 102 95 103 96 CPPUNIT_ASSERT_EQUAL( true , BG->LoadBondLengthTable(*filename) ); 104 97 CPPUNIT_ASSERT_EQUAL( 1., BG->GetBondLength(0,0) ); 105 CPPUNIT_ASSERT_EQUAL( 1.2, BG->GetBondLength(0, 1) );106 CPPUNIT_ASSERT_EQUAL( 1.5, BG->GetBondLength( 1,1) );98 CPPUNIT_ASSERT_EQUAL( 1.2, BG->GetBondLength(0,5) ); 99 CPPUNIT_ASSERT_EQUAL( 1.5, BG->GetBondLength(5,5) ); 107 100 108 101 BG->ConstructBondGraph(TestMolecule); -
src/unittests/analysisbondsunittest.hpp
ra7b761b r1024cb 34 34 35 35 molecule *TestMolecule; 36 element *hydrogen; 37 element *carbon; 38 periodentafel *tafel; 36 const element *hydrogen; 37 const element *carbon; 39 38 40 39 BondGraph *BG; -
src/unittests/bondgraphunittest.cpp
ra7b761b r1024cb 15 15 #include <stdio.h> 16 16 #include <cstring> 17 18 #include "Helpers/Assert.hpp" 17 19 18 20 #include "World.hpp" … … 41 43 atom *Walker = NULL; 42 44 43 // init private all pointers to zero44 TestMolecule = NULL;45 hydrogen = NULL;46 tafel = NULL;47 48 45 // construct element 49 hydrogen = new element; 50 hydrogen->Z = 1; 51 hydrogen->CovalentRadius = 0.23; 52 hydrogen->VanDerWaalsRadius = 1.09; 53 strcpy(hydrogen->name, "hydrogen"); 54 strcpy(hydrogen->symbol, "H"); 55 carbon = new element; 56 carbon->Z = 2; 57 carbon->CovalentRadius = 0.68; 58 carbon->VanDerWaalsRadius = 1.7; 59 strcpy(carbon->name, "carbon"); 60 strcpy(carbon->symbol, "C"); 61 62 63 // construct periodentafel 64 tafel = World::getInstance().getPeriode(); 65 tafel->AddElement(hydrogen); 66 tafel->AddElement(carbon); 46 hydrogen = World::getInstance().getPeriode()->FindElement(1); 47 carbon = World::getInstance().getPeriode()->FindElement(6); 48 CPPUNIT_ASSERT(hydrogen != NULL && "could not find element hydrogen"); 49 CPPUNIT_ASSERT(carbon != NULL && "could not find element carbon"); 67 50 68 51 // construct molecule (tetraeder of hydrogens) 69 52 TestMolecule = World::getInstance().createMolecule(); 53 CPPUNIT_ASSERT(TestMolecule != NULL && "could not create molecule"); 70 54 Walker = World::getInstance().createAtom(); 55 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 71 56 Walker->type = carbon; 72 57 *Walker->node = Vector(1., 0., 1. ); … … 74 59 75 60 Walker = World::getInstance().createAtom(); 61 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 76 62 Walker->type = carbon; 77 63 *Walker->node = Vector(0., 1., 1. ); … … 79 65 80 66 Walker = World::getInstance().createAtom(); 67 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 81 68 Walker->type = carbon; 82 69 *Walker->node = Vector(1., 1., 0. ); … … 84 71 85 72 Walker = World::getInstance().createAtom(); 73 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 86 74 Walker->type = carbon; 87 75 *Walker->node = Vector(0., 0., 0. ); … … 93 81 // create a small file with table 94 82 dummyname = new string("dummy.dat"); 83 CPPUNIT_ASSERT(dummyname != NULL && "could not create string"); 95 84 filename = new string("test.dat"); 85 CPPUNIT_ASSERT(filename != NULL && "could not create string"); 96 86 ofstream test(filename->c_str()); 97 test << ".\tH\tC\n"; 98 test << "H\t1.\t1.2\n"; 99 test << "C\t1.2\t1.5\n"; 87 test << ".\tH\tHe\tLi\tBe\tB\tC\n"; 88 test << "H\t1.\t1.\t1.\t1.\t1.\t1.2\n"; 89 test << "He\t1.\t1.\t1.\t1.\t1.\t1.\n"; 90 test << "Li\t1.\t1.\t1.\t1.\t1.\t1.\n"; 91 test << "Be\t1.\t1.\t1.\t1.\t1.\t1.\n"; 92 test << "B\t1.\t1.\t1.\t1.\t1.\t1.\n"; 93 test << "C\t1.2\t1.\t1.\t1.\t1.\t1.5\n"; 100 94 test.close(); 101 95 BG = new BondGraph(true); 96 CPPUNIT_ASSERT(BG != NULL && "could not create BondGraph"); 102 97 }; 103 98 … … 116 111 // are all cleaned when the world is destroyed 117 112 World::purgeInstance(); 118 MemoryUsageObserver::purgeInstance();119 113 logger::purgeInstance(); 120 114 }; … … 134 128 CPPUNIT_ASSERT_EQUAL( true , BG->LoadBondLengthTable(*filename) ); 135 129 CPPUNIT_ASSERT_EQUAL( 1., BG->GetBondLength(0,0) ); 136 CPPUNIT_ASSERT_EQUAL( 1.2, BG->GetBondLength(0, 1) );137 CPPUNIT_ASSERT_EQUAL( 1.5, BG->GetBondLength( 1,1) );130 CPPUNIT_ASSERT_EQUAL( 1.2, BG->GetBondLength(0,5) ); 131 CPPUNIT_ASSERT_EQUAL( 1.5, BG->GetBondLength(5,5) ); 138 132 }; 139 133 -
src/unittests/bondgraphunittest.hpp
ra7b761b r1024cb 39 39 40 40 molecule *TestMolecule; 41 element *hydrogen; 42 element *carbon; 43 periodentafel *tafel; 41 const element *hydrogen; 42 const element *carbon; 44 43 45 44 BondGraph *BG; -
src/unittests/listofbondsunittest.cpp
ra7b761b r1024cb 38 38 atom *Walker = NULL; 39 39 40 // init private all pointers to zero41 TestMolecule = NULL;42 hydrogen = NULL;43 tafel = NULL;44 45 40 // construct element 46 hydrogen = new element; 47 hydrogen->Z = 1; 48 strcpy(hydrogen->name, "hydrogen"); 49 strcpy(hydrogen->symbol, "H"); 50 51 52 // construct periodentafel 53 tafel = World::getInstance().getPeriode(); 54 tafel->AddElement(hydrogen); 41 hydrogen = World::getInstance().getPeriode()->FindElement(1); 42 CPPUNIT_ASSERT(hydrogen != NULL && "could not find element hydrogen"); 55 43 56 44 // construct molecule (tetraeder of hydrogens) 57 45 TestMolecule = World::getInstance().createMolecule(); 58 Walker = World::getInstance().createAtom(); 46 CPPUNIT_ASSERT(TestMolecule != NULL && "could not create molecule"); 47 Walker = World::getInstance().createAtom(); 48 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 59 49 Walker->type = hydrogen; 60 50 *Walker->node = Vector(1., 0., 1. ); 61 51 TestMolecule->AddAtom(Walker); 62 52 Walker = World::getInstance().createAtom(); 53 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 63 54 Walker->type = hydrogen; 64 55 *Walker->node = Vector(0., 1., 1. ); 65 56 TestMolecule->AddAtom(Walker); 66 57 Walker = World::getInstance().createAtom(); 58 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 67 59 Walker->type = hydrogen; 68 60 *Walker->node = Vector(1., 1., 0. ); 69 61 TestMolecule->AddAtom(Walker); 70 62 Walker = World::getInstance().createAtom(); 63 CPPUNIT_ASSERT(Walker != NULL && "could not create atom"); 71 64 Walker->type = hydrogen; 72 65 *Walker->node = Vector(0., 0., 0. ); … … 75 68 // check that TestMolecule was correctly constructed 76 69 CPPUNIT_ASSERT_EQUAL( TestMolecule->getAtomCount(), 4 ); 77 78 70 }; 79 71 … … 86 78 // are all cleaned when the world is destroyed 87 79 World::purgeInstance(); 88 MemoryUsageObserver::purgeInstance();89 80 logger::purgeInstance(); 90 81 }; -
src/unittests/listofbondsunittest.hpp
ra7b761b r1024cb 43 43 44 44 molecule *TestMolecule; 45 element *hydrogen; 46 periodentafel *tafel; 45 const element *hydrogen; 47 46 }; 48 47 -
src/unittests/memoryallocatorunittest.cpp
ra7b761b r1024cb 12 12 #include "memoryallocator.hpp" 13 13 #include "memoryallocatorunittest.hpp" 14 #include "memoryusageobserver.hpp" 14 15 #include "helpers.hpp" 15 16 #include "log.hpp" -
src/unittests/stackclassunittest.cpp
ra7b761b r1024cb 37 37 Stack->ClearStack(); 38 38 delete(Stack); 39 MemoryUsageObserver::purgeInstance();40 39 logger::purgeInstance(); 41 40 }; -
src/unittests/tesselation_boundarytriangleunittest.cpp
ra7b761b r1024cb 70 70 delete tesselpoints[i]; 71 71 } 72 MemoryUsageObserver::purgeInstance();73 72 logger::purgeInstance(); 74 73 errorLogger::purgeInstance(); -
src/unittests/tesselation_insideoutsideunittest.cpp
ra7b761b r1024cb 134 134 } 135 135 Corners.clear(); 136 MemoryUsageObserver::purgeInstance();137 136 logger::purgeInstance(); 138 137 errorLogger::purgeInstance(); -
src/unittests/tesselationunittest.cpp
ra7b761b r1024cb 106 106 } 107 107 Corners.clear(); 108 MemoryUsageObserver::purgeInstance();109 108 logger::purgeInstance(); 110 109 errorLogger::purgeInstance(); -
src/unittests/vectorunittest.cpp
ra7b761b r1024cb 49 49 void VectorTest::tearDown() 50 50 { 51 MemoryUsageObserver::purgeInstance();52 51 logger::purgeInstance(); 53 52 errorLogger::purgeInstance(); -
src/vector.cpp
ra7b761b r1024cb 543 543 // truncate to [0,1] for each axis 544 544 for (int i=0;i<NDIM;i++) { 545 x[i] += 0.5; // set to center of box545 //x[i] += 0.5; // set to center of box 546 546 while (x[i] >= 1.) 547 547 x[i] -= 1.; -
tests/Makefile.am
ra7b761b r1024cb 1 AUTOM4TE = autom4te 2 EXTRA_DIST = testsuite.at $(TESTSUITE) atlocal.in regression 3 TESTSUITE = $(srcdir)/testsuite 1 SUBDIRS = regression Tesselations 4 2 5 SUBDIRS = Tesselations6 7 check-local: atconfig atlocal package.m4 $(TESTSUITE)8 $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)9 10 installcheck-local: atconfig atlocal $(TESTSUITE)11 $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \12 $(TESTSUITEFLAGS)13 14 clean-local:15 test ! -f '$(TESTSUITE)' || \16 $(SHELL) '$(TESTSUITE)' --clean17 18 AUTOTEST = $(AUTOM4TE) --language=autotest19 $(TESTSUITE): $(srcdir)/testsuite.at20 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at21 mv $@.tmp $@22 23 # The `:;' works around a Bash 3.2 bug when the output is not writeable.24 $(srcdir)/package.m4: $(top_srcdir)/configure.ac25 :;{ \26 echo '# Signature of the current package.' && \27 echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])' && \28 echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])' && \29 echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])' && \30 echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])' && \31 echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \32 } >'$(srcdir)/package.m4' -
tests/Tesselations/defs.in
ra7b761b r1024cb 30 30 CLEANUP="$CLEANUP; rm -rf $testdir" 31 31 cp -r @srcdir@/$testdir/* $testdir/ 32 cd $testdir33 32 CLEANUP="rm -f stderr stdout diffstderr diffstdout; cd ..; $CLEANUP" 34 33 CLEANUP="rm -f *.conf*; rm -f NonConvexEnvelope*; rm -f ${testdir}.xyz; rm -f ${testdir}.dbond; $CLEANUP" … … 52 51 FILENAME="NonConvexEnvelope" 53 52 exitcode=0 54 cd $ RADIUS53 cd $testdir/$RADIUS 55 54 #echo "Current dir is `pwd`, calling $MOLECUILDER $mol.conf -e $exec_prefix -p ../$mol.xyz -N $RADIUS $FILENAME." 56 55 if [ -e $mol.dbond ]; then … … 62 61 #cat stderr 63 62 #cat stdout 64 diff ${FILENAME}.dat ../@srcdir@/$mol/$2/${FILENAME}-$mol.dat 2>diffstderr >diffstdout || exitcode=$? 63 grep -E "^[0-9]* [0-9]* [0-9]*$" ../../../../../molecuilder/tests/Tesselations/$mol/$2/${FILENAME}-$mol.dat | sort -n >reference-triangles.dat 64 grep -E "^[0-9]* [0-9]* [0-9]*$" ${FILENAME}.dat | sort -n >new-triangles.dat 65 diff reference-triangles.dat new-triangles.dat 2>diffstderr >diffstdout || exitcode=$? 65 66 #echo "Diff done with exitcode $exitcode." 66 67 #cat diffstderr 67 68 #cat diffstdout 68 cd .. 69 cd ../.. 69 70 test $exitcode = $expected_exitcode || exit 1 70 71 } -
tests/regression/Tesselation/1/post/NonConvexEnvelope.r3d
ra7b761b r1024cb 3 3 # All atoms as spheres 4 4 2 5 1. 37419 -0.26503-4.44089e-16 0.1 1. 1. 1.5 1.24926 -0.240937 -4.44089e-16 0.1 1. 1. 1. 6 6 2 7 0.12489 0.61837-4.44089e-16 0.1 1. 1. 1.7 -3.63639e-05 0.642463 -4.44089e-16 0.1 1. 1. 1. 8 8 2 9 -1. 12431 -0.26503-4.44089e-16 0.1 1. 1. 1.9 -1.24924 -0.240937 -4.44089e-16 0.1 1. 1. 1. 10 10 2 11 1. 37419 -0.89433-0.89 0.1 1. 1. 1.11 1.24926 -0.870237 -0.89 0.1 1. 1. 1. 12 12 2 13 1. 37419 -0.894330.89 0.1 1. 1. 1.13 1.24926 -0.870237 0.89 0.1 1. 1. 1. 14 14 2 15 2. 26414 0.364321-4.44089e-16 0.1 1. 1. 1.15 2.13922 0.388414 -4.44089e-16 0.1 1. 1. 1. 16 16 2 17 0.12489 1.24767-0.89 0.1 1. 1. 1.17 -3.63639e-05 1.27176 -0.89 0.1 1. 1. 1. 18 18 2 19 0.12489 1.247670.89 0.1 1. 1. 1.19 -3.63639e-05 1.27176 0.89 0.1 1. 1. 1. 20 20 2 21 -2. 01426 0.364321-4.44089e-16 0.1 1. 1. 1.21 -2.13919 0.388414 -4.44089e-16 0.1 1. 1. 1. 22 22 2 23 -1. 12431 -0.89433-0.89 0.1 1. 1. 1.23 -1.24924 -0.870237 -0.89 0.1 1. 1. 1. 24 24 2 25 -1. 12431 -0.894330.89 0.1 1. 1. 1.25 -1.24924 -0.870237 0.89 0.1 1. 1. 1. 26 26 # All tesselation triangles 27 27 8 … … 30 30 BACKFACE 0.3 0.3 1.0 0 0 31 31 1 32 1. 37419 -0.89433 -0.89 2.26414 0.364321 -4.44089e-16 0.12489 1.24767-0.89 1. 0. 0.32 1.24926 -0.870237 -0.89 2.13922 0.388414 -4.44089e-16 -3.63639e-05 1.27176 -0.89 1. 0. 0. 33 33 1 34 1. 37419 -0.89433 -0.89 0.12489 1.24767 -0.89 -1.12431 -0.89433-0.89 1. 0. 0.34 1.24926 -0.870237 -0.89 -3.63639e-05 1.27176 -0.89 -1.24924 -0.870237 -0.89 1. 0. 0. 35 35 1 36 0.12489 1.24767 -0.89 -2.01426 0.364321 -4.44089e-16 -1.12431 -0.89433-0.89 1. 0. 0.36 -3.63639e-05 1.27176 -0.89 -2.13919 0.388414 -4.44089e-16 -1.24924 -0.870237 -0.89 1. 0. 0. 37 37 1 38 2. 26414 0.364321 -4.44089e-16 0.12489 1.24767 -0.89 0.12489 1.247670.89 1. 0. 0.38 2.13922 0.388414 -4.44089e-16 -3.63639e-05 1.27176 -0.89 -3.63639e-05 1.27176 0.89 1. 0. 0. 39 39 1 40 0.12489 1.24767 -0.89 0.12489 1.24767 0.89 -2.01426 0.364321-4.44089e-16 1. 0. 0.40 -3.63639e-05 1.27176 -0.89 -3.63639e-05 1.27176 0.89 -2.13919 0.388414 -4.44089e-16 1. 0. 0. 41 41 1 42 1. 37419 -0.89433 0.89 2.26414 0.364321 -4.44089e-16 0.12489 1.247670.89 1. 0. 0.42 1.24926 -0.870237 0.89 2.13922 0.388414 -4.44089e-16 -3.63639e-05 1.27176 0.89 1. 0. 0. 43 43 1 44 1. 37419 -0.89433 0.89 0.12489 1.24767 0.89 -1.12431 -0.894330.89 1. 0. 0.44 1.24926 -0.870237 0.89 -3.63639e-05 1.27176 0.89 -1.24924 -0.870237 0.89 1. 0. 0. 45 45 1 46 0.12489 1.24767 0.89 -2.01426 0.364321 -4.44089e-16 -1.12431 -0.894330.89 1. 0. 0.46 -3.63639e-05 1.27176 0.89 -2.13919 0.388414 -4.44089e-16 -1.24924 -0.870237 0.89 1. 0. 0. 47 47 1 48 -2. 01426 0.364321 -4.44089e-16 -1.12431 -0.89433 -0.89 -1.12431 -0.894330.89 1. 0. 0.48 -2.13919 0.388414 -4.44089e-16 -1.24924 -0.870237 -0.89 -1.24924 -0.870237 0.89 1. 0. 0. 49 49 1 50 1. 37419 -0.89433 0.89 -1.12431 -0.89433 -0.89 -1.12431 -0.894330.89 1. 0. 0.50 1.24926 -0.870237 0.89 -1.24924 -0.870237 -0.89 -1.24924 -0.870237 0.89 1. 0. 0. 51 51 1 52 1. 37419 -0.89433 -0.89 1.37419 -0.89433 0.89 -1.12431 -0.89433-0.89 1. 0. 0.52 1.24926 -0.870237 -0.89 1.24926 -0.870237 0.89 -1.24924 -0.870237 -0.89 1. 0. 0. 53 53 1 54 1. 37419 -0.89433 -0.89 1.37419 -0.89433 0.89 2.26414 0.364321-4.44089e-16 1. 0. 0.54 1.24926 -0.870237 -0.89 1.24926 -0.870237 0.89 2.13922 0.388414 -4.44089e-16 1. 0. 0. 55 55 9 56 56 # terminating special property … … 59 59 25.0 0.6 -1.0 -1.0 -1.0 0.2 0 0 0 0 60 60 2 61 1. 67084 -0.47478-8.88178e-16 5 1 0 061 1.54591 -0.450686 -8.88178e-16 5 1 0 0 62 62 9 63 63 terminating special property -
tests/regression/Tesselation/2/post/ConvexEnvelope.r3d
ra7b761b r1024cb 3 3 # All atoms as spheres 4 4 2 5 1. 37419 -0.26503-4.44089e-16 0.1 1. 1. 1.5 1.24926 -0.240937 -4.44089e-16 0.1 1. 1. 1. 6 6 2 7 0.12489 0.61837-4.44089e-16 0.1 1. 1. 1.7 -3.63639e-05 0.642463 -4.44089e-16 0.1 1. 1. 1. 8 8 2 9 -1. 12431 -0.26503-4.44089e-16 0.1 1. 1. 1.9 -1.24924 -0.240937 -4.44089e-16 0.1 1. 1. 1. 10 10 2 11 1. 37419 -0.89433-0.89 0.1 1. 1. 1.11 1.24926 -0.870237 -0.89 0.1 1. 1. 1. 12 12 2 13 1. 37419 -0.894330.89 0.1 1. 1. 1.13 1.24926 -0.870237 0.89 0.1 1. 1. 1. 14 14 2 15 2. 26414 0.364321-4.44089e-16 0.1 1. 1. 1.15 2.13922 0.388414 -4.44089e-16 0.1 1. 1. 1. 16 16 2 17 0.12489 1.24767-0.89 0.1 1. 1. 1.17 -3.63639e-05 1.27176 -0.89 0.1 1. 1. 1. 18 18 2 19 0.12489 1.247670.89 0.1 1. 1. 1.19 -3.63639e-05 1.27176 0.89 0.1 1. 1. 1. 20 20 2 21 -2. 01426 0.364321-4.44089e-16 0.1 1. 1. 1.21 -2.13919 0.388414 -4.44089e-16 0.1 1. 1. 1. 22 22 2 23 -1. 12431 -0.89433-0.89 0.1 1. 1. 1.23 -1.24924 -0.870237 -0.89 0.1 1. 1. 1. 24 24 2 25 -1. 12431 -0.894330.89 0.1 1. 1. 1.25 -1.24924 -0.870237 0.89 0.1 1. 1. 1. 26 26 # All tesselation triangles 27 27 8 … … 30 30 BACKFACE 0.3 0.3 1.0 0 0 31 31 1 32 1. 37419 -0.89433 -0.89 2.26414 0.364321 -4.44089e-16 0.12489 1.24767-0.89 1. 0. 0.32 1.24926 -0.870237 -0.89 2.13922 0.388414 -4.44089e-16 -3.63639e-05 1.27176 -0.89 1. 0. 0. 33 33 1 34 1. 37419 -0.89433 -0.89 0.12489 1.24767 -0.89 -1.12431 -0.89433-0.89 1. 0. 0.34 1.24926 -0.870237 -0.89 -3.63639e-05 1.27176 -0.89 -1.24924 -0.870237 -0.89 1. 0. 0. 35 35 1 36 0.12489 1.24767 -0.89 -2.01426 0.364321 -4.44089e-16 -1.12431 -0.89433-0.89 1. 0. 0.36 -3.63639e-05 1.27176 -0.89 -2.13919 0.388414 -4.44089e-16 -1.24924 -0.870237 -0.89 1. 0. 0. 37 37 1 38 2. 26414 0.364321 -4.44089e-16 0.12489 1.24767 -0.89 0.12489 1.247670.89 1. 0. 0.38 2.13922 0.388414 -4.44089e-16 -3.63639e-05 1.27176 -0.89 -3.63639e-05 1.27176 0.89 1. 0. 0. 39 39 1 40 0.12489 1.24767 -0.89 0.12489 1.24767 0.89 -2.01426 0.364321-4.44089e-16 1. 0. 0.40 -3.63639e-05 1.27176 -0.89 -3.63639e-05 1.27176 0.89 -2.13919 0.388414 -4.44089e-16 1. 0. 0. 41 41 1 42 1. 37419 -0.89433 0.89 2.26414 0.364321 -4.44089e-16 0.12489 1.247670.89 1. 0. 0.42 1.24926 -0.870237 0.89 2.13922 0.388414 -4.44089e-16 -3.63639e-05 1.27176 0.89 1. 0. 0. 43 43 1 44 1. 37419 -0.89433 0.89 0.12489 1.24767 0.89 -1.12431 -0.894330.89 1. 0. 0.44 1.24926 -0.870237 0.89 -3.63639e-05 1.27176 0.89 -1.24924 -0.870237 0.89 1. 0. 0. 45 45 1 46 0.12489 1.24767 0.89 -2.01426 0.364321 -4.44089e-16 -1.12431 -0.894330.89 1. 0. 0.46 -3.63639e-05 1.27176 0.89 -2.13919 0.388414 -4.44089e-16 -1.24924 -0.870237 0.89 1. 0. 0. 47 47 1 48 -2. 01426 0.364321 -4.44089e-16 -1.12431 -0.89433 -0.89 -1.12431 -0.894330.89 1. 0. 0.48 -2.13919 0.388414 -4.44089e-16 -1.24924 -0.870237 -0.89 -1.24924 -0.870237 0.89 1. 0. 0. 49 49 1 50 1. 37419 -0.89433 0.89 -1.12431 -0.89433 -0.89 -1.12431 -0.894330.89 1. 0. 0.50 1.24926 -0.870237 0.89 -1.24924 -0.870237 -0.89 -1.24924 -0.870237 0.89 1. 0. 0. 51 51 1 52 1. 37419 -0.89433 -0.89 1.37419 -0.89433 0.89 -1.12431 -0.89433-0.89 1. 0. 0.52 1.24926 -0.870237 -0.89 1.24926 -0.870237 0.89 -1.24924 -0.870237 -0.89 1. 0. 0. 53 53 1 54 1. 37419 -0.89433 -0.89 1.37419 -0.89433 0.89 2.26414 0.364321-4.44089e-16 1. 0. 0.54 1.24926 -0.870237 -0.89 1.24926 -0.870237 0.89 2.13922 0.388414 -4.44089e-16 1. 0. 0. 55 55 9 56 56 # terminating special property … … 59 59 25.0 0.6 -1.0 -1.0 -1.0 0.2 0 0 0 0 60 60 2 61 1. 67084 -0.47478-8.88178e-16 5 1 0 061 1.54591 -0.450686 -8.88178e-16 5 1 0 0 62 62 9 63 63 terminating special property -
tests/regression/Tesselation/2/post/NonConvexEnvelope.r3d
ra7b761b r1024cb 3 3 # All atoms as spheres 4 4 2 5 1. 37419 -0.26503-4.44089e-16 0.1 1. 1. 1.5 1.24926 -0.240937 -4.44089e-16 0.1 1. 1. 1. 6 6 2 7 0.12489 0.61837-4.44089e-16 0.1 1. 1. 1.7 -3.63639e-05 0.642463 -4.44089e-16 0.1 1. 1. 1. 8 8 2 9 -1. 12431 -0.26503-4.44089e-16 0.1 1. 1. 1.9 -1.24924 -0.240937 -4.44089e-16 0.1 1. 1. 1. 10 10 2 11 1. 37419 -0.89433-0.89 0.1 1. 1. 1.11 1.24926 -0.870237 -0.89 0.1 1. 1. 1. 12 12 2 13 1. 37419 -0.894330.89 0.1 1. 1. 1.13 1.24926 -0.870237 0.89 0.1 1. 1. 1. 14 14 2 15 2. 26414 0.364321-4.44089e-16 0.1 1. 1. 1.15 2.13922 0.388414 -4.44089e-16 0.1 1. 1. 1. 16 16 2 17 0.12489 1.24767-0.89 0.1 1. 1. 1.17 -3.63639e-05 1.27176 -0.89 0.1 1. 1. 1. 18 18 2 19 0.12489 1.247670.89 0.1 1. 1. 1.19 -3.63639e-05 1.27176 0.89 0.1 1. 1. 1. 20 20 2 21 -2. 01426 0.364321-4.44089e-16 0.1 1. 1. 1.21 -2.13919 0.388414 -4.44089e-16 0.1 1. 1. 1. 22 22 2 23 -1. 12431 -0.89433-0.89 0.1 1. 1. 1.23 -1.24924 -0.870237 -0.89 0.1 1. 1. 1. 24 24 2 25 -1. 12431 -0.894330.89 0.1 1. 1. 1.25 -1.24924 -0.870237 0.89 0.1 1. 1. 1. 26 26 # All tesselation triangles 27 27 8 … … 30 30 BACKFACE 0.3 0.3 1.0 0 0 31 31 1 32 1. 37419 -0.89433 -0.89 2.26414 0.364321 -4.44089e-16 0.12489 1.24767-0.89 1. 0. 0.32 1.24926 -0.870237 -0.89 2.13922 0.388414 -4.44089e-16 -3.63639e-05 1.27176 -0.89 1. 0. 0. 33 33 1 34 1. 37419 -0.89433 -0.89 0.12489 1.24767 -0.89 -1.12431 -0.89433-0.89 1. 0. 0.34 1.24926 -0.870237 -0.89 -3.63639e-05 1.27176 -0.89 -1.24924 -0.870237 -0.89 1. 0. 0. 35 35 1 36 0.12489 1.24767 -0.89 -2.01426 0.364321 -4.44089e-16 -1.12431 -0.89433-0.89 1. 0. 0.36 -3.63639e-05 1.27176 -0.89 -2.13919 0.388414 -4.44089e-16 -1.24924 -0.870237 -0.89 1. 0. 0. 37 37 1 38 2. 26414 0.364321 -4.44089e-16 0.12489 1.24767 -0.89 0.12489 1.247670.89 1. 0. 0.38 2.13922 0.388414 -4.44089e-16 -3.63639e-05 1.27176 -0.89 -3.63639e-05 1.27176 0.89 1. 0. 0. 39 39 1 40 0.12489 1.24767 -0.89 0.12489 1.24767 0.89 -2.01426 0.364321-4.44089e-16 1. 0. 0.40 -3.63639e-05 1.27176 -0.89 -3.63639e-05 1.27176 0.89 -2.13919 0.388414 -4.44089e-16 1. 0. 0. 41 41 1 42 1. 37419 -0.89433 0.89 2.26414 0.364321 -4.44089e-16 0.12489 1.247670.89 1. 0. 0.42 1.24926 -0.870237 0.89 2.13922 0.388414 -4.44089e-16 -3.63639e-05 1.27176 0.89 1. 0. 0. 43 43 1 44 1. 37419 -0.89433 0.89 0.12489 1.24767 0.89 -1.12431 -0.894330.89 1. 0. 0.44 1.24926 -0.870237 0.89 -3.63639e-05 1.27176 0.89 -1.24924 -0.870237 0.89 1. 0. 0. 45 45 1 46 0.12489 1.24767 0.89 -2.01426 0.364321 -4.44089e-16 -1.12431 -0.894330.89 1. 0. 0.46 -3.63639e-05 1.27176 0.89 -2.13919 0.388414 -4.44089e-16 -1.24924 -0.870237 0.89 1. 0. 0. 47 47 1 48 -2. 01426 0.364321 -4.44089e-16 -1.12431 -0.89433 -0.89 -1.12431 -0.894330.89 1. 0. 0.48 -2.13919 0.388414 -4.44089e-16 -1.24924 -0.870237 -0.89 -1.24924 -0.870237 0.89 1. 0. 0. 49 49 1 50 1. 37419 -0.89433 0.89 -1.12431 -0.89433 -0.89 -1.12431 -0.894330.89 1. 0. 0.50 1.24926 -0.870237 0.89 -1.24924 -0.870237 -0.89 -1.24924 -0.870237 0.89 1. 0. 0. 51 51 1 52 1. 37419 -0.89433 -0.89 1.37419 -0.89433 0.89 -1.12431 -0.89433-0.89 1. 0. 0.52 1.24926 -0.870237 -0.89 1.24926 -0.870237 0.89 -1.24924 -0.870237 -0.89 1. 0. 0. 53 53 1 54 1. 37419 -0.89433 -0.89 1.37419 -0.89433 0.89 2.26414 0.364321-4.44089e-16 1. 0. 0.54 1.24926 -0.870237 -0.89 1.24926 -0.870237 0.89 2.13922 0.388414 -4.44089e-16 1. 0. 0. 55 55 9 56 56 # terminating special property … … 59 59 25.0 0.6 -1.0 -1.0 -1.0 0.2 0 0 0 0 60 60 2 61 1. 67084 -0.47478-8.88178e-16 5 1 0 061 1.54591 -0.450686 -8.88178e-16 5 1 0 0 62 62 9 63 63 terminating special property -
tests/regression/Tesselation/3/post/NonConvexEnvelope.r3d
ra7b761b r1024cb 3 3 # All atoms as spheres 4 4 2 5 0.9 52534 -3.05798 0.4201710.1 1. 1. 1.6 2 7 -0.1 39866 -1.98848 0.3597710.1 1. 1. 1.8 2 9 0.0 788342 -1.07508 -0.8752290.1 1. 1. 1.10 2 11 -1. 49147 -2.63828 0.0780712 0.1 1. 1. 1.12 2 13 -0.0 588658 -1.09478 1.583470.1 1. 1. 1.14 2 15 1.5 3473 -0.644479 -0.8681290.1 1. 1. 1.16 2 17 -0.3 33166 -2.00128 -2.024430.1 1. 1. 1.18 2 19 -2.6 2147 -1.78218 0.6535710.1 1. 1. 1.20 2 21 -1.6 0077 -2.70398 -1.465630.1 1. 1. 1.22 2 23 1.3 7913 -0.560579 1.656070.1 1. 1. 1.24 2 25 1.7 5933 0.205421 0.3953710.1 1. 1. 1.26 2 27 1.7 9893 0.246421 -2.088830.1 1. 1. 1.28 2 29 -2.6 4037 -0.423279 -0.0491288 0.1 1. 1. 1.30 2 31 -3.9 6017 -2.48928 0.4326710.1 1. 1. 1.32 2 33 3.2 3013 0.593821 0.4844710.1 1. 1. 1.34 2 35 3.1 4803 0.889821 -1.968330.1 1. 1. 1.36 2 37 -3. 79507 0.418021 0.4983710.1 1. 1. 1.38 2 39 3.3 6023 1.76962 1.454870.1 1. 1. 1.40 2 41 3.7 8273 1.01752 -0.8494290.1 1. 1. 1.42 2 43 4.0 7093 -0.563879 1.017670.1 1. 1. 1.44 2 45 -3.8 1397 1.77692 -0.2043290.1 1. 1. 1.46 2 47 5.1 7783 1.62112 -0.8428290.1 1. 1. 1.48 2 49 5.4 9863 -0.464179 0.4820710.1 1. 1. 1.50 2 51 -4.9 6867 2.61822 0.3431710.1 1. 1. 1.52 2 53 5.9 3083 0.990421 0.3373710.1 1. 1. 1.54 2 55 - 4.98757 3.97722 -0.3595290.1 1. 1. 1.56 2 57 -6. 29237 1.89422 0.0890712 0.1 1. 1. 1.58 2 59 7.3 3693 1.04442 0.0886712 0.1 1. 1. 1.60 2 61 0.7 90434 -3.69418 1.290270.1 1. 1. 1.62 2 63 0.9 17634 -3.66448 -0.4848290.1 1. 1. 1.64 2 65 1.9 2773 -2.57738 0.4980710.1 1. 1. 1.66 2 67 -0.5 74266 -0.203779 -0.8247290.1 1. 1. 1.68 2 69 -1.5 2417 -3.64138 0.5034710.1 1. 1. 1.70 2 71 -0.7 59066 -0.265179 1.484870.1 1. 1. 1.72 2 73 -0. 287266 -1.67078 2.480170.1 1. 1. 1.74 2 75 2.1 9193 -1.51408 -0.8676290.1 1. 1. 1.76 2 77 -0.5 73766 -1.42458 -2.917530.1 1. 1. 1.78 2 79 0.4 50934 -2.72908 -2.233530.1 1. 1. 1.80 2 81 -2.4 5927 -1.63678 1.721570.1 1. 1. 1.82 2 83 -1.6 2867 -3.74268 -1.794930.1 1. 1. 1.84 2 85 -2. 49667 -2.18078 -1.799930.1 1. 1. 1.86 2 87 1.4 6453 0.112321 2.509270.1 1. 1. 1.88 2 89 2.0 6173 -1.39848 1.797870.1 1. 1. 1.90 2 91 1.1 5633 1.11082 0.3266710.1 1. 1. 1.92 2 93 1.7 6663 -0.360379 -2.993730.1 1. 1. 1.94 2 95 1.0 3283 1.01972 -2.145330.1 1. 1. 1.96 2 97 -1. 69727 0.0925205 0.1319710.1 1. 1. 1.98 2 99 -2.7 7417 -0.570279 -1.120830.1 1. 1. 1.100 2 101 -4.7 5167 -1.93408 0.9359710.1 1. 1. 1.102 2 103 -4.1 7327 -2.53828 -0.6352290.1 1. 1. 1.104 2 105 -3.9 0927 -3.49908 0.8397710.1 1. 1. 1.106 2 107 3.6 2023 1.25552 -2.868130.1 1. 1. 1.108 2 109 -4.7 3807 -0.0977795 0.3173710.1 1. 1. 1.110 2 111 -3.6 6127 0.565021 1.570070.1 1. 1. 1.112 2 113 3.2 4233 1.41142 2.477570.1 1. 1. 1.114 2 115 4.3 4293 2.22742 1.341170.1 1. 1. 1.116 2 117 2.5 8823 2.50762 1.237070.1 1. 1. 1.118 2 119 4.0 8983 -0.525479 2.106870.1 1. 1. 1.120 2 121 3.6 2993 -1.50808 0.6983710.1 1. 1. 1.122 2 123 -2.8 7097 2.29272 -0.0233288 0.1 1. 1. 1.124 2 125 -3.9 4777 1.63002 -1.276030.1 1. 1. 1.126 2 127 5.6 8853 1.38852 -1.777230.1 1. 1. 1.128 2 129 5.1 1553 2.70122 -0.7102290.1 1. 1. 1.130 2 131 6.1 7523 -0.969279 1.171270.1 1. 1. 1.132 2 133 5.5 5043 -0.952879 -0.4909290.1 1. 1. 1.134 2 135 -4.8 3487 2.76522 1.414870.1 1. 1. 1.136 2 137 5. 70193 1.54062 1.250070.1 1. 1. 1.138 2 139 -5.8 1017 4.57652 0.0304712 0.1 1. 1. 1.140 2 141 -4.0 4457 4.49292 -0.1785290.1 1. 1. 1.142 2 143 -5.1 2137 3.83022 -1.431230.1 1. 1. 1.144 2 145 -6.2 7887 0.926121 0.5896710.1 1. 1. 1.146 2 147 -7.1 1497 2.49352 0.4790710.1 1. 1. 1.148 2 149 -6.4 2617 1.74722 -0.9826290.1 1. 1. 1.150 2 151 7.5 6833 1.97852 -0.006328770.1 1. 1. 1.5 0.939662 -3.01666 0.414493 0.1 1. 1. 1. 6 2 7 -0.152738 -1.94716 0.354093 0.1 1. 1. 1. 8 2 9 0.0659622 -1.03376 -0.880907 0.1 1. 1. 1. 10 2 11 -1.50434 -2.59696 0.0723932 0.1 1. 1. 1. 12 2 13 -0.0717378 -1.05346 1.57779 0.1 1. 1. 1. 14 2 15 1.52186 -0.603155 -0.873807 0.1 1. 1. 1. 16 2 17 -0.346038 -1.95996 -2.03011 0.1 1. 1. 1. 18 2 19 -2.63434 -1.74086 0.647893 0.1 1. 1. 1. 20 2 21 -1.61364 -2.66266 -1.47131 0.1 1. 1. 1. 22 2 23 1.36626 -0.519255 1.65039 0.1 1. 1. 1. 24 2 25 1.74646 0.246745 0.389693 0.1 1. 1. 1. 26 2 27 1.78606 0.287745 -2.09451 0.1 1. 1. 1. 28 2 29 -2.65324 -0.381955 -0.0548068 0.1 1. 1. 1. 30 2 31 -3.97304 -2.44796 0.426993 0.1 1. 1. 1. 32 2 33 3.21726 0.635145 0.478793 0.1 1. 1. 1. 34 2 35 3.13516 0.931145 -1.97401 0.1 1. 1. 1. 36 2 37 -3.80794 0.459345 0.492693 0.1 1. 1. 1. 38 2 39 3.34736 1.81094 1.44919 0.1 1. 1. 1. 40 2 41 3.76986 1.05884 -0.855107 0.1 1. 1. 1. 42 2 43 4.05806 -0.522555 1.01199 0.1 1. 1. 1. 44 2 45 -3.82684 1.81824 -0.210007 0.1 1. 1. 1. 46 2 47 5.16496 1.66244 -0.848507 0.1 1. 1. 1. 48 2 49 5.48576 -0.422855 0.476393 0.1 1. 1. 1. 50 2 51 -4.98154 2.65954 0.337493 0.1 1. 1. 1. 52 2 53 5.91796 1.03174 0.331693 0.1 1. 1. 1. 54 2 55 -5.00044 4.01854 -0.365207 0.1 1. 1. 1. 56 2 57 -6.30524 1.93554 0.0833932 0.1 1. 1. 1. 58 2 59 7.32406 1.08574 0.0829932 0.1 1. 1. 1. 60 2 61 0.777562 -3.65286 1.28459 0.1 1. 1. 1. 62 2 63 0.904762 -3.62316 -0.490507 0.1 1. 1. 1. 64 2 65 1.91486 -2.53606 0.492393 0.1 1. 1. 1. 66 2 67 -0.587138 -0.162455 -0.830407 0.1 1. 1. 1. 68 2 69 -1.53704 -3.60006 0.497793 0.1 1. 1. 1. 70 2 71 -0.771938 -0.223855 1.47919 0.1 1. 1. 1. 72 2 73 -0.300138 -1.62946 2.47449 0.1 1. 1. 1. 74 2 75 2.17906 -1.47276 -0.873307 0.1 1. 1. 1. 76 2 77 -0.586638 -1.38326 -2.92321 0.1 1. 1. 1. 78 2 79 0.438062 -2.68776 -2.23921 0.1 1. 1. 1. 80 2 81 -2.47214 -1.59546 1.71589 0.1 1. 1. 1. 82 2 83 -1.64154 -3.70136 -1.80061 0.1 1. 1. 1. 84 2 85 -2.50954 -2.13946 -1.80561 0.1 1. 1. 1. 86 2 87 1.45166 0.153645 2.50359 0.1 1. 1. 1. 88 2 89 2.04886 -1.35716 1.79219 0.1 1. 1. 1. 90 2 91 1.14346 1.15214 0.320993 0.1 1. 1. 1. 92 2 93 1.75376 -0.319055 -2.99941 0.1 1. 1. 1. 94 2 95 1.01996 1.06104 -2.15101 0.1 1. 1. 1. 96 2 97 -1.71014 0.133845 0.126293 0.1 1. 1. 1. 98 2 99 -2.78704 -0.528955 -1.12651 0.1 1. 1. 1. 100 2 101 -4.76454 -1.89276 0.930293 0.1 1. 1. 1. 102 2 103 -4.18614 -2.49696 -0.640907 0.1 1. 1. 1. 104 2 105 -3.92214 -3.45776 0.834093 0.1 1. 1. 1. 106 2 107 3.60736 1.29684 -2.87381 0.1 1. 1. 1. 108 2 109 -4.75094 -0.0564554 0.311693 0.1 1. 1. 1. 110 2 111 -3.67414 0.606345 1.56439 0.1 1. 1. 1. 112 2 113 3.22946 1.45274 2.47189 0.1 1. 1. 1. 114 2 115 4.33006 2.26874 1.33549 0.1 1. 1. 1. 116 2 117 2.57536 2.54894 1.23139 0.1 1. 1. 1. 118 2 119 4.07696 -0.484155 2.10119 0.1 1. 1. 1. 120 2 121 3.61706 -1.46676 0.692693 0.1 1. 1. 1. 122 2 123 -2.88384 2.33404 -0.0290068 0.1 1. 1. 1. 124 2 125 -3.96064 1.67134 -1.28171 0.1 1. 1. 1. 126 2 127 5.67566 1.42984 -1.78291 0.1 1. 1. 1. 128 2 129 5.10266 2.74254 -0.715907 0.1 1. 1. 1. 130 2 131 6.16236 -0.927955 1.16559 0.1 1. 1. 1. 132 2 133 5.53756 -0.911555 -0.496607 0.1 1. 1. 1. 134 2 135 -4.84774 2.80654 1.40919 0.1 1. 1. 1. 136 2 137 5.68906 1.58194 1.24439 0.1 1. 1. 1. 138 2 139 -5.82304 4.61784 0.0247932 0.1 1. 1. 1. 140 2 141 -4.05744 4.53424 -0.184207 0.1 1. 1. 1. 142 2 143 -5.13424 3.87154 -1.43691 0.1 1. 1. 1. 144 2 145 -6.29174 0.967445 0.583993 0.1 1. 1. 1. 146 2 147 -7.12784 2.53484 0.473393 0.1 1. 1. 1. 148 2 149 -6.43904 1.78854 -0.988307 0.1 1. 1. 1. 150 2 151 7.55546 2.01984 -0.0120068 0.1 1. 1. 1. 152 152 # All tesselation triangles 153 153 8 … … 156 156 BACKFACE 0.3 0.3 1.0 0 0 157 157 1 158 7.3 3693 1.04442 0.0886712 5.68853 1.38852 -1.77723 7.56833 1.97852 -0.006328771. 0. 0.159 1 160 7.3 3693 1.04442 0.0886712 5.68853 1.38852 -1.77723 5.55043 -0.952879 -0.4909291. 0. 0.161 1 162 7.3 3693 1.04442 0.0886712 6.17523 -0.969279 1.17127 5.55043 -0.952879 -0.4909291. 0. 0.163 1 164 3.6 2023 1.25552 -2.86813 5.68853 1.38852 -1.77723 5.55043 -0.952879 -0.4909291. 0. 0.165 1 166 1.7 6663 -0.360379 -2.99373 3.62023 1.25552 -2.86813 5.55043 -0.952879 -0.4909291. 0. 0.167 1 168 2.1 9193 -1.51408 -0.867629 1.76663 -0.360379 -2.99373 5.55043 -0.952879 -0.4909291. 0. 0.169 1 170 2.1 9193 -1.51408 -0.867629 0.450934 -2.72908 -2.23353 1.76663 -0.360379 -2.993731. 0. 0.171 1 172 0.9 17634 -3.66448 -0.484829 2.19193 -1.51408 -0.867629 0.450934 -2.72908 -2.233531. 0. 0.173 1 174 0.9 17634 -3.66448 -0.484829 2.19193 -1.51408 -0.867629 5.55043 -0.952879 -0.4909291. 0. 0.175 1 176 0.9 17634 -3.66448 -0.484829 1.92773 -2.57738 0.498071 5.55043 -0.952879 -0.4909291. 0. 0.177 1 178 1.9 2773 -2.57738 0.498071 3.62993 -1.50808 0.698371 5.55043 -0.952879 -0.4909291. 0. 0.179 1 180 3.6 2993 -1.50808 0.698371 6.17523 -0.969279 1.17127 5.55043 -0.952879 -0.4909291. 0. 0.181 1 182 0.7 90434 -3.69418 1.29027 0.917634 -3.66448 -0.484829 1.92773 -2.57738 0.4980711. 0. 0.183 1 184 0.7 90434 -3.69418 1.29027 1.92773 -2.57738 0.498071 3.62993 -1.50808 0.6983711. 0. 0.185 1 186 0.7 90434 -3.69418 1.29027 2.06173 -1.39848 1.79787 3.62993 -1.50808 0.6983711. 0. 0.187 1 188 2.0 6173 -1.39848 1.79787 4.08983 -0.525479 2.10687 3.62993 -1.50808 0.6983711. 0. 0.189 1 190 4.0 8983 -0.525479 2.10687 3.62993 -1.50808 0.698371 6.17523 -0.969279 1.171271. 0. 0.191 1 192 0.7 90434 -3.69418 1.29027 -0.287266 -1.67078 2.48017 2.06173 -1.39848 1.797871. 0. 0.193 1 194 -0. 287266 -1.67078 2.48017 1.46453 0.112321 2.50927 2.06173 -1.39848 1.797871. 0. 0.195 1 196 1.4 6453 0.112321 2.50927 2.06173 -1.39848 1.79787 4.08983 -0.525479 2.106871. 0. 0.197 1 198 1.4 6453 0.112321 2.50927 3.24233 1.41142 2.47757 4.08983 -0.525479 2.106871. 0. 0.199 1 200 3.2 4233 1.41142 2.47757 4.08983 -0.525479 2.10687 5.70193 1.54062 1.250071. 0. 0.201 1 202 4.0 8983 -0.525479 2.10687 6.17523 -0.969279 1.17127 5.70193 1.54062 1.250071. 0. 0.203 1 204 7.3 3693 1.04442 0.0886712 6.17523 -0.969279 1.17127 5.70193 1.54062 1.250071. 0. 0.205 1 206 7.3 3693 1.04442 0.0886712 5.70193 1.54062 1.25007 7.56833 1.97852 -0.006328771. 0. 0.207 1 208 3.2 4233 1.41142 2.47757 4.34293 2.22742 1.34117 5.70193 1.54062 1.250071. 0. 0.209 1 210 3.2 4233 1.41142 2.47757 4.34293 2.22742 1.34117 2.58823 2.50762 1.237071. 0. 0.211 1 212 4.3 4293 2.22742 1.34117 2.58823 2.50762 1.23707 5.11553 2.70122 -0.7102291. 0. 0.213 1 214 4.3 4293 2.22742 1.34117 5.11553 2.70122 -0.710229 7.56833 1.97852 -0.006328771. 0. 0.215 1 216 4.3 4293 2.22742 1.34117 5.70193 1.54062 1.25007 7.56833 1.97852 -0.006328771. 0. 0.217 1 218 1.4 6453 0.112321 2.50927 3.24233 1.41142 2.47757 2.58823 2.50762 1.237071. 0. 0.219 1 220 1.4 6453 0.112321 2.50927 2.58823 2.50762 1.23707 -2.87097 2.29272 -0.0233288 1. 0. 0.221 1 222 -0.7 59066 -0.265179 1.48487 1.46453 0.112321 2.50927 -2.87097 2.29272 -0.0233288 1. 0. 0.223 1 224 -0.7 59066 -0.265179 1.48487 -3.66127 0.565021 1.57007 -2.87097 2.29272 -0.0233288 1. 0. 0.225 1 226 -3.6 6127 0.565021 1.57007 -2.87097 2.29272 -0.0233288 -4.83487 2.76522 1.414871. 0. 0.227 1 228 -2.8 7097 2.29272 -0.0233288 -4.83487 2.76522 1.41487 -4.04457 4.49292 -0.1785291. 0. 0.229 1 230 2.5 8823 2.50762 1.23707 -2.87097 2.29272 -0.0233288 -4.04457 4.49292 -0.1785291. 0. 0.231 1 232 2.5 8823 2.50762 1.23707 -2.87097 2.29272 -0.0233288 -4.04457 4.49292 -0.1785291. 0. 0.233 1 234 1.1 5633 1.11082 0.326671 2.58823 2.50762 1.23707 -2.87097 2.29272 -0.0233288 1. 0. 0.235 1 236 1.1 5633 1.11082 0.326671 1.03283 1.01972 -2.14533 -2.87097 2.29272 -0.0233288 1. 0. 0.237 1 238 1.1 5633 1.11082 0.326671 1.03283 1.01972 -2.14533 2.58823 2.50762 1.237071. 0. 0.239 1 240 1.0 3283 1.01972 -2.14533 2.58823 2.50762 1.23707 5.11553 2.70122 -0.7102291. 0. 0.241 1 242 1.0 3283 1.01972 -2.14533 3.62023 1.25552 -2.86813 5.11553 2.70122 -0.7102291. 0. 0.243 1 244 -0.7 59066 -0.265179 1.48487 -0.287266 -1.67078 2.48017 -3.66127 0.565021 1.570071. 0. 0.245 1 246 -0.7 59066 -0.265179 1.48487 -0.287266 -1.67078 2.48017 1.46453 0.112321 2.509271. 0. 0.247 1 248 -0. 287266 -1.67078 2.48017 -2.45927 -1.63678 1.72157 -3.66127 0.565021 1.570071. 0. 0.249 1 250 -2.4 5927 -1.63678 1.72157 -4.75167 -1.93408 0.935971 -3.66127 0.565021 1.570071. 0. 0.251 1 252 -4.7 5167 -1.93408 0.935971 -3.66127 0.565021 1.57007 -6.27887 0.926121 0.5896711. 0. 0.253 1 254 -3.6 6127 0.565021 1.57007 -4.83487 2.76522 1.41487 -6.27887 0.926121 0.5896711. 0. 0.255 1 256 -4.8 3487 2.76522 1.41487 -6.27887 0.926121 0.589671 -7.11497 2.49352 0.4790711. 0. 0.257 1 258 -2.4 5927 -1.63678 1.72157 -4.75167 -1.93408 0.935971 -3.90927 -3.49908 0.8397711. 0. 0.259 1 260 -1.5 2417 -3.64138 0.503471 -2.45927 -1.63678 1.72157 -3.90927 -3.49908 0.8397711. 0. 0.261 1 262 -1.5 2417 -3.64138 0.503471 -0.287266 -1.67078 2.48017 -2.45927 -1.63678 1.721571. 0. 0.263 1 264 0.7 90434 -3.69418 1.29027 -1.52417 -3.64138 0.503471 -0.287266 -1.67078 2.480171. 0. 0.265 1 266 -4.8 3487 2.76522 1.41487 -5.81017 4.57652 0.0304712 -4.04457 4.49292 -0.1785291. 0. 0.267 1 268 -4.8 3487 2.76522 1.41487 -5.81017 4.57652 0.0304712 -7.11497 2.49352 0.4790711. 0. 0.269 1 270 1.0 3283 1.01972 -2.14533 -2.87097 2.29272 -0.0233288 -3.94777 1.63002 -1.276031. 0. 0.271 1 272 -2.8 7097 2.29272 -0.0233288 -3.94777 1.63002 -1.27603 -4.04457 4.49292 -0.1785291. 0. 0.273 1 274 -3.9 4777 1.63002 -1.27603 -4.04457 4.49292 -0.178529 -5.12137 3.83022 -1.431231. 0. 0.275 1 276 -0.5 73766 -1.42458 -2.91753 1.03283 1.01972 -2.14533 -3.94777 1.63002 -1.276031. 0. 0.277 1 278 -0.5 73766 -1.42458 -2.91753 1.76663 -0.360379 -2.99373 1.03283 1.01972 -2.145331. 0. 0.279 1 280 1.7 6663 -0.360379 -2.99373 1.03283 1.01972 -2.14533 3.62023 1.25552 -2.868131. 0. 0.281 1 282 -0.5 73766 -1.42458 -2.91753 -2.77417 -0.570279 -1.12083 -3.94777 1.63002 -1.276031. 0. 0.283 1 284 -0.5 73766 -1.42458 -2.91753 -2.49667 -2.18078 -1.79993 -2.77417 -0.570279 -1.120831. 0. 0.285 1 286 -2. 49667 -2.18078 -1.79993 -2.77417 -0.570279 -1.12083 -3.94777 1.63002 -1.276031. 0. 0.287 1 288 -2. 49667 -2.18078 -1.79993 -4.17327 -2.53828 -0.635229 -3.94777 1.63002 -1.276031. 0. 0.289 1 290 -4.1 7327 -2.53828 -0.635229 -3.94777 1.63002 -1.27603 -6.42617 1.74722 -0.9826291. 0. 0.291 1 292 -3.9 4777 1.63002 -1.27603 -5.12137 3.83022 -1.43123 -6.42617 1.74722 -0.9826291. 0. 0.293 1 294 -0.5 73766 -1.42458 -2.91753 -1.62867 -3.74268 -1.79493 -2.49667 -2.18078 -1.799931. 0. 0.295 1 296 -0.5 73766 -1.42458 -2.91753 0.450934 -2.72908 -2.23353 -1.62867 -3.74268 -1.794931. 0. 0.297 1 298 -0.5 73766 -1.42458 -2.91753 0.450934 -2.72908 -2.23353 1.76663 -0.360379 -2.993731. 0. 0.299 1 300 -1.6 2867 -3.74268 -1.79493 -2.49667 -2.18078 -1.79993 -4.17327 -2.53828 -0.6352291. 0. 0.301 1 302 -1.6 2867 -3.74268 -1.79493 -4.17327 -2.53828 -0.635229 -3.90927 -3.49908 0.8397711. 0. 0.303 1 304 -1.5 2417 -3.64138 0.503471 -1.62867 -3.74268 -1.79493 -3.90927 -3.49908 0.8397711. 0. 0.305 1 306 0.9 17634 -3.66448 -0.484829 -1.52417 -3.64138 0.503471 -1.62867 -3.74268 -1.794931. 0. 0.307 1 308 0.7 90434 -3.69418 1.29027 0.917634 -3.66448 -0.484829 -1.52417 -3.64138 0.5034711. 0. 0.309 1 310 0.9 17634 -3.66448 -0.484829 0.450934 -2.72908 -2.23353 -1.62867 -3.74268 -1.794931. 0. 0.311 1 312 -4.7 5167 -1.93408 0.935971 -4.17327 -2.53828 -0.635229 -3.90927 -3.49908 0.8397711. 0. 0.313 1 314 -4.7 5167 -1.93408 0.935971 -4.17327 -2.53828 -0.635229 -6.27887 0.926121 0.5896711. 0. 0.315 1 316 -4.1 7327 -2.53828 -0.635229 -6.27887 0.926121 0.589671 -6.42617 1.74722 -0.9826291. 0. 0.317 1 318 -6.2 7887 0.926121 0.589671 -7.11497 2.49352 0.479071 -6.42617 1.74722 -0.9826291. 0. 0.319 1 320 3.6 2023 1.25552 -2.86813 5.68853 1.38852 -1.77723 5.11553 2.70122 -0.7102291. 0. 0.321 1 322 5.6 8853 1.38852 -1.77723 5.11553 2.70122 -0.710229 7.56833 1.97852 -0.006328771. 0. 0.323 1 324 -5.1 2137 3.83022 -1.43123 -7.11497 2.49352 0.479071 -6.42617 1.74722 -0.9826291. 0. 0.325 1 326 -5.8 1017 4.57652 0.0304712 -5.12137 3.83022 -1.43123 -7.11497 2.49352 0.4790711. 0. 0.327 1 328 -5.8 1017 4.57652 0.0304712 -4.04457 4.49292 -0.178529 -5.12137 3.83022 -1.431231. 0. 0.158 7.32406 1.08574 0.0829932 5.67566 1.42984 -1.78291 7.55546 2.01984 -0.0120068 1. 0. 0. 159 1 160 7.32406 1.08574 0.0829932 5.67566 1.42984 -1.78291 5.53756 -0.911555 -0.496607 1. 0. 0. 161 1 162 7.32406 1.08574 0.0829932 6.16236 -0.927955 1.16559 5.53756 -0.911555 -0.496607 1. 0. 0. 163 1 164 3.60736 1.29684 -2.87381 5.67566 1.42984 -1.78291 5.53756 -0.911555 -0.496607 1. 0. 0. 165 1 166 1.75376 -0.319055 -2.99941 3.60736 1.29684 -2.87381 5.53756 -0.911555 -0.496607 1. 0. 0. 167 1 168 2.17906 -1.47276 -0.873307 1.75376 -0.319055 -2.99941 5.53756 -0.911555 -0.496607 1. 0. 0. 169 1 170 2.17906 -1.47276 -0.873307 0.438062 -2.68776 -2.23921 1.75376 -0.319055 -2.99941 1. 0. 0. 171 1 172 0.904762 -3.62316 -0.490507 2.17906 -1.47276 -0.873307 0.438062 -2.68776 -2.23921 1. 0. 0. 173 1 174 0.904762 -3.62316 -0.490507 2.17906 -1.47276 -0.873307 5.53756 -0.911555 -0.496607 1. 0. 0. 175 1 176 0.904762 -3.62316 -0.490507 1.91486 -2.53606 0.492393 5.53756 -0.911555 -0.496607 1. 0. 0. 177 1 178 1.91486 -2.53606 0.492393 3.61706 -1.46676 0.692693 5.53756 -0.911555 -0.496607 1. 0. 0. 179 1 180 3.61706 -1.46676 0.692693 6.16236 -0.927955 1.16559 5.53756 -0.911555 -0.496607 1. 0. 0. 181 1 182 0.777562 -3.65286 1.28459 0.904762 -3.62316 -0.490507 1.91486 -2.53606 0.492393 1. 0. 0. 183 1 184 0.777562 -3.65286 1.28459 1.91486 -2.53606 0.492393 3.61706 -1.46676 0.692693 1. 0. 0. 185 1 186 0.777562 -3.65286 1.28459 2.04886 -1.35716 1.79219 3.61706 -1.46676 0.692693 1. 0. 0. 187 1 188 2.04886 -1.35716 1.79219 4.07696 -0.484155 2.10119 3.61706 -1.46676 0.692693 1. 0. 0. 189 1 190 4.07696 -0.484155 2.10119 3.61706 -1.46676 0.692693 6.16236 -0.927955 1.16559 1. 0. 0. 191 1 192 0.777562 -3.65286 1.28459 -0.300138 -1.62946 2.47449 2.04886 -1.35716 1.79219 1. 0. 0. 193 1 194 -0.300138 -1.62946 2.47449 1.45166 0.153645 2.50359 2.04886 -1.35716 1.79219 1. 0. 0. 195 1 196 1.45166 0.153645 2.50359 2.04886 -1.35716 1.79219 4.07696 -0.484155 2.10119 1. 0. 0. 197 1 198 1.45166 0.153645 2.50359 3.22946 1.45274 2.47189 4.07696 -0.484155 2.10119 1. 0. 0. 199 1 200 3.22946 1.45274 2.47189 4.07696 -0.484155 2.10119 5.68906 1.58194 1.24439 1. 0. 0. 201 1 202 4.07696 -0.484155 2.10119 6.16236 -0.927955 1.16559 5.68906 1.58194 1.24439 1. 0. 0. 203 1 204 7.32406 1.08574 0.0829932 6.16236 -0.927955 1.16559 5.68906 1.58194 1.24439 1. 0. 0. 205 1 206 7.32406 1.08574 0.0829932 5.68906 1.58194 1.24439 7.55546 2.01984 -0.0120068 1. 0. 0. 207 1 208 3.22946 1.45274 2.47189 4.33006 2.26874 1.33549 5.68906 1.58194 1.24439 1. 0. 0. 209 1 210 3.22946 1.45274 2.47189 4.33006 2.26874 1.33549 2.57536 2.54894 1.23139 1. 0. 0. 211 1 212 4.33006 2.26874 1.33549 2.57536 2.54894 1.23139 5.10266 2.74254 -0.715907 1. 0. 0. 213 1 214 4.33006 2.26874 1.33549 5.10266 2.74254 -0.715907 7.55546 2.01984 -0.0120068 1. 0. 0. 215 1 216 4.33006 2.26874 1.33549 5.68906 1.58194 1.24439 7.55546 2.01984 -0.0120068 1. 0. 0. 217 1 218 1.45166 0.153645 2.50359 3.22946 1.45274 2.47189 2.57536 2.54894 1.23139 1. 0. 0. 219 1 220 1.45166 0.153645 2.50359 2.57536 2.54894 1.23139 -2.88384 2.33404 -0.0290068 1. 0. 0. 221 1 222 -0.771938 -0.223855 1.47919 1.45166 0.153645 2.50359 -2.88384 2.33404 -0.0290068 1. 0. 0. 223 1 224 -0.771938 -0.223855 1.47919 -3.67414 0.606345 1.56439 -2.88384 2.33404 -0.0290068 1. 0. 0. 225 1 226 -3.67414 0.606345 1.56439 -2.88384 2.33404 -0.0290068 -4.84774 2.80654 1.40919 1. 0. 0. 227 1 228 -2.88384 2.33404 -0.0290068 -4.84774 2.80654 1.40919 -4.05744 4.53424 -0.184207 1. 0. 0. 229 1 230 2.57536 2.54894 1.23139 -2.88384 2.33404 -0.0290068 -4.05744 4.53424 -0.184207 1. 0. 0. 231 1 232 2.57536 2.54894 1.23139 -2.88384 2.33404 -0.0290068 -4.05744 4.53424 -0.184207 1. 0. 0. 233 1 234 1.14346 1.15214 0.320993 2.57536 2.54894 1.23139 -2.88384 2.33404 -0.0290068 1. 0. 0. 235 1 236 1.14346 1.15214 0.320993 1.01996 1.06104 -2.15101 -2.88384 2.33404 -0.0290068 1. 0. 0. 237 1 238 1.14346 1.15214 0.320993 1.01996 1.06104 -2.15101 2.57536 2.54894 1.23139 1. 0. 0. 239 1 240 1.01996 1.06104 -2.15101 2.57536 2.54894 1.23139 5.10266 2.74254 -0.715907 1. 0. 0. 241 1 242 1.01996 1.06104 -2.15101 3.60736 1.29684 -2.87381 5.10266 2.74254 -0.715907 1. 0. 0. 243 1 244 -0.771938 -0.223855 1.47919 -0.300138 -1.62946 2.47449 -3.67414 0.606345 1.56439 1. 0. 0. 245 1 246 -0.771938 -0.223855 1.47919 -0.300138 -1.62946 2.47449 1.45166 0.153645 2.50359 1. 0. 0. 247 1 248 -0.300138 -1.62946 2.47449 -2.47214 -1.59546 1.71589 -3.67414 0.606345 1.56439 1. 0. 0. 249 1 250 -2.47214 -1.59546 1.71589 -4.76454 -1.89276 0.930293 -3.67414 0.606345 1.56439 1. 0. 0. 251 1 252 -4.76454 -1.89276 0.930293 -3.67414 0.606345 1.56439 -6.29174 0.967445 0.583993 1. 0. 0. 253 1 254 -3.67414 0.606345 1.56439 -4.84774 2.80654 1.40919 -6.29174 0.967445 0.583993 1. 0. 0. 255 1 256 -4.84774 2.80654 1.40919 -6.29174 0.967445 0.583993 -7.12784 2.53484 0.473393 1. 0. 0. 257 1 258 -2.47214 -1.59546 1.71589 -4.76454 -1.89276 0.930293 -3.92214 -3.45776 0.834093 1. 0. 0. 259 1 260 -1.53704 -3.60006 0.497793 -2.47214 -1.59546 1.71589 -3.92214 -3.45776 0.834093 1. 0. 0. 261 1 262 -1.53704 -3.60006 0.497793 -0.300138 -1.62946 2.47449 -2.47214 -1.59546 1.71589 1. 0. 0. 263 1 264 0.777562 -3.65286 1.28459 -1.53704 -3.60006 0.497793 -0.300138 -1.62946 2.47449 1. 0. 0. 265 1 266 -4.84774 2.80654 1.40919 -5.82304 4.61784 0.0247932 -4.05744 4.53424 -0.184207 1. 0. 0. 267 1 268 -4.84774 2.80654 1.40919 -5.82304 4.61784 0.0247932 -7.12784 2.53484 0.473393 1. 0. 0. 269 1 270 1.01996 1.06104 -2.15101 -2.88384 2.33404 -0.0290068 -3.96064 1.67134 -1.28171 1. 0. 0. 271 1 272 -2.88384 2.33404 -0.0290068 -3.96064 1.67134 -1.28171 -4.05744 4.53424 -0.184207 1. 0. 0. 273 1 274 -3.96064 1.67134 -1.28171 -4.05744 4.53424 -0.184207 -5.13424 3.87154 -1.43691 1. 0. 0. 275 1 276 -0.586638 -1.38326 -2.92321 1.01996 1.06104 -2.15101 -3.96064 1.67134 -1.28171 1. 0. 0. 277 1 278 -0.586638 -1.38326 -2.92321 1.75376 -0.319055 -2.99941 1.01996 1.06104 -2.15101 1. 0. 0. 279 1 280 1.75376 -0.319055 -2.99941 1.01996 1.06104 -2.15101 3.60736 1.29684 -2.87381 1. 0. 0. 281 1 282 -0.586638 -1.38326 -2.92321 -2.78704 -0.528955 -1.12651 -3.96064 1.67134 -1.28171 1. 0. 0. 283 1 284 -0.586638 -1.38326 -2.92321 -2.50954 -2.13946 -1.80561 -2.78704 -0.528955 -1.12651 1. 0. 0. 285 1 286 -2.50954 -2.13946 -1.80561 -2.78704 -0.528955 -1.12651 -3.96064 1.67134 -1.28171 1. 0. 0. 287 1 288 -2.50954 -2.13946 -1.80561 -4.18614 -2.49696 -0.640907 -3.96064 1.67134 -1.28171 1. 0. 0. 289 1 290 -4.18614 -2.49696 -0.640907 -3.96064 1.67134 -1.28171 -6.43904 1.78854 -0.988307 1. 0. 0. 291 1 292 -3.96064 1.67134 -1.28171 -5.13424 3.87154 -1.43691 -6.43904 1.78854 -0.988307 1. 0. 0. 293 1 294 -0.586638 -1.38326 -2.92321 -1.64154 -3.70136 -1.80061 -2.50954 -2.13946 -1.80561 1. 0. 0. 295 1 296 -0.586638 -1.38326 -2.92321 0.438062 -2.68776 -2.23921 -1.64154 -3.70136 -1.80061 1. 0. 0. 297 1 298 -0.586638 -1.38326 -2.92321 0.438062 -2.68776 -2.23921 1.75376 -0.319055 -2.99941 1. 0. 0. 299 1 300 -1.64154 -3.70136 -1.80061 -2.50954 -2.13946 -1.80561 -4.18614 -2.49696 -0.640907 1. 0. 0. 301 1 302 -1.64154 -3.70136 -1.80061 -4.18614 -2.49696 -0.640907 -3.92214 -3.45776 0.834093 1. 0. 0. 303 1 304 -1.53704 -3.60006 0.497793 -1.64154 -3.70136 -1.80061 -3.92214 -3.45776 0.834093 1. 0. 0. 305 1 306 0.904762 -3.62316 -0.490507 -1.53704 -3.60006 0.497793 -1.64154 -3.70136 -1.80061 1. 0. 0. 307 1 308 0.777562 -3.65286 1.28459 0.904762 -3.62316 -0.490507 -1.53704 -3.60006 0.497793 1. 0. 0. 309 1 310 0.904762 -3.62316 -0.490507 0.438062 -2.68776 -2.23921 -1.64154 -3.70136 -1.80061 1. 0. 0. 311 1 312 -4.76454 -1.89276 0.930293 -4.18614 -2.49696 -0.640907 -3.92214 -3.45776 0.834093 1. 0. 0. 313 1 314 -4.76454 -1.89276 0.930293 -4.18614 -2.49696 -0.640907 -6.29174 0.967445 0.583993 1. 0. 0. 315 1 316 -4.18614 -2.49696 -0.640907 -6.29174 0.967445 0.583993 -6.43904 1.78854 -0.988307 1. 0. 0. 317 1 318 -6.29174 0.967445 0.583993 -7.12784 2.53484 0.473393 -6.43904 1.78854 -0.988307 1. 0. 0. 319 1 320 3.60736 1.29684 -2.87381 5.67566 1.42984 -1.78291 5.10266 2.74254 -0.715907 1. 0. 0. 321 1 322 5.67566 1.42984 -1.78291 5.10266 2.74254 -0.715907 7.55546 2.01984 -0.0120068 1. 0. 0. 323 1 324 -5.13424 3.87154 -1.43691 -7.12784 2.53484 0.473393 -6.43904 1.78854 -0.988307 1. 0. 0. 325 1 326 -5.82304 4.61784 0.0247932 -5.13424 3.87154 -1.43691 -7.12784 2.53484 0.473393 1. 0. 0. 327 1 328 -5.82304 4.61784 0.0247932 -4.05744 4.53424 -0.184207 -5.13424 3.87154 -1.43691 1. 0. 0. 329 329 9 330 330 # terminating special property … … 333 333 25.0 0.6 -1.0 -1.0 -1.0 0.2 0 0 0 0 334 334 2 335 - 4.99203 4.29989 -0.5264295 1 0 0335 -5.0049 4.34121 -0.532107 5 1 0 0 336 336 9 337 337 terminating special property
Note:
See TracChangeset
for help on using the changeset viewer.