EmbedStructure

EmbedStructure[guestUnits,targetPositions,hostCrystal]
embeds guestUnits at targetPositions into hostCrystal.
Details and OptionsDetails and Options
- This function mutates hostCrystal. Use the "NewLabel" option to create a new structure/crystal instance.
- In the following, by entity we mean either the symbol of a chemical element (e.g. "Fe" or "Au") or a key in the $CrystalData association (e.g. "Diamond" or "LanthanumHexaboride"). The guestUnits can take these forms:
-
{entity} a single crystal object or chemical element {entity1, entity2, …} a list of several crystals or elements {p1,p2,…}{entity1,entity2,…}} a shuffled distribution of such entities {cond1entity1,cond2entity2,…} a list of Condition rules that constrain the placement of entities - When using a list of Conditions, each coordinate in targetPosition will pass through the conditions in order. If the coordinate tuple does not match any of them, the last entry in guestUnits will be used as default.
- The special label "Void" can be used to signal a vacancy/absence of embedding.
- Chemical element symbols can also be used in guestUnits, and will correspond to insertion of single atoms of the given type.
- targetPosition should be a list of three-dimensional coordinate tuples.
- Options:
-
"DataFile" FileNameJoin[{$MaXrdPath,"UserData","CrystalData.m"}] path to data file "Distortions" {0, 0, 0} set shift amplitudes [ ] (constant or range)
"DistortionType" "Cartesian" interpret distortions in terms of ångströms in the x–y–z directions ("Cartesian") or fractions of host unit cell in a–b–c directions ("Crystallographic") "MatchHostSize" True expand targetPositions to match host structure size "NewLabel" "" label to use for the new structure (will overwrite hostCrystal by default) "OverlapPrecedence" "" which atom group to keep if there are overlapping atoms ("Host" or "Guest") "OverlapRadius" 1.0 threshold [ ] for asserting overlap
"ShowProgess" False whether to display a progress bar "TrimBoundary" "None" procedure to remove atoms at our outside boundaries after embedding - Rotation options (see also the tutorial Using the rotation options):
-
"RotationAnchorReference" "Unit" which type of point to perform rotation about "RotationAnchorShift" {0, 0, 0} translation of the anchor point "RotationAxes" IdentityMatrix[3] three vectors defining the rotation axes "Rotations" {0, 0, 0} set rotation angles [ ] (constant or range)
- "Distortions" should be a list of three entries, each either being a number describing a constant shift or a pair of numbers describing a minimum–maximum range for the shift. Each time a unit is to be placed at a targeted position, either the constant shift or a pseudorandom number in the given range is added to its position. The input numbers are assumed to be in either ångströms or fractional coordinates of the hostCrystal's unit cell (see the "DistortionType" option).
"Rotations" works analogously, but corresponds to a rotation transformation. The input is then assumed to describe a rotation about the axes specified by "RotationAxes" option. Values are assumed to be in the unit of radians. - "Distortions" and "Rotations" input can be mixed numbers and pairs of numbers, or a list of rules where conditions on coordinates point to such numbers or pairs of numbers. If no conditions match a given coordinate tuple no distortion/rotation is performed. Some examples:
-
"Distortions"{0,{2,5},3} distorts each embedded structure by a random amount between in the
-direction and a constant amount by
in the
-direction.
"Rotations"{
{x_,y_,z_}/;y>2{90°,0,25°}
}rotates all embedded structures placed at a position such that by
about the
-axis and
about the
-axis.
- When using conditions, each coordinate that is to be tested will fall through the list of conditions until the first match occurs. If no condition match, the rotation/distortion for that input will be zero.
- The following settings are available for "TrimBoundary":
-
"Box" deletes all atoms with any coordinate being negative or larger than the host structure size "None" no filtering is performed "OuterEdges" deletes all atoms with any being negative or larger than the host structure size
- The default action of "OverlapPrecedence" is to not check for any overlapping atoms. Checks are only performed if it is set to either "Host" or "Guest".
- Chop is applied to all coordinates with a tolerance of
.
ExamplesExamplesopen allclose all
Basic Examples (5)Basic Examples (5)
In this example we embed a single iron atom into Ice. Let use place it at in the ice structure.
We can use CrystalPlot to visualise the new structure:
Note that we have embedded iron into the asymmetric unit of Ice (consisting of five atoms). If we wanted to put it in an ice network/structure, we could have used ExpandCrystal on Ice beforehand.
In this example we will work with ice as our host structure. Let us see if we can find a special position to embed atoms in…
… taking the site, for example, which is shown above. Atoms located at
have this site symmetry. Let us put nickel in there, and use a host structure that is
unit cells of ice:
We can also mix in nickel and iron at the special position, randomly distributed at a 3:1 ratio:
The special label "Void" may be used to create vacancies:
The units to be embedded can be placed according to coordinate patterns.
Distortions and rotations can also be performed according to user specified conditions:
One can also make the distortions occur randomly, in addition to randomising the distortion amplitudes: