Creating pentagonal cylinder structure

Dear Lammps users,

I have faced a problem while creating pentagon cylinder structure for a metallic nanowire. Can you suggest me what region commands or any other commands for creating this structure using Lammps input file. It would be very great help for me. Thanks in advance.

Best regards,
Hasan

Dear Lammps users,

I have faced a problem while creating pentagon cylinder structure for a metallic nanowire. Can you suggest me what region commands or any other commands for creating this structure using Lammps input file. It would be very great help for me. Thanks in advance.

you would need to combine multiple regions to get the intersection, e.g. of 1x cylinder and 5x plane.

axel.

Alternatively, you can distribute points along the surface you are interested in. If you don’t want it to move, you can make them immobile by excluding them from the integrator.
In this way you can create a barrier that can have any shape you want.

If you can excuse the self promotion, there are some examples of this on the moltemplate website:

Picture:
https://github.com/jewettaij/moltemplate/blob/master/examples/coarse_grained/abstract_lennard_jones_tube/images/tubewall%2Bsolvent_t%3D3000steps.png

Input files:

https://github.com/jewettaij/moltemplate/tree/master/examples/coarse_grained/abstract_lennard_jones_tube

This exam happens to be a cylinder, but you can change that by moving the positions of the boundary atoms More examples below:

http://moltemplate.org/visual_examples.html#translocation

http://moltemplate.org/visual_examples.html#nanotube+water

There are also several versions of “fix wall” which do the same thing.

Forgive me if I misunderstood what you were trying to do.
Hope this helps.

Andrew

Dear Andrew,

Thanks for the information. I looked up the images. Actually, I need a hollow cylinder type shape which have pentagon surface. The plane & surface should be pentagonal. I am confused how to define the region commands. I have the coordinates of the 5 points of the pentagon & I have to extrude the pentagon surface in the z direction to have the pentagon cylinder shape. If you need I can provide a picture of the geometry. Your work image has the circular cylinder shape. But to create pentagon cylinder shape what region commands I have to use?

Thank you so much for your help.

Regards,
Hasan

the easiest way to do a hollow structure is to first create a filled system, and then delete then atom in the core by using a smaller version of the same style of region.
i suggest you try this with two nested cylinder regions in LAMMPS, which should be straightforward to do, and then tweak it to do the pentagon shape.

axel.

Dear Hasan

There are multiple ways to do what you are attempting.

I am suggesting that you create a “data file” containing the coordinates of your pentagon-shaped tube and use the LAMMPS “read_data” command to read it into LAMMPS. (For details how to do this, see https://lammps.sandia.gov/doc/read_data.html)

Axel is suggesting that you fill your space with a lattice of atoms and then use the region commands to delete the atoms you don’t want.

Either will work. Generally, creating a DATA file is more effort, but it gives you much more control over your system. Later on, if one day you want to use a more complicated shape, or if you want to start putting molecules in your simulation, the effort you spent to learn to make data files will pay off. There are multiple ways to create “data” files. (https://lammps.sandia.gov/prepost.html) Axel and I have both written software to do this. If you prefer, you can also create your own script to build one for you.

I have attached an example of how to build a pentagon shaped cylinder using “moltemplate”. The “bstract_lennard_jones_tube_pentagon.tar.gz” file contains README files explaining (almost) every step, however you will need to install moltemplate (http://moltemplate.org).

— DETAILS —

The relevant commands to create a data file containing a pentagon-shaped cylinder are shown below:

import “wall_particle.lt” # (define lennard jones parameters for particles)
Pentagon {
Edge {
particles = new WallParticle [5].move(0,3,0) #3=diameter
}
Edge.move(10.32286, -7.5, 0) # move away from center
edges = new Edge [5].rot(72.0,0,0,1) # rotate by 72=360/5
}
tube = new Pentagon[20].move(0,0,3.0)

(Alternatively, you can position each “wall” particle one at a time…)

The result in this example looks like this:
(the grey particles, not the blue ones)

equilibrated.png

Note: I also added some other particles to the simulation (blue) which can move around. (I immobilized the grey particles, but allowed to blue particles to move. If you’re curious how I did this, see the “run.in.nvt” file located within the attached GZ file.)

Hope this gets you started.

Andrew

abstract_lennard_jones_tube_pentagon.tar.gz (186 KB)

Dear Andrew,

Thank you very much for your help. I understand the idea.

Best,
Hasan