Package install :: Package MoSTBioDat :: Package DataBase :: Package ImportData :: Package Data2DB :: Module DBFile :: Class DBFile
[hide private]
[frames] | no frames]

Class DBFile

source code

object --+
         |
        DBFile

Base class for SDF and SMI INPUT: dictpath - str - path to dictionary dictfilename - str - dictionary filename dbfile - str - database file path temporary - str - path to temporary dictionary file OUTPUT: dictionary object

Instance Methods [hide private]
 
__init__(self, dbfile=None, **kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
findFile(self)
find and open database file INPUT: class object OUTPUT: file object
source code
 
createdict(self)
create dictionary INPUT: class object OUTPUT: dictionary filename absolute path
source code
 
openDict(self)
open shelve dictionary INPUT: class object OUTPUT: opened class object
source code
 
closeDict(self)
close shelve dictionary INPUT: class object OUTPUT: closed class object
source code
 
insertDict(self, key, value)
insert to shelve dictionary INPUT: class object key - shelve key dictionary value - dictionary value OUTPUT: dictionary value
source code
 
getLength(self)
get dictionary length INPUT: class object OUTPUT: dictionary length
source code
 
getDict(self, key)
retrieve value from shelve dictionary INPUT: class object key - shelve key dictionary OUTPUT: dictionary value
source code
 
delDictKey(self, key)
delete dictionary key INPUT: class object key - shelve key dictionary OUTPUT: deleted object
source code
 
retDict(self)
return dictionary INPUT: class object OUTPUT: shelve dictionary
source code
 
insAttrDict(self, constattr={})
insert attribute to dictionary object INPUT: class object constattr - dictionary - add constant attribute to shelve dictionary object OUTPUT:
source code
 
delAttrDict(self, attrlist=[])
delete attribute from dictionary object INPUT: class object OUTPUT: attrlist - list - list of attribute to delete
source code
 
showDict(self)
show shelve dictionary INPUT: class object OUTPUT: lists dictionary
source code
 
showDictKey(self, key)
show values for specified key in shelve dictionary INUPUT: class object key - shelve key dictionary OUTPUT: class object
source code
 
shoValue(self, key, propname)
display values for specified key INPUT: key - str, (isomeric SMILE dictionary key) propname - str, property name OUTPUT value - dictionary object
source code
 
showPropTag(self, propname, printflag=True, proptagname=None)
display values for specific property name INPUT: propname- str, property name printflag - boolean, print isomeric SMILES and property values, default True proptagname - str, property tag name OUTPUT: print report
source code
 
showPropTagonZINCode(self, zincode, zinckey='filename', propname=None, proptagname=None)
display values for specified ZINC code INPUT: zincode - str, database zinc code zinckey - str, zink key name in shelve dictionary propname - str, property name, default None proptagname - str, property tag name, default None OUTPUT: string
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, dbfile=None, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)