10
0
mirror of https://github.com/LCPQ/EMSL_Basis_Set_Exchange_Local synced 2024-12-22 04:13:43 +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"]
l = e.get_list_basis_available(elts)
for name, des in l:
print name, "|", des
for name, des, n in l:
print name, "(",n,")","|", des
# _ _ _ _____ _ _
# | | (_) | | | ___| | | |

Binary file not shown.

View File

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