Open adrianusler opened 8 months ago
That was written by @flrnslbch but the problem is that we currently decide the importer class by suffix so any file that has no suffix will use the fallback importer which then uses cclib. That is a problem for e.g. POSCAR files which usually have no suffix. We were talking about it few days ago and (I think) @Michel-Heinz suggested to try automatic determination via filename pattern and as the fallback a dialogue window should appear where you can select a file format manually.
I d suggest to add cclib as a requirement until then?
I d suggest to add cclib as a requirement until then?
Maybe we should do that. Still, I think that the code should be designed such that certain features are just unavailable if cclib cannot be imported.
Upon launching the code, it could be checked if CClib is installed and a flag should be set. By checking the flag during the runtime, features can be enabled or disabled.
By checking the flag during the runtime, features can be enabled or disabled.
Nice! I think we should do this as much as possible with the dependencies (like pymatgen @ab5424).
By checking the flag during the runtime, features can be enabled or disabled.
Nice! I think we should do this as much as possible with the dependencies (like pymatgen @ab5424).
I (partially) did this in #130 by catching ImportErrors and using an alternative code then. We could also implement warnings when packages are not installed.
Is this still an issue, @ab5424?
Have you tried using it without having cclib installed?
I haven't installed cclib and get an error message from the importer module. I think that Molara shouldn't depend so strictly on this module. Maybe add try/except blocks for the import statements? @ab5424 @GereonFeldmann I am not sure if you added this import, so you can remove the assignment if you aren't responsible for this.
Side note: I think this issue is closely linked to #209.