mirror of
https://github.com/LCPQ/EMSL_Basis_Set_Exchange_Local
synced 2024-12-22 12:23:39 +01:00
Add format
This commit is contained in:
parent
a7dba23654
commit
da966e6c3c
@ -5,6 +5,7 @@
|
||||
|
||||
Usage:
|
||||
EMSL_api.py list_basis [--basis=<basis_name>...]
|
||||
--format=<format>
|
||||
[--atom=<atom_name>...]
|
||||
[--db_path=<db_path>]
|
||||
[--average_mo_number]
|
||||
@ -76,7 +77,7 @@ if __name__ == '__main__':
|
||||
# \_____/_|___/\__| \____/ \__,_|___/_|___/
|
||||
|
||||
if arguments["list_basis"]:
|
||||
e = EMSL_local(db_path=db_path)
|
||||
e = EMSL_local(db_path=db_path, format=arguments["--format"])
|
||||
|
||||
elts = arguments["--atom"]
|
||||
|
||||
|
@ -252,19 +252,34 @@ class EMSL_local:
|
||||
|
||||
if average_mo_number:
|
||||
|
||||
print "WARNING DO NOT SUPPORT L COUNTING"
|
||||
print "TREAD L FUNCTION NOT LIKE A SPECIAL ONE"
|
||||
from src.parser import handle_f_dict
|
||||
|
||||
try:
|
||||
f = handle_f_dict[self.format]
|
||||
except KeyError:
|
||||
str_ = " WARNING Cannot handle counting L function in this format"
|
||||
print >> sys.stderr, str_
|
||||
|
||||
for name, description, atom_basis in info:
|
||||
|
||||
try:
|
||||
atom_basis = f([atom_basis], self.get_list_symetry)
|
||||
atom_basis = "\n\n".join(atom_basis)
|
||||
except UnboundLocalError:
|
||||
pass
|
||||
|
||||
nb_mo = 0
|
||||
|
||||
line = atom_basis.split("\n")
|
||||
|
||||
for type_, _, _ in self.get_list_symetry(line):
|
||||
|
||||
nb_mo += string_to_nb_mo(type_)
|
||||
|
||||
try:
|
||||
dict_info[name][1] += nb_mo
|
||||
dict_info[name][2] += 1.
|
||||
except:
|
||||
except KeyError:
|
||||
dict_info[name] = [description, nb_mo, 1.]
|
||||
|
||||
# ~#~#~#~#~#~ #
|
||||
|
@ -106,7 +106,6 @@ def handle_f_gamess_us(l_atom_basis, list_symetry):
|
||||
"""
|
||||
|
||||
l_data = []
|
||||
|
||||
for atom_basis in l_atom_basis:
|
||||
|
||||
# Split the data in line
|
||||
|
Loading…
Reference in New Issue
Block a user