Sarojini Mahajan
Subscriber

Hello, I was reading this thread to get an answer related to creating structures in the script editor. I want to create and rotate a gold nanorod along the y-axis by 90 degrees. Here is the script which I wrote:

radius_ends = 20e-9;

z_span = 92e-9;

radius = 20e-9;

length_circle= z_span-2*radius_ends;

addstructuregroup;

set("name","Rod");

addcircle;

addtogroup("Rod");

set("x",0);

set("y",0);

set("z",z_span/2+gapwithglass);

set("z span",z_span-2*radius_ends);

set("material", "Au (Gold) - Johnson and Christy");

set("radius",radius);

 

addsphere;

addtogroup("Rod");

set("x",0);

set("y",0);

set("z",length_circle+(z_span-2*radius_ends)/2);

set("material", "Au (Gold) - Johnson and Christy");

set("radius",radius);

set("make ellipsoid",1);

set("radius 3",radius_ends);

 

addsphere;

addtogroup("Rod");

set("x",0);

set("y",0);

set("z",-(z_span-2*radius_ends)/2+length_circle);

set("material", "Au (Gold) - Johnson and Christy");

set("radius",radius);

set("make ellipsoid",1);

set("radius 3",radius_ends);

select("Rod")

set("rotation 1","y",90);

I can create a structure but rotation doesn't work for me. Can you help with the script?