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

PDOS Output Gets muddled with Labelled Atoms i.e. C:exi #31

Closed
ajm143 opened this issue Jun 25, 2020 · 4 comments · Fixed by #51
Closed

PDOS Output Gets muddled with Labelled Atoms i.e. C:exi #31

ajm143 opened this issue Jun 25, 2020 · 4 comments · Fixed by #51
Assignees
Labels
bug Something isn't working

Comments

@ajm143
Copy link
Contributor

ajm143 commented Jun 25, 2020

RJN to give more details and examples.

@ajm143 ajm143 added the bug Something isn't working label Jun 25, 2020
@Rebecca-Nicholls
Copy link
Contributor

The convention for specifying which pdos you want to separate the atoms you're interested in with a colon. If a colon is included in the atom name (for example to distinguish an atoms with a corehole) it's not compatible with the pdos string reading.

In addition, when putting pdos : species_ang to plot out the angular momentum resolved pdos as a work around, the atomic sites were incorrectly labelled in the output file *.pdos.dat - this may have been a consequence of having a colon in the atom name.

@jryates
Copy link
Member

jryates commented Aug 6, 2020

I think Optados should accept atom symbols given between quote marks. This would prevent any special characters in those strings being misinterpreted. E.g. "C" or "C:ext" - this should be a minor change to Optados, and requires no change to castep.

@ajm143
Copy link
Contributor Author

ajm143 commented Aug 6, 2020

I think it's not as minor as it first appears. Sure we can change the PDOS string to accept "C:ext"(s), but I don't think Optados knows about species names at all internally.

@jryates
Copy link
Member

jryates commented Aug 6, 2020

cell knows about symbols and labels - at it needs to parse the cell file.
the pdos_bin file also has valid data in this case (I was worried it might not be possible to extract the information from this file).
So I think Optados needs to be a bit more careful about when to use labels and when to use atomic symbols.
For example if you ask to project onto all Carbon atoms do you include C:ext or not?

From the CASTEP viewpoint:
Labelling atoms e.g. C:1 is generally a bad thing to do. In specific cases it is appropriate - e.g. setting up antiferromagnetic lattices, or for core hole. i.e. when the atoms are genuinely different in some way.
I have seen people try to label all atoms this way - and that will cause optimisation problems, as you end up with weirdly dimensioned arrays within CASTEP. To label atoms you should use

C 0 0 0 label="C1"
C 0.5 0 0 label="C2"

in the cell file. These labels appear in CASTEP output, and can be referred to in say, applying constraints. But labels don't break symmetry - and the above two atoms belong to the same species.

Two cases:
10 C atoms, C C C C C C C C C C:corehole

6 Cr atoms: Cr:1 Cr:2 Cr:1 Cr:2 Cr:1 Cr:2

In the first case we might expect C to match on the first 9 atoms, but not the 10th. And "C:corehole" would match on the 10th
In the second case we can match on "Cr:1" and "Cr:2" but does Cr match on anything?

Could an unquoted string match on the symbol, and a quoted one match on the label? So in the first example C would match 10 atoms, and "C" would match 9?
For the catch all label "species" could still be species, and we might need "species_label" to match on the labels.

@ajm143 ajm143 linked a pull request Mar 9, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants