prisms-center / CASMcode_crystallography

CASM crystallography
Other
0 stars 4 forks source link

make_superstructure does not work for mapped structures #37

Closed xivh closed 4 months ago

xivh commented 8 months ago

Calling xtal.make_superstructure on a structure from mapmethods.make_mapped_structure places atoms in the wrong locations.

Mapped structure:

<title>
1.00000000
-3.05590270  0.00000000  0.00000000
 1.52795135 -1.87135058  1.87135058
 0.00000000 -3.50780238 -3.50780238
Li
2
Direct
0.08333333 0.16666667 0.00000000 Li
-0.58333333 -0.16666667 -0.50000000 Li

2x2x2 supercell:

print(xtal.make_superstructure(np.eye(3, dtype=int)*2, s).to_poscar_str())
<title>
1.00000000
-6.11180540 0.00000000 0.00000000
3.05590270 -3.74270116 3.74270116
0.00000000 -7.01560476 -7.01560476
Li
16
Direct
0.03815001 0.07630002 0.00000000 Li
0.53815001 0.07630002 0.00000000 Li
0.03815001 0.57630002 0.00000000 Li
0.53815001 0.57630002 0.00000000 Li
0.03815001 0.07630002 0.50000000 Li
0.53815001 0.07630002 0.50000000 Li
0.03815001 0.57630002 0.50000000 Li
0.53815001 0.57630002 0.50000000 Li
-0.03815001 -0.07630002 -0.00000000 Li
0.46184999 -0.07630002 -0.00000000 Li
-0.03815001 0.42369998 -0.00000000 Li
0.46184999 0.42369998 -0.00000000 Li
-0.03815001 -0.07630002 0.50000000 Li
0.46184999 -0.07630002 0.50000000 Li
-0.03815001 0.42369998 0.50000000 Li
0.46184999 0.42369998 0.50000000 Li
bpuchala commented 4 months ago

@xivh do you know if this is fixed now? With the latest, if I make a superstructure from the mapped structure shown here, I don't get this one.

If this is not fixed, please include a complete test where it fails.

xivh commented 4 months ago

I just tested it again and it looks good now.