Molara is a Python package for the visualization of chemical structures such as molecules or crystals. It provides a graphical user interface for importing structures from output files of popular computational chemistry software as well as for creating custom structures.
try:
self._importer = self._IMPORTER_BY_SUFFIX[suffix](path)
except KeyError:
try:
self._importer = XyzExporter(path)
except FileFormatError as err:
msg = "Could not open file."
raise FileFormatError(msg) from err
Everything in the except block is not covered.
2.) importer.py, XyzImporter._molecule_from_xyz:
for line in lines[2 : 2 + num_atoms]:
atom_info = line.split()
if atom_info[0].isnumeric():
atomic_numbers.append(int(atom_info[0]))
...
The isnumeric() case is not covered. Probably requires new input files for the tests.
3.) importer.py, MoldenImporter.get_atoms:
if "Angs" in lines[i]:
angstrom = True
elif "AU" in lines[i]:
angstrom = False
else:
msg = "No unit specified in molden Atoms input."
raise FileFormatError(msg)
The "non-Angström cases" are not covered.
Same function:
if "STO" in lines[i]:
msg = "STO type not implemented."
raise FileFormatError(msg)
1.) exporter.py,
GeneralExporter.__init__
:Everything in the
except
block is not covered.2.) importer.py,
XyzImporter._molecule_from_xyz
:The
isnumeric()
case is not covered. Probably requires new input files for the tests.3.) importer.py,
MoldenImporter.get_atoms
:The "non-Angström cases" are not covered. Same function:
Error raise not covered.
4.) importer_crystal.py,
PoscarImporter.parse_poscar
:Not covered. Need to create an exemplary input POSCAR for the tests with a negative scale factor.
5.) importer_crystal.py,
VasprunImporter.load
:Not covered. Need to find out how this can be covered. Can import of a package be suppressed?