diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 8de0b1a..dde8880 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.5 +current_version = 0.8.6 commit = True tag = False diff --git a/CITATION.cff b/CITATION.cff index dcff5f1..62d8223 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -20,4 +20,4 @@ url: 'https://atomrdf.pyscal.org' license: "MIT" repository-code: https://github.com/pyscal/atomRDF type: software -version: 0.8.5 +version: 0.8.6 diff --git a/atomrdf/network/ontology.py b/atomrdf/network/ontology.py index 46e35d4..4cb2504 100644 --- a/atomrdf/network/ontology.py +++ b/atomrdf/network/ontology.py @@ -84,6 +84,7 @@ def read_ontology(): #CMSO -> PODO IMPURITY combo.add_path(("cmso:Material", "cmso:hasDefect", "podo:SubstitutionalImpurity")) combo.add_path(("cmso:Material", "cmso:hasDefect", "podo:InterstitialImpurity")) + combo.add_path(("podo:InterstitialImpurity", "rdfs:label", "string")) combo.add_path(("cmso:AtomicScaleSample", "podo:hasNumberOfImpurityAtoms", "int")) combo.add_path(("cmso:AtomicScaleSample", "podo:hasImpurityConcentration", "float")) diff --git a/atomrdf/structure.py b/atomrdf/structure.py index 0ca136d..a328569 100644 --- a/atomrdf/structure.py +++ b/atomrdf/structure.py @@ -1065,11 +1065,14 @@ def add_interstitial_impurities( ) json_io.write_file(outfile, datadict) - self.add_triples_for_interstitial_impurities(conc_of_impurities, no_of_impurities=no_of_impurities) + self.add_triples_for_interstitial_impurities(conc_of_impurities, no_of_impurities=no_of_impurities, label=void_type) return sysn - def add_triples_for_interstitial_impurities(self, conc_of_impurities, no_of_impurities=None): - defect = self.graph.create_node(f"{self._name}_InterstitialImpurity", PODO.InterstitialImpurity) + def add_triples_for_interstitial_impurities(self, conc_of_impurities, no_of_impurities=None, label=None): + if label is not None: + defect = self.graph.create_node(f"{self._name}_InterstitialImpurity", PODO.InterstitialImpurity, label=label) + else: + defect = self.graph.create_node(f"{self._name}_InterstitialImpurity", PODO.InterstitialImpurity) self.graph.add((self.material, CMSO.hasDefect, defect)) self.graph.add((self.sample, PODO.hasImpurityConcentration, Literal(conc_of_impurities, datatype=XSD.float))) if no_of_impurities is not None: diff --git a/setup.py b/setup.py index 90a0e24..c5db5ac 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='atomrdf', - version='0.8.5', + version='0.8.6', author='Abril Azocar Guzman, Sarath Menon', author_email='sarath.menon@pyscal.org', description='Ontology based structural manipulation and quering',