Changeset 26062f
- 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)
- Files:
-
- 3 edited
-
doc/userguide/userguide.xml (modified) (1 diff)
-
src/Actions/FragmentationAction/StoreSaturatedFragmentAction.cpp (modified) (3 diffs)
-
src/Actions/FragmentationAction/StoreSaturatedFragmentAction.def (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doc/userguide/userguide.xml
rb56827 r26062f 2083 2083 where all dangling bonds (by atoms that are connected in the bond 2084 2084 graph but have not been selected as well) are saturated with 2085 additional hydrogen atoms. The output formats are set to just xyz. 2086 </para> 2085 additional hydrogen atoms.</para> 2086 <para>This can work two ways: Either the saturated fragment is 2087 written to file. If not "output-types" is given, then the fragment 2088 will instead be written to the FragmentQueue. In other words, its 2089 energy is calculated when <link linkend="fragmentation.fragment-automation">fragment automation</link> is used.</para> 2087 2090 <programlisting> 2088 2091 ... --store-saturated-fragment \ 2089 2092 --DoSaturate 1 \ 2090 2093 --output-types xyz 2094 </programlisting> 2095 <para>Alternatively, use the following to store in fragment job 2096 queue.</para> 2097 <programlisting> 2098 ... --store-saturated-fragment \ 2099 --DoSaturate 1 \ 2100 --grid-level 6 2101 --max_meshwidth 0.3 2091 2102 </programlisting> 2092 2103 </section> -
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.
