[ase-users] atomic numbers outside the physical range

Jens Jørgen Mortensen jensj at fysik.dtu.dk
Wed Mar 1 10:05:58 CET 2017


On 02/24/2017 03:21 PM, Noam Bernstein wrote:
>
>> On Feb 24, 2017, at 6:12 AM, Jens Jørgen Mortensen 
>> <jensj at fysik.dtu.dk <mailto:jensj at fysik.dtu.dk>> wrote:
>>
>> Den 23-02-2017 kl. 14:10 skrev Noam Bernstein:
>>>
>>>> On Feb 23, 2017, at 5:01 AM, Jens Jørgen Mortensen 
>>>> <jensj at fysik.dtu.dk <mailto:jensj at fysik.dtu.dk>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>> As you’ve said here, I don’t think this focus on the encoding is 
>>>>>>> the important part.  My code is rather abstract with respect to 
>>>>>>> what the entities it’s simulating mean, and it can use 
>>>>>>> calculators other than ASE+lammpslib. So either I can use a 
>>>>>>> single array of integers to indicate identity, or I can’t. If I 
>>>>>>> can, that might as well be the atomic number since all my 
>>>>>>> calculators are happy with atomic numbers <=0 or >= 115 (or 
>>>>>>> whatever).  If I can’t, I have to code up access to some other 
>>>>>>> property, and then it doesn’t matter to me all that much how 
>>>>>>> that property is encoded.  I’d just as well set atomic number = 
>>>>>>> 0 and add another arbitrary at.arrays[] field with the species 
>>>>>>> type.  I don’t want my types to be weird huge/negative numbers 
>>>>>>> because 3 bytes are being used to encode some other integer in a 
>>>>>>> particular way - I just want to use 1..290 (e.g. in my current run)
>>>>
>>>> Noam: Just to understand better how this could work:  How would you 
>>>> create the Atoms object if you could use arbitrarily large 
>>>> Z-values?  Can you show an example?
>>>>
>>>
>>> Well, in my actual case I just want to read from an extxyz, but for 
>>> the python interface I’d just assume I could use something like:
>>> at = ase.Atoms(numbers=[1,2,3,….300], positions=[…])
>>> My workaround (which I’m using locally for now until this discussion 
>>> comes to some conclusion) does define symbols, since those are 
>>> necessary at least internally to ASE, of the form t_Z for Z outside 
>>> the range available in the atomic symbols array.  I guess maybe one 
>>> should also define t_Z for Z _within_ that range as synonyms for the 
>>> real atoms, and that could indicate that it’s not a real atom maybe?
>>
>> ... and how do you tell LAMMPS how it should handle Z=300?
>>
>> Instead of your numbers=[1,2,3,...,300] example, would something like 
>> Atoms(['H', 'He', 'Li', ..., 'abc'], positions=[...]) be a solution 
>> if symbols like 'abc' were allowed? (And perhaps also 'Ag:abc’).
>
>
> LAMMPS doesn’t know about atomic species in a chemical sense.  It uses 
> integer types (which have an association with a particular interatomic 
> potential), and the lammpslib ASE interface maintains a mapping 
> between atomic number and LAMMPS type (or you can tell it that type == 
> atomic number).  It could instead maintain a mapping between symbol 
> and atomic number, as long as enough different symbols were defined, I 
> suppose.
>
> Suppose we agreed on the symbols you suggest.  What would you have 
> initialization of Atoms based on atomic numbers (or the extxyz reader 
> when atomic numbers are specified but nor symbols, for example) do?

Good question - I don't know.  Can xyz files have atomic numbers instead 
of symbols?  What file formats do you use for your calculations with 
Z=300 at the moment?

Jens Jørgen

> Noam
>
> ____________
> |
> |
> |
> *U.S. NAVAL*
> |
> |
> _*RESEARCH*_
> |
> LABORATORY
> Noam Bernstein, Ph.D.
> Center for Materials Physics and Technology
> U.S. Naval Research Laboratory
> T +1 202 404 8628  F +1 202 404 7546
> https://www.nrl.navy.mil
>



More information about the ase-users mailing list