Closed ndaelman-hu closed 4 months ago
@ladinesa Naive question, but the function's logic looks contrived to me. In this error message, there are element labels, but no atomic numbers. The former should suffice to populate.
@aalbino2 Is a user allowed to freely switch between element labels and atomic numbers in CP2K?
Hi @ndaelman-hu, there is the case in which you declare multiple kinds with same atomic number and different electronic structure, e.g., alpha and beta polarized carbon atoms. In that case the label is automatically set to C1 and C2
Hi @ndaelman-hu, there is the case in which you declare multiple kinds with same atomic number and different electronic structure, e.g., alpha and beta polarized carbon atoms. In that case the label is automatically set to C1 and C2
Ow, that's superuseful to know, thx! However, is the user obliged to identify them as carbon C*? Please link any documentation that you know of.
This is an example of the input file section where the kinds are defined, so you have an element
attribute that is the C in thi scase and this one can't vary from the available set of atoms existing
&KIND C1
BASIS_SET DZVP-MOLOPT-SR-GTH
ELEMENT C
POTENTIAL GTH-PBE-q4
&BS T
&ALPHA
NEL 2
L 1
N 2
&END ALPHA
&BETA
NEL -2
L 1
N 2
&END BETA
&END BS
&END KIND
&KIND C2
BASIS_SET DZVP-MOLOPT-SR-GTH
ELEMENT C
POTENTIAL GTH-PBE-q4
&BS T
&ALPHA
NEL -2
L 1
N 2
&END ALPHA
&BETA
NEL 2
L 1
N 2
&END BETA
&END BS
&END KIND
Okay, then based on your example and the docs, I'm going to derive elements from the name (when given).
Okay, the extraction function wasn't the problem, but rather the modified header... Still, I think the former is better now too.
When processing files like
supercell.xyz
in the following entry, the parser fails inget_atomic_number
, not finding the correct atomic number.