marrink-lab / polyply_1.0

Generate input parameters and coordinates for atomistic and coarse-grained simulations of polymers, ssDNA, and carbohydrates
Apache License 2.0
126 stars 22 forks source link

Use polyply for yet not included Poly (para phenylene ethynylene)s #225

Closed mbrosz closed 2 years ago

mbrosz commented 2 years ago

Dear PolyPly1.0-Team,

I was just trying out the new version of polyply to generate a topology file for the polymer I am working on (PPE). However, since the parameters for PPEs are yet not included in the polyply library I have not found a way to generate the corresponding topology and coordinate files. In the old version of polyply, I could just use a default monomer itp file and generate the coordinate file based on the topology file. I was wondering if there is the possibility to generate a topology and coordinate file for a yet not included polymer?

If not, I was wondering if you might include the parameters for PPE in the polyply library. This might help me generate the corresponding topology and coordinate files. If this is possible, here you can find the publication: https://pubs.rsc.org/en/content/articlelanding/2022/cp/d1cp04237h

Thanks for considering my issue, Matthias

fgrunewald commented 2 years ago

Hi Matthias,

It is should be possible to create both coordinates from a topology file as well as creating itp files for polymers, which are not part of the library. The two operations are completely separate. For the coordinate creation you'd need something like:

polyply gen_coords -p system.top -o sys.gro -name sys -box 10 10 10

You can find more details in this Tutorial. Please note that this polyply version builds the coordinates based on a 1 bead-per-residue super CG model. In order for the polymer to be generate nicely the itp-file should have different resids/resnames for different residues. Note you can also set the persistence length to steer chain conformations for stiff polymers.

About the input file generation: the new version of polyply accepts itp-files using the old polyply syntax, however, it is heavily deprecated. In the new version there are some tighter checks, to prevent false itp files being generated in edge cases. I would recommend writing a .ff file, which then can also be added to the library. This Tutorial shows how to write a .ff file for an example polymer. But you can also browse the Martini library for inspiration. In both cases the command for generating the itp file should look something like the photo command shown below. Please note that <some text> means it is a place-holder. You do not need to write the '<' signs.

polyply gen_params -f <.ff/.itp> -seq <monomer_name>: <number of monomers> -o out.itp -name <some name> 

Finally, congrats to the paper! I've in fact read it and think it is a really cool example of a Martini3 polymer. So if you're up for it, I would be more than happy to add it to the library. We can do this one of 2 ways. Either you try writing the .ff file yourself, or if you could provide me with an itp file, when I've time I can generate the .ff file.

Let me know if you have any problems, and/or if you want to add PPE to the library.

Cheers, Fabian

mbrosz commented 2 years ago

Hi Fabian,

Thanks for your fast and rich-in detail reply. Thanks to your instructions I was able to generate the coordinate and topology for my polymer of interest. I think it would be really cool, if you could add the PPEs to the polyply tool so the community might use it. I have already generated the PPE.martini3.ff file as you suggested. I was just wondering where I should upload the file or send it via e-mail?

One little remark concerning the topology for the PPEs. After the polyplying step, I usually performed some post-processing with the topology and coordinate file to make sure the polymer behaves as it should. To take this into account, I added some "comments" to the header of the PPE.martini3.ff file. I was wondering, if this is the correct way to do it?

Thanks again and cheers, Matthias

fgrunewald commented 2 years ago

Hi @mbrosz,

You're welcome. If you have already a PPE .ff file you can fork this repository and then place the file into the polyply/data/martini3 folder. Then you can make a pull request to this repository and I can show you how to add a reference itp file which will make sure that all itps produced in future will match that reference itp.

Regarding you're little remark: I will take a look once I can see the file. Perhaps there is a way to get rid of the post-processing step already. Otherwise comments are fine.

Let me know if you need help with the GitHub pull request.

Cheers, Fabian

mbrosz commented 2 years ago

Hi Fabian,

perfect, I think I kind of performed a pull request right now.

So I hope it worked out and you can take a look at the file I provided. May be just to double check also the syntax etc. I also hope that the comments are somehow understandable, if not just let me know to be sure. Concerning the post processing, I think it would be great if one could automate this in a specific way, however some bigger changes might be needed for this. So please let me know, if everything worked out.

Cheers, Matthias