Author Topic: Questions about common neighbor analysis and cluster analysis.  (Read 496 times)

Qriver

  • Newbie
  • *
  • Posts: 19
Hi, every one

I have two questions:
1. if the common neighbor analysis will have deviation on the structure identification?
2. Why the method of cluster analysis will identify one atom as a cluster?

Thank you!
Shuai

Constanze Kalcher

  • Administrator
  • Full Member
  • *****
  • Posts: 113
Re: Questions about common neighbor analysis and cluster analysis.
« Reply #1 on: June 28, 2018, 01:47:45 PM »
Hi Shuai,

regarding your first question, please explain what you mean by structure identification. I'm guessing you're asking about the difference between the common neighbor analysis modifier and one of the other structure identification methods implemented in OVITO (to which the common neighbor analysis also belongs). Or is your question aiming at if you can identify defects?

As for the cluster analysis, this modifier decomposes a particle system into disconnected sets of particles (clusters) based on a local neighboring criterion, i.e. the cutoff you specified. So if no neighbors are found within the cutoff of a single atom, this atom will appear as a single atom cluster with its own cluster ID. Look at the example picture I attached. Here the cluster analysis was used to find the "free floating" atoms so to say, that do not belong to the nanoporous particle.

-Constanze

Qriver

  • Newbie
  • *
  • Posts: 19
Re: Questions about common neighbor analysis and cluster analysis.
« Reply #2 on: June 28, 2018, 05:47:49 PM »
Hi Constanze,
My first question is if the common neighbor analysis is enough precise, e.g. this method will identify the outermost atom of the crystal cluster to be non-crystal atoms.
Thank You!
Shuai

Constanze Kalcher

  • Administrator
  • Full Member
  • *****
  • Posts: 113
Re: Questions about common neighbor analysis and cluster analysis.
« Reply #3 on: June 28, 2018, 06:27:44 PM »
Hi Shuai,

yes indeed. Let me bring up the example of the nanoporous particle again, which was set up as single crystalline fcc. The common neighbor analysis will not identify the surface atoms as fcc (here colored in green) since they don't have 12 nearest neighbors anymore.
The CNA actually takes into account 1) the number of common neighbors of each atom and its neighbors, 2) the number of bonds between these common neighbors and 3) the number of bonds in the longest continuous chain of bonds between the common neighbors. This triplet of values would be (4 2 1) for an fcc atom.

For more details, I would like to refer you to the references given in the manual,
 
https://ovito.org/manual/particles.modifiers.common_neighbor_analysis.html

or this book chapter:

https://link.springer.com/chapter/10.1007/978-3-319-33480-6_10

Let me know if you have further questions,
-Constanze
« Last Edit: June 28, 2018, 06:31:19 PM by Constanze Kalcher »

Qriver

  • Newbie
  • *
  • Posts: 19
Re: Questions about common neighbor analysis and cluster analysis.
« Reply #4 on: June 29, 2018, 02:53:51 PM »
Hi Constanze,

Thank you very much for your help.
I have a question about the method, do you know how to leave the outermost crystal atoms with code?
Thank you!

Shuai

Constanze Kalcher

  • Administrator
  • Full Member
  • *****
  • Posts: 113
Re: Questions about common neighbor analysis and cluster analysis.
« Reply #5 on: July 02, 2018, 10:49:23 AM »
Hi Shuai,

do you want to do that with python code? And do you want to specifically select non-fcc atoms that are neighbors to at least one fcc atom?

Constanze
« Last Edit: July 02, 2018, 10:58:17 AM by Constanze Kalcher »

Qriver

  • Newbie
  • *
  • Posts: 19
Re: Questions about common neighbor analysis and cluster analysis.
« Reply #6 on: July 02, 2018, 03:59:49 PM »
Hi Constanze,

Can CNA identify all BCC atoms? if not, I want to get the BCC atoms with python code which will be identified to be non-BCC atoms by CNA.

Shuai

Constanze Kalcher

  • Administrator
  • Full Member
  • *****
  • Posts: 113
Re: Questions about common neighbor analysis and cluster analysis.
« Reply #7 on: July 02, 2018, 04:41:44 PM »
Hi Shuai,

the CNA will only identify those atoms as bcc which have 8 nearest neighbors and 6 second nearest neighbors and only if all these 14 neighbors are sitting on regular bcc sites. But note that these neighbor atoms themselves may not be labeled as bcc by the CNA if they do not fulfill these criteria just mentioned.

One way of selecting these atoms which are neighbors of bcc atoms but which have not been labeled as bcc themselves is to use the Expand selection modifier. First you select the bcc atoms using the Select type modifier as usual. Then, the Expand selection modifier allows you to also select atoms in the immediate neighborhood of the already selected bcc atoms. In your case you should expand the selection among the N nearest neighbors (second option) and set the value to 14.

Code: [Select]
from ovito.modifiers import CommonNeighborAnalysisModifier, SelectTypeModifier, ExpandSelectionModifier

node.modifiers.append(CommonNeighborAnalysisModifier(
    mode = CommonNeighborAnalysisModifier.Mode.AdaptiveCutoff
))
node.modifiers.append(SelectTypeModifier(
    property = "Structure Type",
    types = { CommonNeighborAnalysisModifier.Type.BCC }
))
node.modifiers.append(ExpandSelectionModifier(
    mode = ExpandSelectionModifier.ExpansionMode.Nearest,
    num_neighbors = 14
))


Constanze

Qriver

  • Newbie
  • *
  • Posts: 19
Re: Questions about common neighbor analysis and cluster analysis.
« Reply #8 on: July 06, 2018, 04:34:36 PM »
Hi Constanze,
Thank you for your help!
Shuai