GOMC-WSU / GOMC

GOMC - GPU Optimized Monte Carlo is a parallel molecular simulation code designed for high-performance simulation of large systems
https://gomc-wsu.org
MIT License
76 stars 36 forks source link

Segfault upon reading dihedral parameters for polymer system using OPLSAA FF #249

Open micahwelsch opened 4 years ago

micahwelsch commented 4 years ago

-The Issue I am attempting to simulate an NVT (and eventually NPT and GCMC) ensemble containing an amorphous polymer that uses the OPLSAA force field. Upon running the GPU version of the NVT executable I receive a "core dumped segmentation fault" error after the dihedrals are read in.

-Run Command GOMC_GPU_NVT in.conf

-What I expected The system I'm currently running contains one small polymer chain for testing purposes. I expected the polymer to move within the static simulation cell.

-Input files: ptf-gomc-files.zip

-Additional Info I'm aware that the OPLS forcefield uses a different format than CHARMM but was under the impression that it was still able to be used in the format that I have in the attached force field file.

I would also note that I built these structures in Moltemplate for MD simulation in LAMMPS and had to convert them for GOMC. That is why the atom IDs are numbers instead of typical atomic symbols.

msoroush commented 4 years ago

@micahwelsch I looked at your system, It seems that the psf file is corrupted. I could not visualize it in vmd and I had to look up the bond list in GOMC output and create the bond inside vmd using

set bonds {{0 4} {0 12} {0 1} {1 15} {1 2} {2 14} {2 3} {3 5} {3 4} {5 6} 
{5 7} {7 8} {8 9} {9 10} {10 11} {11 45} {12 13} {12 33} {16 20} {16 17} 
{16 27} {17 30} {17 18} {18 29} {18 19} {19 20} {19 21} {21 22} {21 23} {23 24} 
{24 25} {25 26} {26 33} {27 28} {27 31} {31 32} {34 38} {34 35} {34 45} {35 48} 
{35 36} {36 47} {36 37} {37 38} {37 39} {39 40} {39 41} {41 42} {42 43} {43 44} 
{44 49} {45 46} {49 50} }

set all {atomselect top all}
topo clearbonds -sel $all
topo setbondlist $bonds -sel $all

But even after bond setting, your system looks very unusual. Anyway, after debugging, I notice that you specify bonds between {0 4} {0 12} {0 1} which creates a branch molecule. However, you only defined 2 angles instead of 3 {1 0 4} and {1 0 12}. So, we are missing the third angle {4 0 12}. This error comes from the fact that {4 0 12} angle is not provided in PSF file. Please use auto angle dihedral in your topology file, so all angles and dihedrals are generated automatically. We should also provide more meaningful error for user to fix their system.

@GregorySchwing for all CBMC files, in instruction or initialization steps, we should print error message (e.g. missing angle for atom index {4 0 12} in PSF file).

GregorySchwing commented 4 years ago

Understood. @micahwelsch, you may be able to use the original files before you converted them, with our cleanGOB branch. It allows for the user to use pdb/psf files made with polymers with > 1 residue, so long as the bond information in the psf correctly defines the molecule.

bc118 commented 4 years ago

Hello,

I can't make out the structure of the molecule from the provided PSF and PDB files. I can provide you with PSF and PDB files for the polymer that will work in GOMC, if you could provided the chemical name or smiles string of the polymer.

Thanks,

Brad

micahwelsch commented 4 years ago

I've looked into it and realized that the data files that Moltemplate generated seem to be omitting the angle that @msoroush mentioned. I'm not sure why it's the only one skipped over. Regardless,

@bc118 Here is the smiles code for a one monomer chain of the polymer OC(C1=CC=C(C(OCCCO)=O)O1)=O And the smiles chain for a chain that has the terminal ends and a repeating unit in the middle. O=C(OCCC(OC1CCC(C(OCCCO)=O)O1)=O)C2=CC=C(C(OCCCOC(C3OC(C(O)=O)CC3)=O)=O)O2 Would you be including a topology file at all? I decided to try my luck at converting from Moltempalte format because I was having difficulty understanding how to create a topology file for a system like this.

@GregorySchwing What is cleanGOB? Is it a script/software I can obtain somewhere?

Thanks for the quick help, everyone! I really appreciate it! Micah

jpotoff commented 4 years ago

@micahwelsch @GregorySchwing is talking about another branch of the code we are working on to support proteins. Let's see if we can get this working by rebuilding your PDB and PSF files, first , before resorting to code in development.

Also, now would be a good time to grab version 2.7 of the code. It's got a number of bug fixes, the GPU code is faster, and it uses significantly less memory that version 2.5.

bc118 commented 4 years ago

@micahwelsch Thanks for the smiles string. So to be clear you would like the monomer and the combined molomer/polymer smiles both? Or do you just want the second combined smiles string?

I can include the coordinate (PDB), topology (PSF), and FF file (.inp). However, I'm using the available FF we have for OPLS, so you will need to confirm they are the same parameters, and not a specialized version of OPLS that your using.

micahwelsch commented 4 years ago

@bc118 If it isn't too much trouble, both would be great but if not you can just make files for the second one (the combined one). The OPLS format should be the same. I will add that the carbons in the methylene chain are treated as united atoms. So the only hydrogens are on the furan ring, and the carboxyl and alcohol groups on the ends.

Thank you so much!

bc118 commented 4 years ago

@micahwelsch Hello. The generator we are using will not be able to automatically generate the force field, psf, or pdb for anything but an all-atom force field (I.e., it is not setup for any opls United atom ) force field. The smiles string is also appears to be for an all atom force field.

For this or other similar applications it may be worth while to use something like vmd to draw the molecule and export the psf and pdb. If you want I would be happy, to show you an example from vmd or via video show you.

micahwelsch commented 4 years ago

@bc118 Sorry, I offered that info since that's what my attached files represented. Files for an all atom version would work just fine too.

A VMD example would be great though. I'd be open to a written or video call example, whichever is easiest. I'd be available any time after 12pm during the week.

bc118 commented 4 years ago

@micahwelsch Hello. I’m able to on Monday or Wednesday afternoon, if that works. I can show you then, you just need to let me know a time and provide an email so I can send a video chat. Otherwise. I can highlight the vmd manual or write something up. Just let me know what works for you ( write up or video chat).

I can definitely make an opls all atom psf and pdb.

micahwelsch commented 4 years ago

Wednesday in the afternoon works for me! My email is micahwelsch19@ku.edu.

If you could make those that would be great! They would help with understanding the formatting for a more involved molecule like this.

bc118 commented 4 years ago

@micahwelsch Hello. Sorry I forgot to ask, what time zone are you in, so I can schedule some time on Wed after you 12 PM time. Is it MDT/CST?

micahwelsch commented 4 years ago

@bc118 I am in CST time.

bc118 commented 4 years ago

@micahwelsch Hello . I just sent you an email with some links to the VMD software and a zoom for Wednesday’s meeting. Please let me know if you did not get it.

Have a good weekend.