m3g / packmol

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

Oblong protein > create box dimensions similar to Amber's TIP3PBox iso command? #67

Closed ONISniperOne closed 5 months ago

ONISniperOne commented 5 months ago

I have an oblong protein, that's tilted in space. I know I can specify a rectangular box to use by doing

inside box xi. yi. zi. xf. yf. Zf.

But how do I do that in relation to the protein?

lmiq commented 5 months ago

You can set the position of the center of mass of the protein with the fixed keyword.

ONISniperOne commented 5 months ago

But how do I get the edge of the resulting box parallel to the long axis of the protein?

lmiq commented 5 months ago

The fixed keyword has options to rotate the protein and then you can orient it as you want. Alternatively put the protein in a smaller box inside the larger solvent box.

ONISniperOne commented 5 months ago

Is it this command?

fixed x y z a b g

I imagine, I would use the center command then fixed. I know xyz refers to the rotation angle in radians, but what is abg? It wasn't explained in the user guide.

"

1. | fixed -- | --   | Usage: fixed x y z a b gThis options holds the molecule fixed in the position specified by the parameters. x, y, z, a, b, g, which are six real numbers. The first three determine the translation of the molecule relative to its position in the coordinate file. The former three parameters are rotation angles (in radians). For this option it is required that only one molecule is set. It may be accompanied by the keyword center. If this keyword is present the first three numbers are the position of the baricenter (not really the center of mass, because we suppose that all atoms have the same mass). Therefore this keyword must be used in the following context:structure molecule.pdb  number 1  center  fixed 0. 0. 0. 0. 0. 0.end structureIn this example, the molecule will be fixed with its center the origin and no rotation.

"

Edit: reread it and realized "the former three parameters" actually meant "the latter three parameters" xyz = translation of the molecule abg = rotation angle in radians

ONISniperOne commented 5 months ago

Also, are the units of xyz in Angstroms?

lmiq commented 5 months ago

Yes, exactly. I'll fix it.

The units are the units you have provided in the coordinate file. The package is not sensible to any kind of units. Just be consistent concerning the coordinates, tolerances, and other dimensions.

ONISniperOne commented 5 months ago

I'm using a pdb file of a crystal structure, so I guess it's in Angstroms... Thanks!