Closed ltalirz closed 3 years ago
P.S. @mpougin reported the following (which however looks like an import error; she'll let you know whether she has the latest version installed)
...
File "/home/miriam/aiida1/aiida-lsmo/aiida_lsmo/calcfunctions/oxidation_state.py", line 5, in <module>
import oximachinerunner
File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/oximachinerunner/__init__.py", line 15, in
from oximachine_featurizer import featurize
File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/oximachine_featurizer/__init__.py", line 9, in <module>
from .featurize import FeatureCollector, GetFeatures, featurize
File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/oximachine_featurizer/featurize.py", line 16, in <module>
from matminer.featurizers.site import CrystalNNFingerprint, GaussianSymmFunc
File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/matminer/featurizers/site.py", line 1670, in <module>
class LocalPropertyDifference(BaseFeaturizer):
File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/matminer/featurizers/site.py", line 1695, in LocalPropertyDifference
def __init__(self, data_source=MagpieData(), weight='area',
File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/matminer/utils/data.py", line 215, in __init__
prop_value = float(lines[atomic_no - 1])
IndexError: list index out of range
P.S. I see now that the ValueError
is already document, which is great.
P.S. @mpougin reported the following (which however looks like an import error; she'll let you know whether she has the latest version installed)
... File "/home/miriam/aiida1/aiida-lsmo/aiida_lsmo/calcfunctions/oxidation_state.py", line 5, in <module> import oximachinerunner File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/oximachinerunner/__init__.py", line 15, in from oximachine_featurizer import featurize File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/oximachine_featurizer/__init__.py", line 9, in <module> from .featurize import FeatureCollector, GetFeatures, featurize File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/oximachine_featurizer/featurize.py", line 16, in <module> from matminer.featurizers.site import CrystalNNFingerprint, GaussianSymmFunc File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/matminer/featurizers/site.py", line 1670, in <module> class LocalPropertyDifference(BaseFeaturizer): File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/matminer/featurizers/site.py", line 1695, in LocalPropertyDifference def __init__(self, data_source=MagpieData(), weight='area', File "/home/miriam/anaconda3/envs/aiida1/lib/python3.6/site-packages/matminer/utils/data.py", line 215, in __init__ prop_value = float(lines[atomic_no - 1]) IndexError: list index out of range
Thanks for forwarding my problem @ltalirz . I have release 1.3.0 installed, that's the latest version I think. And for me, the CP2K binding energy calculations (gas molecule in MOF framework) fail with the above mentioned error message
Can you maybe send the CIF? I agree with Leo that we could throw better errors and document them but one would expect that it throws some kind of error for CO2.
I could make some NoMetal, InvalidCIF, and some other errors that you could catch.
On Feb 6, 2021 at 23:15, mpougin notifications@github.com<mailto:notifications@github.com> wrote:
P.S. @mpouginhttps://github.com/mpougin reported the following (which however looks like an import error; she'll let you know whether she has the latest version installed)
...
File "/home/miriam/aiida1/aiida-lsmo/aiida_lsmo/calcfunctions/oxidation_state.py", line 5, in
Thanks for forwarding my problem @ltalirzhttps://github.com/ltalirz . I have release 1.3.0 installed, that's the latest version I think. And for me, the CP2K binding energy calculations (gas molecule in MOF framework) fail with the above mentioned error message
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/kjappelbaum/oximachinerunner/issues/57#issuecomment-774551509, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AH3I2QPSD6NSUEDDHBEICMDS5W5OXANCNFSM4XFHNREA.
Yes, it will only work if there's a metal. I'll clarify this in the docs and throw a specific error.
On Feb 6, 2021 at 23:31, mpougin notifications@github.com<mailto:notifications@github.com> wrote:
Here the CIFs for CO2 and the MOF. I also experienced errors when I tried ethane and ethylene CO2.txthttps://github.com/kjappelbaum/oximachinerunner/files/5937792/CO2.txt MOF.txthttps://github.com/kjappelbaum/oximachinerunner/files/5937793/MOF.txt
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/kjappelbaum/oximachinerunner/issues/57#issuecomment-774553279, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AH3I2QLX7PPVWT5EGSBLQELS5W7M7ANCNFSM4XFHNREA.
https://github.com/kjappelbaum/oximachinerunner/pull/59 would introduce some custom exceptions. @ltalirz note that there are indeed different reasons why your examples fail:
The last and the first case would be caught now using ParsingError
and a possible fallback by the user would be to provide a valid pymatgen structure. The second case would raise a NoMetalError
for which there is no fallback. The current version of oximachine is simply not built to work on non-Metals or assign all oxidation states in a self-consistent way (though I plan/hope to do this....)
And from the CI i just saw that the behavior of the last case will depend on the pymatgen version ...
Thank you @kjappelbaum.
So to run the cp2k_multistage "standard" protocol I have to switch the initial_magnetization
to element
, as this won't run the oxidation state calculations. Is this correct @ltalirz? And how do I make this changes? Just locally on my cloned rep?
I think aiida-lsmo
should only call oximachine if there is a metal. I can make a PR for that, but not today.
Thanks for the fix @kjappelbaum !
So to run the cp2k_multistage "standard" protocol I have to switch the
initial_magnetization
toelement
, as this won't run the oxidation state calculations. Is this correct @ltalirz? And how do I make this changes? Just locally on my cloned rep?
Yes, for the moment just do that, just make the change locally.
I think
aiida-lsmo
should only call oximachine if there is a metal.
Is this the only test that should be applied? (will it work correctly for an isolated ion?) Or would it perhaps be simpler for aiida-lsmo to just do a try/except and return empty prediction if any of the known exceptions are raised?
Is this the only test that should be applied? (will it work correctly for an isolated ion?)
if it is a valid pymatgen Structure or converted to one, yes. If there is not cell pymatgen will complain and we will raise a ParsingError. And it would actually be interesting what happens for an isolated metal as this is a strange situation for the model that it has never seen before ... I would guess that this will raise a warning as soon as i implemented https://github.com/kjappelbaum/oximachinerunner/issues/12
is it fine that i closed this or is there something i still should do?
all good, thanks @kjappelbaum !
Since we've integrated oximachine into aiida-lsmo it might be thrown different types of structures as input. In binding energy calculations, that might even be a cell with a molecule inside.
Currently, the oximachinerunner exits with a wide variety of different errors that the user then needs to understand and deal with (see below). If one wants to use it on a broad set of structures, this forces the user to use a try with a very general except (or know all possible exceptions in advance).
I would propose to
run_oximachine
raises (using:raises:
)Here's what I find playing around with oximachinerunner and ASE