mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 14:15:30 -04:00
GenericAtom class
This commit is contained in:
parent
494cb7bb2a
commit
dec9058455
1 changed files with 32 additions and 0 deletions
32
contrib/marat/nwchem-python/GenericAtom.py
Normal file
32
contrib/marat/nwchem-python/GenericAtom.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
'''
|
||||
Created on Feb 7, 2012
|
||||
|
||||
@author: marat
|
||||
'''
|
||||
import sys
|
||||
from types import *
|
||||
|
||||
class GenericAtom:
|
||||
'''
|
||||
classdocs
|
||||
'''
|
||||
|
||||
|
||||
def __init__(self,d=None):
|
||||
'''
|
||||
Constructor
|
||||
'''
|
||||
if d is None:
|
||||
self.dict = {}
|
||||
else:
|
||||
if type(d) is not type({}):
|
||||
print "wrong type ", type(d)
|
||||
print "expecting", type({})
|
||||
sys.exit(1)
|
||||
else:
|
||||
self.dict = d
|
||||
|
||||
if __name__ == '__main__':
|
||||
a=GenericAtom({})
|
||||
print a
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue