Changeset 26062f for src/Actions/FragmentationAction
- Timestamp:
- Apr 23, 2021, 8:31:23 PM (5 years ago)
- Branches:
- Candidate_v1.7.0, Candidate_v1.7.1, stable
- Children:
- cbbb6a
- Parents:
- b56827
- git-author:
- Frederik Heber <frederik.heber@…> (04/22/19 23:01:18)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/23/21 20:31:23)
- Location:
- src/Actions/FragmentationAction
- Files:
-
- 2 edited
-
StoreSaturatedFragmentAction.cpp (modified) (3 diffs)
-
StoreSaturatedFragmentAction.def (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/StoreSaturatedFragmentAction.cpp
rb56827 r26062f 3 3 * Description: creates and alters molecular systems 4 4 * Copyright (C) 2013 University of Bonn. All rights reserved. 5 * Copyright (C) 2013 Frederik Heber. All rights reserved.5 * Copyright (C) 2013-2019 Frederik Heber. All rights reserved. 6 6 * 7 7 * … … 39 39 #include "CodePatterns/Log.hpp" 40 40 #include "Fragmentation/Exporters/ExportGraph_ToFiles.hpp" 41 #include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp" 41 42 #include "Fragmentation/Exporters/SaturatedFragment.hpp" 42 43 #include "Fragmentation/Graph.hpp" … … 82 83 83 84 const enum HydrogenSaturation saturation = params.DoSaturation.get() ? DoSaturate : DontSaturate; 84 ExportGraph_ToFiles exporter(TotalGraph, IncludeHydrogen, saturation, globalsaturationpositions); 85 exporter.setPrefix(params.prefix.get()); 86 exporter.setOutputTypes(params.types.get()); 87 exporter(); 85 if (params.types.get().size() != 0) { 86 // store molecule's fragment to file 87 ExportGraph_ToFiles exporter(TotalGraph, IncludeHydrogen, saturation, globalsaturationpositions); 88 exporter.setPrefix(params.prefix.get()); 89 exporter.setOutputTypes(params.types.get()); 90 if (!exporter()) 91 return Action::failure; 92 } else { 93 // store molecule's fragment in FragmentJobQueue 94 ExportGraph_ToJobs exporter(TotalGraph, IncludeHydrogen, saturation, globalsaturationpositions); 95 exporter.setLevel(params.level.get()); 96 exporter.setMaximumMeshWidth(params.max_meshwidth.get()); 97 if (!exporter()) 98 return Action::failure; 99 } 88 100 } 89 101 -
src/Actions/FragmentationAction/StoreSaturatedFragmentAction.def
rb56827 r26062f 11 11 12 12 #include "Parameters/Validators/DummyValidator.hpp" 13 #include "Parameters/Validators/RangeValidator.hpp" 13 14 #include "Parameters/Validators/STLVectorValidator.hpp" 15 #include "Parameters/Validators/Specific/BoxLengthValidator.hpp" 14 16 #include "Parameters/Validators/Specific/ParserTypeValidator.hpp" 15 17 … … 17 19 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 18 20 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 19 #define paramtypes (std::string)(bool)(std::vector<std::string>) 20 #define paramtokens ("store-saturated-fragment")("DoSaturate")("output-types") 21 #define paramdescriptions ("name of fragment file")("do saturate dangling bonds with hydrogen")("type(s) of parsers that output fragment config files") 22 #define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(PARAM_DEFAULT(std::vector<std::string>())) 23 #define paramreferences (prefix)(DoSaturation)(types) 21 #define paramtypes (std::string)(bool)(std::vector<std::string>)(double)(unsigned int) 22 #define paramtokens ("store-saturated-fragment")("DoSaturate")("output-types")("max-meshwidth")("grid-level") 23 #define paramdescriptions ("name of fragment file")("do saturate dangling bonds with hydrogen")("type(s) of parsers that output fragment config files")("maximum allowed mesh width, i.e. discrete points may be at most that far apart on the fragment grids")("resolution of density sampling multigrid") 24 #define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(PARAM_DEFAULT(std::vector<std::string>()))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(5)) 25 #define paramreferences (prefix)(DoSaturation)(types)(max_meshwidth)(level) 24 26 #define paramvalids \ 25 27 (DummyValidator< std::string >()) \ 26 28 (DummyValidator< bool >()) \ 27 (STLVectorValidator< std::vector<std::string> >(1, 10, ParserTypeValidator())) 29 (STLVectorValidator< std::vector<std::string> >(0, 10, ParserTypeValidator())) \ 30 (BoxLengthValidator()) \ 31 (RangeValidator< unsigned int >(1, 10)) 28 32 29 33 #undef statetypes
Note:
See TracChangeset
for help on using the changeset viewer.
