# | Line 56 | Line 56 | |
---|---|---|
56 | #include "applications/staticProps/GofAngle2.hpp" | |
57 | #include "applications/staticProps/GofXyz.hpp" | |
58 | #include "applications/staticProps/P2OrderParameter.hpp" | |
59 | + | #include "applications/staticProps/SCDOrderParameter.hpp" |
60 | + | #include "applications/staticProps/DensityPlot.hpp" |
61 | + | #include "applications/staticProps/RhoZ.hpp" |
62 | ||
60 | – | |
63 | using namespace oopse; | |
64 | ||
65 | int main(int argc, char* argv[]){ | |
# | Line 88 | Line 90 | int main(int argc, char* argv[]){ | |
90 | char* sele1Env= getenv("OOPSE_SELE1"); | |
91 | if (sele1Env) { | |
92 | sele1 = sele1Env; | |
93 | < | }else { |
93 | > | }else if (!args_info.scd_given) { |
94 | sprintf( painCave.errMsg, | |
95 | "neither --sele1 option nor $OOPSE_SELE1 is set"); | |
96 | painCave.severity = OOPSE_ERROR; | |
# | Line 103 | Line 105 | int main(int argc, char* argv[]){ | |
105 | char* sele2Env = getenv("OOPSE_SELE2"); | |
106 | if (sele2Env) { | |
107 | sele2 = sele2Env; | |
108 | < | } else { |
108 | > | } else if (args_info.density_given) { |
109 | > | sele2 = "select all"; |
110 | > | } else if(!args_info.scd_given && !args_info.density_given && !args_info.slab_density_given) { |
111 | sprintf( painCave.errMsg, | |
112 | "neither --sele2 option nor $OOPSE_SELE2 is set"); | |
113 | painCave.severity = OOPSE_ERROR; | |
# | Line 112 | Line 116 | int main(int argc, char* argv[]){ | |
116 | } | |
117 | } | |
118 | ||
119 | + | bool batchMode; |
120 | + | if (args_info.scd_given){ |
121 | + | if (args_info.sele1_given && args_info.sele2_given && args_info.sele3_given) { |
122 | + | batchMode = false; |
123 | + | } else if (args_info.molname_given && args_info.begin_given && args_info.end_given) { |
124 | + | if (args_info.begin_arg < 0 || args_info.end_arg < 0 || args_info.begin_arg > args_info.end_arg-2) { |
125 | + | sprintf( painCave.errMsg, |
126 | + | "below conditions are not satisfied:\n" |
127 | + | "0 <= begin && 0<= end && begin <= end-2\n"); |
128 | + | painCave.severity = OOPSE_ERROR; |
129 | + | painCave.isFatal = 1; |
130 | + | simError(); |
131 | + | } |
132 | + | batchMode = true; |
133 | + | } else{ |
134 | + | sprintf( painCave.errMsg, |
135 | + | "either --sele1, --sele2, --sele3 are specified," |
136 | + | " or --molname, --begin, --end are specified\n"); |
137 | + | painCave.severity = OOPSE_ERROR; |
138 | + | painCave.isFatal = 1; |
139 | + | simError(); |
140 | + | |
141 | + | } |
142 | + | } |
143 | + | |
144 | //parse md file and set up the system | |
145 | SimCreator creator; | |
146 | SimInfo* info = creator.createSim(mdFileName); | |
# | Line 145 | Line 174 | int main(int argc, char* argv[]){ | |
174 | } | |
175 | } else if (args_info.p2_given) { | |
176 | analyser = new P2OrderParameter(info, dumpFileName, sele1, sele2); | |
177 | + | } else if (args_info.scd_given) { |
178 | + | if (batchMode) { |
179 | + | analyser = new SCDOrderParameter(info, dumpFileName, args_info.molname_arg, |
180 | + | args_info.begin_arg, args_info.end_arg); |
181 | + | } else{ |
182 | + | std::string sele3 = args_info.sele3_arg; |
183 | + | analyser = new SCDOrderParameter(info, dumpFileName, sele1, sele2, sele3); |
184 | + | } |
185 | + | }else if (args_info.density_given) { |
186 | + | analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen, args_info.nrbins_arg); |
187 | + | } else if (args_info.slab_density_given) { |
188 | + | Mat3x3d hmat = info->getSnapshotManager()->getCurrentSnapshot()->getHmat(); |
189 | + | analyser = new RhoZ(info, dumpFileName, sele1, hmat(2, 2), args_info.nrbins_arg); |
190 | } | |
191 | ||
192 | if (args_info.output_given) { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |