-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Dear Dr, Peter Larsen,
I appreciate for developing the polyhedral template matching algorithm, which works well at finite temperature.
Using the algorithm, the local environment of a solid structure was analyzed. Interestingly, ovito and asap implemtation gave different results, and the difference of frequency was around 3 % of total atoms. (Anyway 3 % is a small value.)
Could you please confirm which value is better?
The sturcture is bcc titanium at temperature where bcc titanium is unstable, but hcp titanium is stable. Note that at the temperature where bcc titanium is stable, the proportion of atoms marked as hcp increases, probably because temperature is high.
Do you think that these atoms marked as hcp structures are significant?
The same rmse_max of 0.2 was used. Is there another parameter that should be adjusted?
- asap implementation using python
asap3.version
'3.12.8'
Type frequency (max 1): (total 128 atoms)
bcc 0.867
hcp 0.102
fcc 0.016
none 0.016
- ovito implementation using ovito gui version 3.7.5 (both free and pro version):
Type frequency (max 1):
bcc 0.898
hcp 0.086
fcc 0.016
none 0.000
Attached is structure file.
bcc_Ti.zip
Because I do not know how to use this repository directly, asap and ovito are used.
The code for asap follows and is attached:
get_local_structure_asap.zip
#!/usr/bin/env python3
# polyhedral template matching. Is the local structure bcc or hcp or others?
import os
import numpy as np
from asap3.analysis import PTM
from ase.visualize import view
from ase.io import read
# Ref.: https://wiki.fysik.dtu.dk/asap/Local%20crystalline%20order
# for polyhedral template matching method
rmsd_max = 0.2 # Ang
visualize = False
# visualize = True
# VERBOSE = True
VERBOSE = False
def analyze_polyhedral_template_matching(atoms):
ptmdata = PTM(atoms, rmsd_max=rmsd_max)
num_atoms = len(atoms)
# get unique structures and counts
structures, counts = np.unique(ptmdata['structure'], return_counts=True)
frequency = counts / num_atoms
# Flip so that most frequent structure comes first.
structures = np.flip(structures)
frequency = np.flip(frequency)
# print('Type 0 = none; 1 = FCC; 2 = HCP; 3 = BCC; 4 = Icosahedral; 5 = SC.')
structures = structures.tolist()
for index, value in enumerate(structures):
if value == 0:
structures[index] = 'none'
elif value == 1:
structures[index] = 'fcc'
elif value == 2:
structures[index] = 'hcp'
elif value == 3:
structures[index] = 'bcc'
elif value == 4:
structures[index] = 'icosahedral'
elif value == 5:
structures[index] = 'sc'
print(' Type frequency (max 1):')
for index, value in enumerate(structures):
print(f' {structures[index]} {frequency[index]:.3f}')
if visualize:
atoms.set_tags(ptmdata['structure'])
view(atoms)
# menu -> view, colors -> by tag
# 3: bcc
print('The result of polyhedral template matching follows. \n')
atoms = read('bcc_Ti.cfg')
analyze_polyhedral_template_matching(atoms)