Author Topic: Express select  (Read 235 times)

Ashik

  • Newbie
  • *
  • Posts: 2
Express select
« on: February 08, 2019, 12:12:29 PM »
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

  • Administrator
  • Sr. Member
  • *****
  • Posts: 299
Re: Express select
« Reply #1 on: February 08, 2019, 12:25:54 PM »
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: [Select]
Position.X * Position.X + Position.Y * Position.Y > 190^2 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
« Last Edit: February 08, 2019, 12:29:33 PM by Constanze Kalcher »

Ashik

  • Newbie
  • *
  • Posts: 2
Re: Express select
« Reply #2 on: February 08, 2019, 12:59:15 PM »
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

  • Administrator
  • Sr. Member
  • *****
  • Posts: 299
Re: Express select
« Reply #3 on: February 08, 2019, 01:22:55 PM »
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