Package schrodinger :: Package application :: Package matsci :: Package espresso :: Module ppdb
[hide private]
[frames] | no frames]

Module ppdb

Classes and functions to deal with pseudopotentials database.

Copyright Schrodinger, LLC. All rights reserved.

Functions [hide private]
str
get_checksum(file_fn)
Calculate checksum of a file.
 
populate_ppdb_from_dir(conn, cur, dirpath, family, ecutwfc, ecutrho, dft_func)
Populate PPDB using files from one of supported directories (see SUPPORTED_PP_FAMILIES).
sqlite3.Connection, sqlite3.Cursor,
get_ppdb()
Connect to the database and populate it with the supported PPs if the database is empty.
Variables [hide private]
  __doc__ = ...
  PP_DIR = u'/home/buildbot/.schrodinger/matsci_templates/pp_db'
  PP_DB_FN = u'/home/buildbot/.schrodinger/matsci_templates/pp_d...
  PP_TABLE_NAME = 'matsci_pp_table'
  PP_TYPES = ('NC', 'US', 'PAW')
  PP_CREATE_TABLE = '\nCREATE TABLE matsci_pp_table (\n ...
  PP_TABLE_INSERT = '\nINSERT INTO matsci_pp_table(sha1_ppfile_c...
  SUPPORTED_PP_FAMILIES = [['all_pbe_UPF_v1.5', 'GBRV', 40.0, 20...
  __package__ = 'schrodinger.application.matsci.espresso'
Function Details [hide private]

get_checksum(file_fn)

 

Calculate checksum of a file.

Parameters:
  • file_fn (str) - File name
Returns: str

populate_ppdb_from_dir(conn, cur, dirpath, family, ecutwfc, ecutrho, dft_func)

 

Populate PPDB using files from one of supported directories (see SUPPORTED_PP_FAMILIES). This function will try to catch possible exceptions to go over all the files in the directory.

Parameters:
  • conn (sqlite3.Connection) - Handler to the sqlite3 connection
  • cur (sqlite3.Cursor) - Handler to the sqlite3 cursor
  • dirpath (str) - Relative directory path to the PP folder
  • family (str) - Family of the PP. PPs within the same family are expected to be homogeneous
  • ecutwfc (float) - Energy cutoff
  • ecutrho (float) - Density cutoff
  • dft_func (str) - Density functional name

Variables Details [hide private]

__doc__

Value:
"""
Classes and functions to deal with pseudopotentials database.

Copyright Schrodinger, LLC.  All rights reserved."""

PP_DB_FN

Value:
u'/home/buildbot/.schrodinger/matsci_templates/pp_db/ppdb.sqlite'

PP_CREATE_TABLE

Value:
'''
CREATE TABLE matsci_pp_table (
                sha1_ppfile_checksum text primary key,
                pp_fn text not null,
                atomic_number int not null,
                type text check("type" in (\'NC\', \'US\', \'PAW\')),
                ecutwfc real not null,
                ecutrho real not null,
...

PP_TABLE_INSERT

Value:
'''
INSERT INTO matsci_pp_table(sha1_ppfile_checksum, pp_fn, atomic_number\
, type,
               ecutwfc, ecutrho, z_valence, l_max, dft_functional, fam\
ily)
       VALUES(:checksum, :pp_fn, :anumber, :type, :ecutwfc, :ecutrho,
              :z_val, :l_max, :func, :family);
'''

SUPPORTED_PP_FAMILIES

Value:
[['all_pbe_UPF_v1.5', 'GBRV', 40.0, 200.0, 'PBE']]