Author Topic: Assigning colors for dislocations with different Burgers vectors  (Read 74 times)

Jinyu

  • Newbie
  • *
  • Posts: 2
Hi Alex and Ovito users,

Recently, I started working with dislocations in the small angle grain boundaries of BCC. I succeeded in indentifying seven different dislocations with different colors. The problem I encountered is that I do not know how to change the colors correponding to different dislocations. For dislocation types, like <100>b and <111>b/2, users can change the correponding colors manually. For  Burgers vectors of dislocations, I don't find any button for specifying colors as I want.

best regards,

Jinyu

« Last Edit: May 07, 2018, 02:46:31 PM by Jinyu »

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 369
Re: Assigning colors for dislocations with different Burgers vectors
« Reply #1 on: May 07, 2018, 08:24:55 PM »
Dear Jinyu,

OVITO defines a hardcoded set of dislocation types for each crystal type, for which default colors are prescribed. You can find this list in the source code here:

https://gitlab.com/stuko/ovito/blob/master/src/plugins/crystalanalysis/modifier/dxa/DislocationAnalysisModifier.cpp#L133-172

For BCC, three typical dislocation types are predefined, all being lattice dislocations and not GB dislocations.
For all other, non-standard dislocation types, a single default color is used to visualise the dislocation lines. I'm afraid there is no way to assign other colors to them within the program. The only option you have is to modify the source code, add your specific Burgers vector types to the list, and rebuild OVITO.

If you want, you can create an issue with a feature request on GitLab, so that I can add support for custom dislocation types in the future:

https://gitlab.com/stuko/ovito/issues

-Alex

Jinyu

  • Newbie
  • *
  • Posts: 2
Re: Assigning colors for dislocations with different Burgers vectors
« Reply #2 on: May 08, 2018, 10:55:12 AM »
Dear Alex,

I may need to make my question clearer. Picutures attached shows dislocations with seven different Burgers vectors belonging to two dislocation types in BCC, 3 kinds of <100>b ([100],[010],[001] in BCC) and 4 kinds of <111>b/2 ([111]/2,[1-11]/2,[11-1]/2,[-111]/2 in BCC). So there is no dislocations belonging to the other type. As this is the small angle boundary (3 degree), the interfacial dislocations can be specified successfully by DXA, even if dislocations not in a single crystal lattice. Ovito can specify these different dislocation segments, but I was wondering if these default colors for different Burgers vectors prescribed in OVITO could be redefined by the users. (For the two complete dislocation types in BCC, we can redefine colors in OVITO)

With regards,

Jinyu 
« Last Edit: May 08, 2018, 11:06:14 AM by Jinyu »

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 369
Re: Assigning colors for dislocations with different Burgers vectors
« Reply #3 on: May 11, 2018, 09:38:37 PM »
Jinyu,

Thanks for clarifying what you meant, and I'm sorry that I didn't realise at first that you are using the "Color lines by Burgers vector" mode and not the "Color line by dislocation type" mode.

The answer remains more or less the same though. I didn't have time yet to implement a customization option for the user and the set of line colors is currently hardcoded in the source code of OVITO and cannot be changed by the user. Here are the corresponding lines in the source code:

https://gitlab.com/stuko/ovito/blob/master/src/plugins/crystalanalysis/objects/patterns/StructurePattern.cpp#L57-74

There are seven colors in total: four 1/2<111> and three <100> Burgers vectors for the BCC crystal lattice.

For the time being you would have to modify the source code and recompile OVITO if you want to customise these predefined colors.