m3g / packmol

Packmol - Initial configurations for molecular dynamics simulations
http://m3g.github.io/packmol
MIT License
222 stars 51 forks source link

<< Using a cylinder region from a nanotube >> #50

Closed icamps closed 1 year ago

icamps commented 1 year ago

Hi, I want to add some CO molecules around a boron-nitride nanotube. The steps I followed:

The final structure I got, the CO molecules are distributed too far around the nanotube in such a way that when loaded in Jmol, the nanotube is just a little point in the middle of the screen and the CO molecules are too way small too.

The input and output files are attached.

What I am doing wrong?

Thanks in advance.

Camps nanotube.zip

basillicus commented 1 year ago

Hi,

you are missing the maximum boundaries where to put the molecules in. The CO molecules are added outside the cylinder, but they have no maximum limit where they may be allocated. Hence, the molecules, without that constraint are really far apart. Adding the inside box in your CO structure should solve the problem.

Try this

filetype pdb
tolerance 2.0
output test.pdb
seed -1

# Load the Boron Nitride Nanotube structure and keep it fixed, with no translation nor rotations
structure BNH.pdb
  fixed 0. 0. 0. 0. 0. 0.
end structure

# Load number of molecules, outside the cylinder (nanotube) AND WITHIN a bounding box
structure CO.pdb
  number 30
  outside cylinder 0. 0. 0. 0. 0. 1. 3.92 17.31
  inside box 0. 0. 0. 18. 18. 17.31
end structure
icamps commented 1 year ago

Hi @basillicus , thanks for your help, it worked like a charm.

lmiq commented 1 year ago

Thank you both for the feedback and help. I've been out of work for some time because of a newborn at home.

basillicus commented 1 year ago

@lmiq Such a fantastic news! Congratulations!

@icamps , glad it worked!