Welcome To Support Community

Materials Studio

Advanced Search
Ask Search:
Historic PostHistoric Post (BIOVIA)  

How to create icosahedron nanocluster?

Hi everyone!

How to create an icosahedron nanocluster?



Hi Aksenoff,

To create an icosahedron you could take the approach used in , by starting from a big cluster, and delete atoms that are not inside the required shape.

Attached is a scripting attempt; to see if an atom is inside the icosahedron, the script creates 12 anchors (the vertices), and, using combinations of 3 anchors, 20 planes (the surfaces). Anchors were introduced in 5.5 release. Then starting from a big super cell, each atom is checked if it is located on the inner side of each surface, and deleted if not.




Historic PostHistoric Post (BIOVIA) 

Thanks for useful answer, but I haven't material studio 5.5 =(
However principle of building solids like this is clear.


Hi Aksenoff,

You can modify the script to make it work in earlier versions of Materials Studio, by using atoms rather than anchors to create planes.

First, on line 119 create a temporary carbon atom (or any other element that is not in the nanocluster):

my $anchor = $doc->CreatePositionAnchor(Point(X => $x, Y => $y, Z => $z));
my $anchor = $doc->CreateAtom("C",Point(X => $x, Y => $y, Z => $z));

On line 127 and 139 change the filter to Atoms:
my $positionAnchors = $doc->PositionAnchors;
my $positionAnchors = $doc->Atoms;

It turns out that the plane normals changed directions, so on line 158 change the criterion for IsInside:

if( InProduct($point,$normal) > $distance )

if( InProduct($point,$normal) < $distance )

Finally on line 109 make sure you do not delete the atoms that define the planes:


if(!IsInside($atom->XYZ,$DOC) && $atom->ElementSymbol ne "C")

Hopefully with these modification it will work also in earlier versions; just make sure you delete the carbon atoms before doing any subsequent calculations!
Historic PostHistoric Post (BIOVIA) 

Thank you for helpful answer, all works correct.