Changeset 889067e
- Timestamp:
- May 25, 2021, 9:55:52 PM (4 years ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- 82e5fb
- Parents:
- 4b2207
- git-author:
- Frederik Heber <frederik.heber@…> (05/25/21 07:02:57)
- git-committer:
- Frederik Heber <frederik.heber@…> (05/25/21 21:55:52)
- Files:
-
- 4 edited
-
doc/userguide/userguide.xml (modified) (1 diff)
-
src/Actions/WorldAction/OutputAsAction.cpp (modified) (1 diff)
-
src/Actions/WorldAction/OutputAsAction.def (modified) (2 diffs)
-
tests/Python/AllActions/options.dat (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
doc/userguide/userguide.xml
r4b2207 r889067e 511 511 <programlisting>... --output-as world.xyz</programlisting> 512 512 <para>This action on the other hand will be write the current state 513 to a new file "world.xyz".</para> 513 to a new file "world.xyz".</para> 514 <para>By default, this will not overwrite any present files. To 515 overwrite present files, please append 516 <programlisting>--force-overwrite 1</programlisting>.</para> 514 517 </section> 515 518 <section xml:id="fileparsers.save-selected-molecules"> -
src/Actions/WorldAction/OutputAsAction.cpp
r4b2207 r889067e 68 68 } 69 69 70 if (!params.forceOverwrite.get() && boost::filesystem::exists(params.filename.get())) { 71 STATUS("File "+params.filename.get().string()+" is already present and force-overwrite set to false."); 72 return Action::failure; 73 } 74 70 75 // store file 71 76 // parse the file -
src/Actions/WorldAction/OutputAsAction.def
r4b2207 r889067e 9 9 # 10 10 11 #include "Parameters/Validators/DummyValidator.hpp" 11 12 #include "Parameters/Validators/Ops_Validator.hpp" 12 #include "Parameters/Validators/Specific/FilePresentValidator.hpp"13 13 #include "Parameters/Validators/Specific/ParserFileValidator.hpp" 14 14 … … 16 16 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 17 17 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 18 #define paramtypes (boost::filesystem::path) 19 #define paramtokens ("output-as") 20 #define paramdescriptions ("filename to write to") 21 # undef paramdefaults22 #define paramreferences (filename) 18 #define paramtypes (boost::filesystem::path)(bool) 19 #define paramtokens ("output-as")("force-overwrite") 20 #define paramdescriptions ("filename to write to")("overwrite file if already present") 21 #define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(false)) 22 #define paramreferences (filename)(forceOverwrite) 23 23 #define paramvalids \ 24 (!FilePresentValidator() && ParserFileValidator()) 24 (ParserFileValidator()) \ 25 (DummyValidator<bool>()) 25 26 26 27 #undef statetypes -
tests/Python/AllActions/options.dat
r4b2207 r889067e 86 86 fill_void "water.xyz" 87 87 forces_file "test.forces" 88 force_overwrite "0" 88 89 fragment_charges "1 1" 89 90 fragment_executable "mpqc"
Note:
See TracChangeset
for help on using the changeset viewer.
