OVITO > Support Forum

Express select

(1/1)

Ashik:
Dear Scholars,
It would be really helpful if you could shed some light on express select. I am working on a nanowire having 120nm length, 20 nm radius. I want remove all the atoms on the surface. So, I have to select the atoms first to remove it. By expression select, I tried some equations for cylinder but got stuck.
Thanks in advance.
Sincerely, Ashik

Constanze Kalcher:
Dear Ashik,

the Expression select modifier requires you to enter a boolean expression. The syntax supported by the modifier is very similar to the one used by the C programming language, see Manual:
http://ovito.org/manual/particles.modifiers.expression_select.html

If your nanowire is aligned with the z-axis and centered at (0,0,0) try for example:

--- Code: ---Position.X * Position.X + Position.Y * Position.Y > 190^2
--- End code ---
to select all atoms with r > 19 nm.

By the way, in the latest developer version, the Construct surface mesh modifier, also has an option Select particles on the surface, which might be of interest to you.
https://ovito.org/manual_testing/particles.modifiers.construct_surface_mesh.html

-Constanze

Ashik:
Dear Constanze,


Thank you very much for your reply. So I am working with a nanowire that is aligned with x axis and the nanowire was carved from a whisker having 120*50*50 nm^3 and in x axis it is 120 nm. Then I carved it in 120 nm length and 20 nm radius. So the center is at (25,25) at yz plane.
I tried the code:
(Position,Z - 25)^2 + (Position,Y -25 )^2 > 190^2
But it didnt work.
Can you point out where I made mistake.
Sincerely,
Ashik

Constanze Kalcher:
Dear Ashik,

replace the commas with points, the correct syntax is Position.Z not Position,Z. Also note that the length unit here is Å not nm.

-Constanze

Navigation

[0] Message Index

Go to full version