optados-developers / optados

Official Repository of the Optados code
http://www.optados.org
20 stars 22 forks source link

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

Open ajm143 opened 4 years ago

ajm143 commented 4 years ago

RJN to give more details and examples.

Rebecca-Nicholls commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.