Commit dd1d13ba authored by Berk Onat's avatar Berk Onat

Fixing meta info writer for NoneType topology.

parent 8ebee270
......@@ -233,19 +233,54 @@ class ParserBase(object):
"""
sO = open_section
supB = backend.superBackend
topoDict = None
if self.topology:
topoDict = self.topology.topoDict
types_list = topoDict["types_list"]
atom_type_list = topoDict["atom_type_list"]
atomlabelList = topoDict["atom_label_list"]
name_list = topoDict["name_list"]
massesList = topoDict["atom_mass_list"]
elementList = topoDict["element_list"]
atomelementList = topoDict["atom_element_list"]
radiusList = topoDict["atom_radius_list"]
chargeList = topoDict["atom_charge_list"]
interDict = topoDict["interactions_dict"]
interTypeDict = topoDict["interactions_type_dict"]
if topoDict:
if "types_list" in topoDict:
types_list = topoDict["types_list"]
else:
types_list = []
if "atom_type_list" in topoDict:
atom_type_list = topoDict["atom_type_list"]
else:
atom_type_list = []
if "atom_label_list" in topoDict:
atomlabelList = topoDict["atom_label_list"]
else:
atomlabelList = []
if "name_list" in topoDict:
name_list = topoDict["name_list"]
else:
name_list = []
if "atom_mass_list" in topoDict:
massesList = topoDict["atom_mass_list"]
else:
massesList = []
if "element_list" in topoDict:
elementList = topoDict["element_list"]
else:
elementList = []
if "atom_element_list" in topoDict:
atomelementList = topoDict["atom_element_list"]
else:
atomelementList = []
if "atom_radius_list" in topoDict:
radiusList = topoDict["atom_radius_list"]
else:
radiusList = []
if "atom_charge_list" in topoDict:
chargeList = topoDict["atom_charge_list"]
else:
chargeList = []
if "interactions_dict" in topoDict:
interDict = topoDict["interactions_dict"]
else:
interDict = []
if "interactions_type_dict" in topoDict:
interTypeDict = topoDict["interactions_type_dict"]
else:
interTypeDict = []
for elm in range(len(types_list)):
with sO(supB, 'section_atom_type'):
# Atom Type NOMAD Name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment