Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not read restart file #65

Open
manuelperezesc opened this issue Apr 23, 2024 · 5 comments
Open

Could not read restart file #65

manuelperezesc opened this issue Apr 23, 2024 · 5 comments
Labels

Comments

@manuelperezesc
Copy link

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

@lmiq
Copy link
Member

lmiq commented Apr 23, 2024

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.

@lmiq lmiq added the question label Apr 23, 2024
@manuelperezesc
Copy link
Author

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?

imagen

@lmiq
Copy link
Member

lmiq commented Apr 23, 2024

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?

@lmiq
Copy link
Member

lmiq commented Apr 23, 2024

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

@manuelperezesc
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants