Open manuelperezesc opened 7 months ago
In general you won´t be able to restart from a previous run if the system changes, because the restart file contains the information of the positions of the molecules the were in the previous system.
However, what you can do, as a hack, is to just add an additional line to the restart.pack
file, which will be read as the coordinates (center of mass and rotations) of the additional molecule. For example, if the file ends with:
...
7.7893199620931938E+01 3.1780176600273666E+01 5.1383816238183385E+01 1.8093642643870842E+02 1.4873672895446501E+02 2.3021053813915064E+01
4.5102415080541306E+01 5.1845345986747098E+01 8.9131086080885467E+01 7.6206613326043964E+01 -5.6369044891462579E+01 2.2096179579601362E+01
You can add additional six numbers at the end, such as 0.0 0.0 0.0 0.0 0.0 0.0
and the new packing will run.
Thanks for the trick. The reason why I am interested in such an "iterative" process, and so to add molecules one by one based on previous solutions, is that when I do not do that, Packmol just never stops and the solution is quite empty for the box size I use as input (see picture below).
Am I doing something wrongly?
That results from Packmol not being able to pack the molecules. Do you think they fit there? It is a complicated molecule, so probably hard to pack if the density is high. You intend to simulate that without any additional solvent?
How many molecules are you trying to pack there, really? With 60 molecules the packing works, but, indeed, the box is very large. The discale
, randominitialpoint
, and movebadrandom
may help you get something different, maybe more of your liking:
tolerance 2.0
output box.pdb
filetype pdb
packall
randominitialpoint
movebadrandom
discale 3.0
structure unk.pdb
number 60
inside box 0.0 0.0 0.0 100.0 100.0 100.0
end structure
Yes, indeed. This molecule is for a OFET film, so I do not need any solvent but when I do a NPT simulation, I typically see a shrink in volume of aorund 30% (for many other molecules with different shapes). I noticed it happened to me many times, so then it was when I realised that maybe the packing was not correct. Do you think the trick you mentioned before can help?
I am trying to use Packmol 20.14.0 to pack molecules using restart files but I am struggling with the following error:
Setting initial trial coordinates ...
Molecules of type: 1 Will restart coordinates from: previous.pack ERROR: Could not read restart file: previous.pack STOP 172
I created a box of 59 molecules and set "restart_to" to previous.pack. Then I wanted to add one more molecule (60) using the previous solution as a guess and then keep doing it iteratively. I included the restart options into the "structure" section but it did not work for me even when the keywords outside.
Please find attached my input and molecule pdb files, as well as the previous pack that is generated for the arrangement of 59 molecules. Thanks.
input.zip