Révision 47
database/import_vasp_calc (revision 47) | ||
---|---|---|
35 | 35 |
# It was fine, give a normal answer |
36 | 36 |
return result |
37 | 37 |
|
38 |
def import_vasp_calculations(path,db,include_dir=[],exclude_dir=[],use_poscar=False,user=os.environ['USER'], nproc=8): |
|
38 |
def import_vasp_calculations(path,db,include_dir=[],exclude_dir=[],use_poscar=False,user=os.environ['USER'], nproc=8,project='vasp'):
|
|
39 | 39 |
#log = open('scan.log','w') |
40 | 40 |
_all = os.walk(os.path.abspath(path)) |
41 | 41 |
calculator=None |
... | ... | |
217 | 217 |
parser.add_argument("-d", help="Name of the database file to store the scanned calculations") |
218 | 218 |
parser.add_argument("-n", help="Number of processers") |
219 | 219 |
parser.add_argument("-u", help="The user who did the calculations") |
220 |
parser.add_argument("-j", help="Project name") |
|
220 | 221 |
args = parser.parse_args() |
221 | 222 |
if args.path is None: |
222 | 223 |
path = '.' |
... | ... | |
246 | 247 |
user = os.environ['USER'] |
247 | 248 |
else: |
248 | 249 |
user = args.u |
250 |
if args.j is None: |
|
251 |
project = 'gaussian' |
|
252 |
else: |
|
253 |
project = int(args.j) |
|
249 | 254 |
|
250 | 255 |
#import_vasp_calculations('/data/users/tjiang/rkerber', con) |
251 | 256 |
#import_vasp_calculations('.', con, include_dir=['<opt_dir>'], exclude_dir=['<to_exclude_dir1>', '<to_exclude_dir2>']) |
database/import_gaussian_calc (revision 47) | ||
---|---|---|
120 | 120 |
parser.add_argument("-e", "--exclude_dir",help="Directory to be excluded in the scanning") |
121 | 121 |
parser.add_argument("-d", help="Name of the database file to store the scanned calculations") |
122 | 122 |
parser.add_argument("-n", help="Number of processers") |
123 |
parser.add_argument("-u", help="The user who did the calculations") |
|
123 | 124 |
parser.add_argument("-j", help="Project name") |
124 | 125 |
args = parser.parse_args() |
125 | 126 |
if args.path is None: |
... | ... | |
146 | 147 |
nproc = 8 |
147 | 148 |
else: |
148 | 149 |
nproc = int(args.n) |
150 |
if args.u is None: |
|
151 |
user = os.environ['USER'] |
|
152 |
else: |
|
153 |
user = args.u |
|
149 | 154 |
if args.j is None: |
150 | 155 |
project = 'gaussian' |
151 | 156 |
else: |
152 | 157 |
project = int(args.j) |
153 | 158 |
|
154 |
import_gaussian_calculations(path, db, use_input=use_input, include_dir=include_dir, exclude_dir=exclude_dir, project=project, nproc=nproc) |
|
159 |
import_gaussian_calculations(path, db, use_input=use_input, include_dir=include_dir, exclude_dir=exclude_dir, project=project, nproc=nproc,user=user) |
Formats disponibles : Unified diff