mirror of
https://github.com/LCPQ/EMSL_Basis_Set_Exchange_Local
synced 2024-10-31 19:23:42 +01:00
PEP 8 format
This commit is contained in:
parent
2ca24930a4
commit
6347860b10
@ -2,9 +2,11 @@
|
||||
|
||||
import sqlite3
|
||||
import re
|
||||
import sys, os
|
||||
import sys
|
||||
import os
|
||||
|
||||
debug = True
|
||||
|
||||
debug=True
|
||||
|
||||
class EMSL_dump:
|
||||
|
||||
@ -32,10 +34,10 @@ class EMSL_dump:
|
||||
dbcache = 'db/cache'
|
||||
if not os.path.isfile(dbcache):
|
||||
page = self.requests.get(url).text
|
||||
file=open(dbcache,'w')
|
||||
pickle.dump(page,file)
|
||||
file = open(dbcache, 'w')
|
||||
pickle.dump(page, file)
|
||||
else:
|
||||
file=open(dbcache,'r')
|
||||
file = open(dbcache, 'r')
|
||||
page = pickle.load(file)
|
||||
file.close()
|
||||
|
||||
@ -121,7 +123,7 @@ class EMSL_dump:
|
||||
import Queue
|
||||
import threading
|
||||
|
||||
num_worker_threads=7
|
||||
num_worker_threads = 7
|
||||
q_in = Queue.Queue(num_worker_threads)
|
||||
q_out = Queue.Queue(num_worker_threads)
|
||||
|
||||
@ -131,12 +133,13 @@ class EMSL_dump:
|
||||
while True:
|
||||
[name, url, des, elts] = q_in.get()
|
||||
url = self.create_url(url, name, elts)
|
||||
q_out.put ( ([name, url, des, elts], self.requests.get(url).text) )
|
||||
q_out.put(
|
||||
([name, url, des, elts], self.requests.get(url).text))
|
||||
q_in.task_done()
|
||||
|
||||
def enqueue():
|
||||
for [name, url, des, elts] in list_basis_array:
|
||||
q_in.put( ([name, url, des, elts]) )
|
||||
q_in.put(([name, url, des, elts]))
|
||||
return 0
|
||||
|
||||
t = threading.Thread(target=enqueue)
|
||||
@ -226,23 +229,23 @@ class EMSL_local:
|
||||
return d
|
||||
|
||||
format_dict = \
|
||||
{
|
||||
"g94": "Gaussian94" ,
|
||||
"gamess-us": "GAMESS-US" ,
|
||||
"gamess-uk": "GAMESS-UK" ,
|
||||
"turbomole": "Turbomole" ,
|
||||
"tx93" : "TX93" ,
|
||||
"molpro" : "Molpro" ,
|
||||
"molproint" : "MolproInt" ,
|
||||
"hondo" : "Hondo" ,
|
||||
"supermolecule" : "SuperMolecule" ,
|
||||
"molcas" : "Molcas" ,
|
||||
"hyperchem" : "HyperChem" ,
|
||||
"dalton" : "Dalton" ,
|
||||
"demon-ks" : "deMon-KS" ,
|
||||
"demon2k" : "deMon2k" ,
|
||||
"aces2" : "AcesII" ,
|
||||
}
|
||||
{
|
||||
"g94": "Gaussian94",
|
||||
"gamess-us": "GAMESS-US",
|
||||
"gamess-uk": "GAMESS-UK",
|
||||
"turbomole": "Turbomole",
|
||||
"tx93": "TX93",
|
||||
"molpro": "Molpro",
|
||||
"molproint": "MolproInt",
|
||||
"hondo": "Hondo",
|
||||
"supermolecule": "SuperMolecule",
|
||||
"molcas": "Molcas",
|
||||
"hyperchem": "HyperChem",
|
||||
"dalton": "Dalton",
|
||||
"demon-ks": "deMon-KS",
|
||||
"demon2k": "deMon2k",
|
||||
"aces2": "AcesII",
|
||||
}
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user