mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 06:05:44 -04:00
initial checking for ontology
This commit is contained in:
parent
dec9058455
commit
34ee83a8a1
1 changed files with 60 additions and 0 deletions
60
contrib/marat/nwchem-python/atom_ontology.py
Normal file
60
contrib/marat/nwchem-python/atom_ontology.py
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
'''
|
||||
Created on Feb 7, 2012
|
||||
|
||||
@author: marat
|
||||
'''
|
||||
|
||||
class AtomOntology:
|
||||
'''
|
||||
classdocs
|
||||
'''
|
||||
|
||||
|
||||
def __init__(self):
|
||||
'''
|
||||
Constructor
|
||||
'''
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def atomName(mydict):
|
||||
if mydict.has_key("name"):
|
||||
name = mydict["name"]
|
||||
else:
|
||||
name = None
|
||||
return name
|
||||
|
||||
@staticmethod
|
||||
def resName(mydict):
|
||||
if mydict.has_key("resname"):
|
||||
name = mydict["resname"]
|
||||
else:
|
||||
name = None
|
||||
return name
|
||||
|
||||
@staticmethod
|
||||
def resId(mydict):
|
||||
if mydict.has_key("resid"):
|
||||
i = mydict["resid"]
|
||||
else:
|
||||
i = None
|
||||
return i
|
||||
|
||||
@staticmethod
|
||||
def atomId(mydict):
|
||||
if mydict.has_key("atomid"):
|
||||
i = mydict["atomid"]
|
||||
else:
|
||||
i = None
|
||||
return i
|
||||
|
||||
@staticmethod
|
||||
def atomCoords(mydict):
|
||||
if mydict.has_key("coords"):
|
||||
coords = mydict["coords"]
|
||||
else:
|
||||
coords = None
|
||||
return coords
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue