-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Molecule masses from symbol issue #225
Comments
did you try |
There are unambiguous issues as well with known isotopes: >>> qcel.models.Molecule(symbols=["D"], geometry=[0,0,0]).masses
array([1.00782503]) |
ok. it's probably in the handing over of field symbol to molparse -- may need a different field. it shouldn't be deep, though, since this is literally the problem reconcile_nucleus was built to handle. https://github.com/MolSSI/QCElemental/blob/master/qcelemental/molparse/nucleus.py#L381 |
the below works (though it's not set up to recognize D, T). understandably you'd like to not have so many guts showing to make a simple deuterium.
The problem comes about pretty much because https://github.com/MolSSI/QCElemental/blob/master/qcelemental/molparse/from_schema.py#L82 . https://github.com/MolSSI/QCElemental/blob/master/qcelemental/molparse/from_arrays.py#L191-L195 I hesitate to flip it without really studying the consequences. |
Yea, I don't think this is either a priority or a quick fix. More of a "I was writing a test was and was somewhat surprised". Something to keep in mind I think. |
I don't know if it's so much a fix as just the current setup enforces schema field definitions. Below are a couple schema-approved ways to do your original problem. Redefining symbols where as input it's a spec label and as output it's a string is a new kettle of fish. But if that is wanted someday, the underlying tech is ready.
|
In this case perhaps |
Sounds sensible at first. You have hit on an inconsistency, though. speclabel takes prefix mass number so that post can be label or mass, so So symbols is being broadly interpreted (6 lines below map to the same Mol) but only to extract the info that is properly contained in
|
Describe the bug
Nucleon symbols and values are in the periodictable information, but do not propagate their values into a Molecules mass. For example symbol
D
orHe3
do not correctly review masses of 2 or 3, respectively.To Reproduce
Expected behavior
The mass of the Helium3 to be 3 and change.
Additional context
The issues comes from
reconcile_nucleus
where everything is validated off of atomic number rather than the input symbol. This looks like a non trivial fix to that logic.The text was updated successfully, but these errors were encountered: