-
Notifications
You must be signed in to change notification settings - Fork 100
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
Help for reading coordinates from pdb files. #81
Comments
Please forgive me. This has been a particularly bad month, and I've been forced to ignore moltemplate questions for a couple weeks. (Unfortunately moltemplate is not relevant to my current job. I reply moltemplate questions intermittently when I have time.) Without your PDB file(s), I could not tell what went wrong. However I realize that PDB files can be quite large. Don't post them here. But if the size of each PDB file is less than 25mb, then try emailing each file to jewett.aij -AT- gmail.com (One file per email.) In the absence of the PDB files, I will do my best to try and figure out what might have gone wrong. Here are some guesses what might have caused this error: Perhaps you did not include the entire system in your "system.lt" file?When you run moltemplate.sh without the "-pdb start.pdb" argument, it generated a LAMMPS DATA file (named "system.data") containing 9798 atoms. (These are the atoms that are created when moltemplate carries out all of the "new" commands in your "system.lt" file.) However you have more atoms in your PDB file (23238). This suggests that you forgot to include some molecules in your "system.lt" file, or that at least one of your molecule files (eg "gra.lt", "Li.lt", "pyr.lt", "TF2N.lt", or "water.lt") does not contain enough atoms. I think this is the most likely explanation. In the interest of being thorough, I made some additional suggestions below. But don't think my suggestions below are probably relevant to your error message, and I hope I don't scare you away by suggesting something complicated that is not relevant to your issue. Other common problems when using the -pdb and -xyz argumentsWhen you use moltemplate.sh with the "-pdb FILE.pdb" argument, then all of the atoms in your system must be present in that PDB file (FILE.PDB). (Furthermore the order of atoms in the PDB file must match the order of atoms in the "system.data" file, created by moltemplate. However this does not seem to be the error you are running into yet.) Combining multiple PDB or XYZ files into one file before running moltemplate.shFrom what you wrote, it sounds like you have different portions of your system built in different ways and stored in different files. If you are using PDB or XYZ files then all of the coordinate data for the entire system must be in one file. If you have multiple PDB files (eg "graphene.pdb" and "liquidmixture.pdb"), then it should be possible to concatenate them together into one larger file:
...and use this new file with moltemplate.sh:
(For any other readers, if you had two XYZ files, you can combine the two by concatenating them. However you must to remove the 2-line header from the second file before concatenating and update the number on the second line to count the total number of atoms.) Combining PDB/XYZ files with move() commandsHowever, life is more complicated if you want to use moltemplate to build part of the system using moltemplate's explicit ".move()" commands, and part of the system using a PDB or XYZ file (created by PACKMOL, for example). Is that what you are doing? If so, then I suggest that you use moltemplate to build the portion of the system that you have in your PDB file or XYZ file. Suppose you have a PDB file (eg "liquidmixture.pdb") containing everything but the graphene. And suppose you want to build the graphene using moltemplate's move commands. (Example here.) In that case, I would:
(The "system_lipid_mixture_only.lt" is a version of the "system.lt" file which omits the lines which instantiate the graphene, but is otherwise identical to "system.lt". In your case, I would comment out the line: "GRA = new gra[4800]") This will create three files:
(Note: The "ltemplify.py" program is explained in detail here and here.)
This example refers to the "graphene.lt" file that defines the "Graphene" unit cell. It can be found here. The "liquidmixture.lt" file was created earlier by "ltemplify.py". If you are still confused, please send me your PDB files (by email). |
Dear Professor,
I want to use moltemplate to add information such as key corners from the pdb file created by packmol, but when I run:
moltemplate.sh -pdb start.pdb -atomstyle "full" system
lt it reports an error stating:
Error: Number of atoms in coordinate file provided by user (23238) does not match the number of atoms generated in ttree file (9798).
My system is graphene electrode with ionic liquid system,When I was troubleshooting the error, I found that when I read just the graphene or water or Li ions individually, I could read their pdb file coordinates, but when I read them together I had a problem with not being able to match the pdb coordinates.
This problem has been bothering me for a long time, and my lt files are written strictly according to the syntax.Here, I sincerely ask for your help!
Thanks a lot!
Here, I attach my lt files.
case.zip
The text was updated successfully, but these errors were encountered: