From db655e77ac83f90fae32ddf2a392e0d3af72a4fb Mon Sep 17 00:00:00 2001
From: lopa <pardini@physik.hu-berlin.de>
Date: Thu, 3 May 2018 14:50:43 +0200
Subject: [PATCH] adapted headers

---
 parser/parser-elastic/elastic_parser_input.py | 80 -------------------
 .../elastic_parser_input_exciting.py          |  5 +-
 .../elastic_parser_input_wien2k.py            |  5 +-
 parser/parser-elastic/parser_elastic.py       |  5 +-
 4 files changed, 6 insertions(+), 89 deletions(-)
 delete mode 100644 parser/parser-elastic/elastic_parser_input.py

diff --git a/parser/parser-elastic/elastic_parser_input.py b/parser/parser-elastic/elastic_parser_input.py
deleted file mode 100644
index 63b69f0..0000000
--- a/parser/parser-elastic/elastic_parser_input.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 2016-2018 The NOMAD Developers Group
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Main author and maintainer: Lorenzo Pardini <loren.pard@gmail.com>
-import xml.sax
-import logging
-import numpy as np
-from nomadcore.unit_conversion.unit_conversion import convert_unit_function
-from nomadcore.unit_conversion.unit_conversion import convert_unit
-from nomadcore.unit_conversion import unit_conversion
-
-class InputHandler(xml.sax.handler.ContentHandler):
-
-    def __init__(self, backend):
-        self.backend = backend
-        self.inputSectionGIndex = -1
-        self.basevect = []
-        self.latticeDummy = ''
-        self.CurrentData = ''
-        self.atomCoor = []
-        self.atomCoorDummy = []
-        self.speciesfileDummy = ''
-        self.speciesfile = []
-        self.scale = 1
-        self.cell = []
-        self.cellDummy = []
-
-    def endDocument(self):
-        bohr_to_m = convert_unit(1, "bohr", "m")
-        for i in range(0,len(self.cellDummy)):
-            for j in range(0,3):
-                self.cell[i].append(float(self.cellDummy[i][j])*self.scale*bohr_to_m)
-        self.backend.addValue("lattice_vectors", self.cell)
-        self.backend.addValue('atom_positions',self.atomCoor)
-        for i in range(0,len(self.atomCoor)):
-            self.speciesfile.append(self.speciesfileDummy)
-        self.backend.addValue("atom_labels", self.speciesfile)
-    def startElement(self, name, attrs):
-        self.CurrentData = name
-        if name == "crystal":
-            self.scale = float(attrs.getValue('scale'))
-        elif name == 'species':
-            self.speciesfileDummy = attrs.getValue('speciesfile')[:-4]
-        elif name == 'atom':
-            self.atomCoorDummy = attrs.getValue('coord').split()
-            for j in range(0,3):
-               self.atomCoorDummy[j]=float(self.atomCoorDummy[j])
-            self.atomCoor.append(self.atomCoorDummy)
-        else:
-            pass
-
-    def endElement(self, name):
-        pass
-
-    def characters(self, content):
-        if self.CurrentData == 'basevect':
-            self.latticeDummy = content
-            lattice = self.latticeDummy.split()
-            if lattice != []:
-                self.cellDummy.append(lattice)
-                self.cell.append([])
-        else:
-            pass
-
-def parseInput(inF, backend):
-    handler = InputHandler(backend)
-    logging.error("will parse")
-    xml.sax.parse(inF, handler)
-    logging.error("did parse")
diff --git a/parser/parser-elastic/elastic_parser_input_exciting.py b/parser/parser-elastic/elastic_parser_input_exciting.py
index 78b4dd6..e4fd63b 100644
--- a/parser/parser-elastic/elastic_parser_input_exciting.py
+++ b/parser/parser-elastic/elastic_parser_input_exciting.py
@@ -1,4 +1,4 @@
-# Copyright 2016-2018 The NOMAD Developers Group
+# Copyright 2017-2018 Lorenzo Pardini
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -11,8 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-# Main author and maintainer: Lorenzo Pardini <loren.pard@gmail.com>
+
 import xml.sax
 import logging
 import numpy as np
diff --git a/parser/parser-elastic/elastic_parser_input_wien2k.py b/parser/parser-elastic/elastic_parser_input_wien2k.py
index 63b69f0..93a17d3 100644
--- a/parser/parser-elastic/elastic_parser_input_wien2k.py
+++ b/parser/parser-elastic/elastic_parser_input_wien2k.py
@@ -1,4 +1,4 @@
-# Copyright 2016-2018 The NOMAD Developers Group
+# Copyright 2017-2018 Lorenzo Pardini
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -11,8 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-# Main author and maintainer: Lorenzo Pardini <loren.pard@gmail.com>
+
 import xml.sax
 import logging
 import numpy as np
diff --git a/parser/parser-elastic/parser_elastic.py b/parser/parser-elastic/parser_elastic.py
index 8735ac5..b916c90 100644
--- a/parser/parser-elastic/parser_elastic.py
+++ b/parser/parser-elastic/parser_elastic.py
@@ -1,4 +1,4 @@
-# Copyright 2016-2018 The NOMAD Developers Group
+# Copyright 2017-2018 Lorenzo Pardini
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -11,8 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-# Main author and maintainer: Lorenzo Pardini <loren.pard@gmail.com>
+
 from builtins import object
 import setup_paths
 import numpy as np
-- 
GitLab