adds crystallographic twins

Syntax

addtwin(obj,Name,Value)

Description

addtwin(obj,Name,Value) adds crystallographic twins defined by a rotation matrix and its volume fraction. Using crystallographic twins, SpinW can simulate imperfect samples and if the relative orientation of the crystallographic twins are knows, SpinW simulations can be directly compared to the expeiments on the inperfect sample.

Examples

This example shows how to add two extra crystallographic twins to the crystal. Together with the original orientation there will be three twins with equal volumes.

cryst.addtwin('axis',[0 0 1],'phid',[60 120],'vol',[1 1])

Input Arguments

obj
spinw object.

Name-Value Pair Arguments

'axis'
Defines the axis of rotation to generate twins in the xyz coordinate system, dimensions are .
'phi'
Defines the angle of rotation to generate twins in radian units. Several twins can be defined parallel if phi is a row vector. Dimensions are .
'phid'
Alternative to phi but the unit is °.
'rotC'
Rotation matrices, that define crystallographic twins. This is an alternative to the axis-phi parameter pair. Matrix dimensions are .
'vol'
Volume fractions of the twins stored in a row vector with elements. Default value is ones(1,nTwin).
'overwrite'
If true, the last twin will be overwritten, instead of adding a new one. Default is false.

Output Arguments

The function adds extra entries to the spinw.twin property.

See Also

spinw | spinw.twinq