10
0
mirror of https://github.com/LCPQ/EMSL_Basis_Set_Exchange_Local synced 2025-01-03 10:05:46 +01:00

Add rought estimation of number of basis

This commit is contained in:
Thomas Applencourt 2015-02-27 11:52:25 +01:00
parent 377297deb7
commit 1729a48591
3 changed files with 6 additions and 8 deletions

View File

@ -77,8 +77,8 @@ if __name__ == '__main__':
elts = arguments["--atom"] elts = arguments["--atom"]
l = e.get_list_basis_available(elts) l = e.get_list_basis_available(elts)
for name, des in l: for name, des, n in l:
print name, "|", des print name, "(",n,")","|", des
# _ _ _ _____ _ _ # _ _ _ _____ _ _
# | | (_) | | | ___| | | | # | | (_) | | | ___| | | |

Binary file not shown.

View File

@ -386,15 +386,13 @@ class EMSL_local:
conn = sqlite3.connect(self.db_path) conn = sqlite3.connect(self.db_path)
c = conn.cursor() c = conn.cursor()
if not elts: if not elts:
c.execute("""SELECT DISTINCT name,description, LENGTH(data)-LENGTH(REPLACE(data, X'0A', ''))
c.execute("SELECT DISTINCT name,description from basis_tab") FROM output_tab""")
data = c.fetchall() data = c.fetchall()
else: else:
cmd = [ cmd = ["""SELECT name,description, LENGTH(data)-LENGTH(REPLACE(data, X'0A', ''))
"SELECT name,description FROM output_tab WHERE elt=?"] * len(elts) FROM output_tab WHERE elt=?"""] * len(elts)
cmd = " INTERSECT ".join(cmd) + ";" cmd = " INTERSECT ".join(cmd) + ";"
c.execute(cmd, elts) c.execute(cmd, elts)