Skip to content
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

Abins Not Identifying Deuterium Species #38352

Open
cailafinn opened this issue Nov 5, 2024 · 1 comment · May be fixed by #38518
Open

Abins Not Identifying Deuterium Species #38352

cailafinn opened this issue Nov 5, 2024 · 1 comment · May be fixed by #38518
Assignees
Labels
Absorption Corrections Issues and pull requests related to absorption corrections Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)
Milestone

Comments

@cailafinn
Copy link
Contributor

Original reporter: Pablo Gila-Herranz (Via Error Reporter)

Describe the bug
Seems like the AbINS program does not properly identify deuterium species for CASTEP phonon calculations, identified whether with the 'D' nor the 'H2' flag.

phonon_Efield.phonon.zipo

To Reproduce

For example

  1. Load in the file using the Abins algorithm.

Expected behavior
Loading should identify the Deuterium symbol.

Platform/Version (please complete the following information):

  • OS: [e.g. Windows, RHEL 7, Ubuntu, macOS]
  • OS Version:
  • Mantid Version [e.g. 6.0.0]

Additional context

Error in execution of algorithm Abins:
Invalid value of symbol: D.
  at line 100 in '/Applications/MantidWorkbench.app/Contents/Resources/plugins/python/algorithms/Abins.py'
  caused by line 52 in '/Applications/MantidWorkbench.app/Contents/Resources/scripts/abins/abinsdata.py'
  caused by line 195 in '/Applications/MantidWorkbench.app/Contents/Resources/scripts/abins/input/abinitioloader.py'
  caused by line 39 in '/Applications/MantidWorkbench.app/Contents/Resources/scripts/abins/input/casteploader.py'
  caused by line 165 in '/Applications/MantidWorkbench.app/Contents/Resources/scripts/abins/input/abinitioloader.py'
  caused by line 73 in '/Applications/MantidWorkbench.app/Contents/Resources/scripts/abins/atomsdata.py'
  caused by line 73 in '/Applications/MantidWorkbench.app/Contents/Resources/scripts/abins/atomsdata.py'
  caused by line 111 in '/Applications/MantidWorkbench.app/Contents/Resources/scripts/abins/atomsdata.py'
@cailafinn cailafinn added Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Absorption Corrections Issues and pull requests related to absorption corrections labels Nov 5, 2024
@cailafinn cailafinn added this to the Release 6.12 milestone Nov 5, 2024
@ajjackson
Copy link
Contributor

ajjackson commented Nov 5, 2024

I can reproduce the behaviour; at the moment arbitrary species labels are not supported as we need to somehow infer the z-number without looking at the pseudopotential file.

The supported syntax for this is element:tag. Although CASTEP will allow any 3-character species name (as long as the mass and pseudopotential are provided), this "tag" syntax is used in a few places to help CASTEP infer what element is being used:

e.g.

%BLOCK LATTICE_CART
 6.000000  0.000000  0.000000
 0.000000  7.526478  0.000000
 0.000000  0.000000  6.596309
%ENDBLOCK LATTICE_CART

%BLOCK POSITIONS_ABS
O  3.000000  3.763239  3.596309
H  3.000000  4.526478  3.000000
H:D  3.000000  3.000000  3.000000
%ENDBLOCK POSITIONS_ABS

%BLOCK SPECIES_MASS
H:D 2.0
%ENDBLOCK SPECIES_MASS

is a valid .cell file and CASTEP won't complain about the missing SPECIES_POT. (It still doesn't ascribe any special significance to "D" so we have to specify a mass.)

I suggest that for now our user changes "D" or "H2" to "H:D" or "H:2".

We could implement a special case for "D" as it is quite common. But given that CASTEP itself does not, perhaps it is more helpful to address the general case in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Absorption Corrections Issues and pull requests related to absorption corrections Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants