[ase-users] bug? in Spacegroup.equivalent_sites
Jozef Vesely
vesely at gjh.sk
Tue Jan 8 18:42:38 CET 2013
Hi,
I stumbled upon strange behavior of Spacegroup.equivalent_sites
print Spacegroup(154).equivalent_sites([0.46981, 0., 0.666666])[1]
[[ 4.69810000e-01 0.00000000e+00 6.66666000e-01]
[ 0.00000000e+00 4.69810000e-01 3.33332667e-01]
[ 5.30190000e-01 5.30190000e-01 9.99999333e-01]
[ 5.30190000e-01 5.30190000e-01 6.66700000e-07]]
The last two are clearly the periodic image of the same site!
(and alpha-Quartz has only 3 Si atoms in unit cell)
mod on line 358 in ase/lattice/spacegroup/spacegroup.py
is intended to constrain atoms to unit cell,
however values close to but less than 1 are inside unit cell, but
should be equivalent to zero...
so instead of checking for:
np.sum(t*t, 1) < symprec2
one should rather take difference of +-1 in any single relative
coordinate as a match as well:
all( (abs(t)<symprec) | (abs(abs(t)-1)<symprec) , axis=1)
or
1-cos(2*t*pi) < symprec2 # correct only for small symprec
Furthermore I think that ondublicates='error' is not appropriate here
(typo is in the source). In a spacegroup with plenty of symmetric
operations the sites with low multiplicity naturally have to be reached
multiple times by different operations. I don't see any use in being
able to choose another behavior than ignore.
Unless the original idea was to check if there are symmetry equivalent
positions in the input. Then one should check t = site - scaled (with
possibly forcing scaled to unit cell).
Please somebody have a look on these problems.
Thank you.
Sincerely
Jozef Vesely
vesely at gjh.sk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3044 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20130108/671f0dbe/attachment.p7s>
More information about the ase-users
mailing list