Skip to content

Bugs when detecting the sites of step Ru105 surface #16

@zzkmirok

Description

@zzkmirok

Discription

When simply reading the xyz fil of Ru105 surface and running site detection with autoadsorbate, I failed to get all sites, especially B5 sites with the default parameters of touch_sphere_size and precision in the Surface creation.

Tests:

I ran the tests on the main branch of the code.:

from autoadsorbate.autoadsorbate import Surface

from ase import Atoms
from ase.io import read

import numpy as np
import copy

slab_Ru105 = read('Ru_105_surface.xyz')

Surface_Ru105 = Surface(slab_Ru105)
Surface_Ru105_df = Surface_Ru105.site_df

Changing touch_sphere_size

I did some tests by changing the touch_sphere_size and fixing the precision=0.25:

Here are the results by checking the number of elements in each site_formula:

touch_sphere_size from 2.6 to 3.3

When touch sphere size is 2.600:
    we detected set of Ru: {1, 2, 3}
        len(Ru: 1) = 18
        len(Ru: 2) = 46
        len(Ru: 3) = 9
When touch sphere size is 2.650:
    we detected set of Ru: {1, 2, 3}
        len(Ru: 1) = 18
        len(Ru: 2) = 41
        len(Ru: 3) = 11
When touch sphere size is 2.700:
    we detected set of Ru: {1, 2, 3}
        len(Ru: 1) = 18
        len(Ru: 2) = 49
        len(Ru: 3) = 11
When touch sphere size is 2.750:
    we detected set of Ru: {1, 2, 3}
        len(Ru: 1) = 18
        len(Ru: 2) = 48
        len(Ru: 3) = 13
When touch sphere size is 2.800:
    we detected set of Ru: {1, 2, 3, 4}
        len(Ru: 1) = 18
        len(Ru: 2) = 39
        len(Ru: 3) = 12
        len(Ru: 4) = 2
When touch sphere size is 2.850:
    we detected set of Ru: {1, 2, 3, 4}
        len(Ru: 1) = 18
        len(Ru: 2) = 42
        len(Ru: 3) = 8
        len(Ru: 4) = 6
When touch sphere size is 2.900:
    we detected set of Ru: {1, 2, 3, 4}
        len(Ru: 1) = 17
        len(Ru: 2) = 37
        len(Ru: 3) = 5
        len(Ru: 4) = 7
When touch sphere size is 2.950:
    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 15
        len(Ru: 2) = 41
        len(Ru: 3) = 19
        len(Ru: 4) = 2
        len(Ru: 5) = 5
When touch sphere size is 3.000:
    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 15
        len(Ru: 2) = 36
        len(Ru: 3) = 22
        len(Ru: 4) = 2
        len(Ru: 5) = 2
When touch sphere size is 3.050:
    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 15
        len(Ru: 2) = 36
        len(Ru: 3) = 18
        len(Ru: 4) = 1
        len(Ru: 5) = 2
When touch sphere size is 3.100:
    we detected set of Ru: {1, 2, 3}
        len(Ru: 1) = 15
        len(Ru: 2) = 31
        len(Ru: 3) = 2
When touch sphere size is 3.150:
    we detected set of Ru: {1, 2}
        len(Ru: 1) = 12
        len(Ru: 2) = 7
When touch sphere size is 3.200:
    we detected set of Ru: set()
When touch sphere size is 3.250:
    we detected set of Ru: set()
When touch sphere size is 3.300:
    we detected set of Ru: set()

Changing precision

Now changing the precision and fixing the touch_sphere_size=3.0:

Here are the results by checking the number of elements in each site_formula:

When precision is 0.050:
    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 15
        len(Ru: 2) = 36
        len(Ru: 3) = 34
        len(Ru: 4) = 23
        len(Ru: 5) = 6
When precision is 0.100:
    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 15
        len(Ru: 2) = 36
        len(Ru: 3) = 29
        len(Ru: 4) = 6
        len(Ru: 5) = 6
When precision is 0.150:
    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 12
        len(Ru: 2) = 36
        len(Ru: 3) = 29
        len(Ru: 4) = 3
        len(Ru: 5) = 5
When precision is 0.200:
    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 15
        len(Ru: 2) = 36
        len(Ru: 3) = 25
        len(Ru: 4) = 1
        len(Ru: 5) = 4
When precision is 0.250:
    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 15
        len(Ru: 2) = 36
        len(Ru: 3) = 22
        len(Ru: 4) = 2
        len(Ru: 5) = 2
When precision is 0.300:
    we detected set of Ru: {1, 2, 3}
        len(Ru: 1) = 12
        len(Ru: 2) = 35
        len(Ru: 3) = 25
When precision is 0.350:
    we detected set of Ru: {1, 2, 3}
        len(Ru: 1) = 12
        len(Ru: 2) = 36
        len(Ru: 3) = 17
When precision is 0.400:
    we detected set of Ru: {1, 2, 3, 5}
        len(Ru: 1) = 14
        len(Ru: 2) = 32
        len(Ru: 3) = 13
        len(Ru: 5) = 2
When precision is 0.450:
    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 12
        len(Ru: 2) = 33
        len(Ru: 3) = 11
        len(Ru: 4) = 1
        len(Ru: 5) = 2

Conclusion:

From observation, the number of Top site ({Ru:1}) must be 18, and the number of B5 site (Ru: 5) must be 6 in this case, which we can not get the correct results with the default parameters. With touch_sphere_size=2.95 and precision=0.08, we can get the correct number of both top sites and b5 sites:

    we detected set of Ru: {1, 2, 3, 4, 5}
        len(Ru: 1) = 18
        len(Ru: 2) = 42
        len(Ru: 3) = 48
        len(Ru: 4) = 21
        len(Ru: 5) = 6

The XYZ file (can be not updated):

72
Lattice="8.156758991 0.0 0.0 1.359459832 12.53368649 0.0 0.0 0.0 49.019105761" Properties=species:S:1:pos:R:3:move_mask:L:1:magmoms:R:1:forces:R:3 magmom=-8.75e-05 stress="0.017827628757769477 8.170135445781184e-06 -9.362263688824888e-06 8.170135445781184e-06 0.016799983004720177 -0.0004477221741269838 -9.362263688824888e-06 -0.0004477221741269838 0.008248591215493538" free_energy=-658.65399883 energy=-658.64957114 pbc="T T F"
Ru 1.35946000 5.89787000 20.00000000 F -0.00000000 0.00020000 -0.62707000 1.56846400
Ru 2.71892000 11.79608000 20.13461000 F -0.00000000 0.00155900 -0.45809400 1.48211000
Ru 2.71892000 3.68607000 20.80768000 F -0.00000000 -0.00328000 0.66199300 0.81621100
Ru 1.35946000 9.58428000 20.94229000 F -0.00000000 0.00054700 0.65337100 0.66091700
Ru 1.35946000 1.47427000 21.61536000 F -0.00000000 0.00042800 0.01397500 0.00020700
Ru 2.71892000 7.37248000 21.74998000 F -0.00000000 -0.00154000 0.07587200 -0.45497700
Ru 1.35946000 11.79616000 22.42304000 F -0.00000000 -0.00024500 -0.21299300 -1.07090300
Ru 1.35946000 5.16069000 22.55766000 F -0.00000000 0.00083500 -0.21512800 -1.09165500
Ru 2.71892000 9.58437000 23.23072000 F -0.00000000 0.00059800 0.06981400 -0.52579200
Ru 2.71892000 2.94889000 23.36534000 F -0.00000000 -0.00235800 -0.06126600 -0.73648700
Ru 1.35946000 7.37257000 24.03841000 F 0.00000000 0.00241600 -0.07059200 -0.29851500
Ru 1.35946000 0.73709000 24.17302000 F -0.00000000 0.00032200 0.13684100 -0.35564900
Ru 2.71888000 5.13681000 24.81555000 T -0.00000000 -0.00005500 0.00459300 0.00267400
Ru 1.35953000 11.04318000 24.96181000 T 0.00000000 -0.00002500 0.00249500 -0.00643800
Ru 1.35957000 2.94573000 25.63404000 T -0.00000000 0.00004600 0.00046100 0.00185700
Ru 2.71919000 8.83544000 25.74101000 T -0.00000000 -0.00033700 0.00068300 0.00466900
Ru 2.71883000 0.73379000 26.42804000 T -0.00000000 -0.00010700 0.00624600 0.00276500
Ru 1.35937000 6.61268000 26.56828000 T -0.00000000 0.00014600 0.00551700 0.00283900
Ru 2.71936000 11.04024000 27.25505000 T -0.00000000 0.00003600 -0.00214500 0.00196800
Ru 2.71863000 4.41387000 27.35538000 T -0.00000000 0.00060600 0.00127900 0.00256000
Ru 1.35983000 8.80413000 27.95279000 T -0.00000000 0.00042900 0.00345600 -0.00403700
Ru 1.35963000 2.16164000 28.08439000 T -0.00000000 -0.00011800 -0.00006700 -0.00078900
Ru 2.71873000 6.71308000 28.70973000 T -0.00000000 0.00014700 0.00427800 -0.00084300
Ru 0.00025000 0.07156000 28.84806000 T -0.00000000 -0.00025100 0.00648200 -0.00115800
Ru 4.07838000 5.89787000 20.00000000 F -0.00000000 0.00020000 -0.62707000 1.56846400
Ru 5.43784000 11.79608000 20.13461000 F -0.00000000 0.00155900 -0.45809400 1.48211000
Ru 5.43784000 3.68607000 20.80768000 F -0.00000000 -0.00328000 0.66199300 0.81621100
Ru 4.07838000 9.58428000 20.94229000 F -0.00000000 0.00054700 0.65337100 0.66091700
Ru 4.07838000 1.47427000 21.61536000 F -0.00000000 0.00042800 0.01397500 0.00020700
Ru 5.43784000 7.37248000 21.74998000 F -0.00000000 -0.00154000 0.07587200 -0.45497700
Ru 4.07838000 11.79616000 22.42304000 F -0.00000000 -0.00024500 -0.21299300 -1.07090300
Ru 4.07838000 5.16069000 22.55766000 F -0.00000000 0.00083500 -0.21512800 -1.09165500
Ru 5.43784000 9.58437000 23.23072000 F -0.00000000 0.00059800 0.06981400 -0.52579200
Ru 5.43784000 2.94889000 23.36534000 F -0.00000000 -0.00235800 -0.06126600 -0.73648700
Ru 4.07838000 7.37257000 24.03841000 F 0.00000000 0.00241600 -0.07059200 -0.29851500
Ru 4.07838000 0.73709000 24.17302000 F -0.00000000 0.00032200 0.13684100 -0.35564900
Ru 5.43780000 5.13681000 24.81555000 T -0.00000000 -0.00005500 0.00459300 0.00267400
Ru 4.07845000 11.04318000 24.96181000 T 0.00000000 -0.00002500 0.00249500 -0.00643800
Ru 4.07849000 2.94573000 25.63404000 T -0.00000000 0.00004600 0.00046100 0.00185700
Ru 5.43811000 8.83544000 25.74101000 T -0.00000000 -0.00033700 0.00068300 0.00466900
Ru 5.43775000 0.73379000 26.42804000 T -0.00000000 -0.00010700 0.00624600 0.00276500
Ru 4.07829000 6.61268000 26.56828000 T -0.00000000 0.00014600 0.00551700 0.00283900
Ru 5.43828000 11.04024000 27.25505000 T -0.00000000 0.00003600 -0.00214500 0.00196800
Ru 5.43755000 4.41387000 27.35538000 T -0.00000000 0.00060600 0.00127900 0.00256000
Ru 4.07875000 8.80413000 27.95279000 T -0.00000000 0.00042900 0.00345600 -0.00403700
Ru 4.07855000 2.16164000 28.08439000 T -0.00000000 -0.00011800 -0.00006700 -0.00078900
Ru 5.43765000 6.71308000 28.70973000 T -0.00000000 0.00014700 0.00427800 -0.00084300
Ru 2.71917000 0.07156000 28.84806000 T -0.00000000 -0.00025100 0.00648200 -0.00115800
Ru 6.79730000 5.89787000 20.00000000 F -0.00000000 0.00020000 -0.62707000 1.56846400
Ru 8.15676000 11.79608000 20.13461000 F -0.00000000 0.00155900 -0.45809400 1.48211000
Ru 8.15676000 3.68607000 20.80768000 F -0.00000000 -0.00328000 0.66199300 0.81621100
Ru 6.79730000 9.58428000 20.94229000 F -0.00000000 0.00054700 0.65337100 0.66091700
Ru 6.79730000 1.47427000 21.61536000 F -0.00000000 0.00042800 0.01397500 0.00020700
Ru 8.15676000 7.37248000 21.74998000 F -0.00000000 -0.00154000 0.07587200 -0.45497700
Ru 6.79730000 11.79616000 22.42304000 F -0.00000000 -0.00024500 -0.21299300 -1.07090300
Ru 6.79730000 5.16069000 22.55766000 F -0.00000000 0.00083500 -0.21512800 -1.09165500
Ru 8.15676000 9.58437000 23.23072000 F -0.00000000 0.00059800 0.06981400 -0.52579200
Ru 8.15676000 2.94889000 23.36534000 F -0.00000000 -0.00235800 -0.06126600 -0.73648700
Ru 6.79730000 7.37257000 24.03841000 F 0.00000000 0.00241600 -0.07059200 -0.29851500
Ru 6.79730000 0.73709000 24.17302000 F -0.00000000 0.00032200 0.13684100 -0.35564900
Ru 8.15672000 5.13681000 24.81555000 T 0.00000000 -0.00005500 0.00459300 0.00267400
Ru 6.79737000 11.04318000 24.96181000 T 0.00000000 -0.00002500 0.00249500 -0.00643800
Ru 6.79741000 2.94573000 25.63404000 T -0.00000000 0.00004600 0.00046100 0.00185700
Ru 8.15703000 8.83544000 25.74101000 T -0.00000000 -0.00033700 0.00068300 0.00466900
Ru 8.15666000 0.73379000 26.42804000 T -0.00000000 -0.00010700 0.00624600 0.00276500
Ru 6.79720000 6.61268000 26.56828000 T -0.00000000 0.00014600 0.00551700 0.00283900
Ru 8.15720000 11.04024000 27.25505000 T -0.00000000 0.00003600 -0.00214500 0.00196800
Ru 8.15647000 4.41387000 27.35538000 T -0.00000000 0.00060600 0.00127900 0.00256000
Ru 6.79767000 8.80413000 27.95279000 T -0.00000000 0.00042900 0.00345600 -0.00403700
Ru 6.79747000 2.16164000 28.08439000 T -0.00000000 -0.00011800 -0.00006700 -0.00078900
Ru 8.15657000 6.71308000 28.70973000 T -0.00000000 0.00014700 0.00427800 -0.00084300
Ru 5.43809000 0.07156000 28.84806000 T -0.00000000 -0.00025100 0.00648200 -0.00115800

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions