1 |
+ |
|
2 |
|
#include <cstdlib> |
3 |
|
#include <cstdio> |
4 |
|
#include <cstring> |
12 |
|
|
13 |
|
#include "sysBuild.hpp" |
14 |
|
#include "bilayerSys.hpp" |
15 |
+ |
#include "nanoBuilder.hpp" |
16 |
|
|
17 |
|
// this routine is defined in BASS_interface.cpp |
18 |
|
extern void set_interface_stamps( MakeStamps* ms, Globals* g ); |
20 |
|
|
21 |
|
// case asignments |
22 |
|
#define BILAYER 1 |
23 |
+ |
#define NANOPARTICLE 2 |
24 |
|
|
22 |
– |
|
25 |
|
char* program_name; |
26 |
|
bassInfo bsInfo; |
27 |
|
void usage(void); |
125 |
|
usage(); |
126 |
|
} |
127 |
|
} |
128 |
+ |
else if( !strcmp( argv[i], "--nanoparticle" ) ){ |
129 |
+ |
if( sysType > 0 ){ |
130 |
+ |
sprintf( painCave.errMsg, |
131 |
+ |
"You cannot specify more than one system to build.\n" ); |
132 |
+ |
painCave.isFatal = 0; |
133 |
+ |
simError(); |
134 |
+ |
usage(); |
135 |
+ |
} |
136 |
+ |
|
137 |
+ |
sysType = NANOPARTICLE; |
138 |
+ |
|
139 |
+ |
i++; |
140 |
+ |
if( i>=argc ){ |
141 |
+ |
sprintf( painCave.errMsg, |
142 |
+ |
"\n" |
143 |
+ |
"not enough arguments for nanoparticle\n"); |
144 |
+ |
painCave.isFatal = 0; |
145 |
+ |
simError(); |
146 |
+ |
usage(); |
147 |
+ |
} |
148 |
+ |
strcpy( bsInfo.coreName, argv[i] ); |
149 |
+ |
|
150 |
+ |
i++; |
151 |
+ |
if( i>=argc ){ |
152 |
+ |
sprintf( painCave.errMsg, |
153 |
+ |
"\n" |
154 |
+ |
"not enough arguments for nanoparticle\n"); |
155 |
+ |
painCave.isFatal = 0; |
156 |
+ |
simError(); |
157 |
+ |
usage(); |
158 |
+ |
} |
159 |
+ |
strcpy( bsInfo.shellName, argv[i] ); |
160 |
+ |
|
161 |
+ |
} |
162 |
+ |
|
163 |
+ |
else{ |
164 |
+ |
sprintf( painCave.errMsg, |
165 |
+ |
"Invalid option \"%s\"\n", argv[i] ); |
166 |
+ |
painCave.isFatal = 0; |
167 |
+ |
simError(); |
168 |
+ |
usage(); |
169 |
+ |
} |
170 |
+ |
} |
171 |
|
|
172 |
|
else{ |
173 |
|
|
488 |
|
buildBilayer( isRandom ); |
489 |
|
break; |
490 |
|
|
491 |
+ |
case NANO: |
492 |
+ |
|
493 |
+ |
|
494 |
+ |
break; |
495 |
+ |
|
496 |
|
default: |
497 |
|
sprintf( painCave.errMsg, |
498 |
|
"Unknown system type: %d\n", sysType ); |
499 |
|
painCave.isFatal = 1; |
500 |
|
simError(); |
501 |
+ |
|
502 |
|
} |
503 |
|
|
504 |
|
|