From 34ee83a8a12ec97e9e82dd7d38488ee3f2713f32 Mon Sep 17 00:00:00 2001 From: Marat Valiev Date: Wed, 8 Feb 2012 02:41:03 +0000 Subject: [PATCH] initial checking for ontology --- contrib/marat/nwchem-python/atom_ontology.py | 60 ++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 contrib/marat/nwchem-python/atom_ontology.py diff --git a/contrib/marat/nwchem-python/atom_ontology.py b/contrib/marat/nwchem-python/atom_ontology.py new file mode 100644 index 0000000000..69d9824c44 --- /dev/null +++ b/contrib/marat/nwchem-python/atom_ontology.py @@ -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 + + + \ No newline at end of file