-
Notifications
You must be signed in to change notification settings - Fork 24
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
ENH: parameters/steps needed to build SEBS #390
Comments
Hi @tylerjereddy, Thanks for reaching out again. I think it should be possible to complete this project quite fast. We have a new tool called gen_ff (#383) that is currently in beta testing. This tool allows you to automatically extract the ff-files from a small sample itp file generated with any FF-generator tool. For example, you could generate a small combination like:
The only thing is that you need to generate manually, are the coordinates of the initial small molecule. I do have a very hacky UFF polyply version that might work for this step as well. However, if it is a really large polymer it might be better to generate the Martini coordinates first. Then run an NpT simulation to get to target volume and get a bit of relaxation. Then you backmap the entire thing to all-atom. Polyply can backmap this type of polymer directly. Thus, there is no need for backwards or backmapping files. Steps 1-6 are still needed, however, I think your polymer structure will be more relaxed. Finally, I think it would be good to provide a bending rigidity in the coordinate generation. But we can discuss this at a later stage. If this plan sounds reasonable to you, I can help with the individual steps as needed. Keep in mind that #383 is still in beta testing as well. Cheers, |
@fgrunewald At the
I used
I'm a bit unclear on CGsmiles vs. SMILES, although there seem to be some docstrings with examples at https://github.com/gruenewald-lab/CGsmiles (I'd probably need to read more detailed docs to really understand the augmentations allowed beyond regular SMILES; there seem to be I'd also note that the point charge calculations from |
The error appears to be the same if I install the latest version of https://github.com/marrink-lab/vermouth-martinize locally as well (directly from |
@tylerjereddy yes indeed this is a known issue. To solve the problem you can provide the top file instead of the itp file. It should be something like |
Here is the traceback I see if I use
There is another |
Using the OPLS version of the GMX topology file ultimately ends up in the same traceback as above with |
* The error message when processing conventional SMILES strings can be confusing, as observed at: marrink-lab/polyply_1.0#390 (comment) * For cases like that where there are no polymeric fragments (i.e., no use of braces), this patch improves the error message (and adds a test for it) to nudge the user to BigSMILES or CGSmiles formats.
Ah, it looks like either BigSMILES or CGSmiles may be possible, but probably not conventional SMILES per the cross-listed PR to improve the error message. I'll see if I can adjust my input string accordingly then. |
@tylerjereddy yes, indeed it needs to be a valid CGSmiles string. The CGSmiles string defines the mapping between residues used by polyply to make the itp file and the all-atom graph. We use it to extract the building blocks and make it agnostic to the order of the atoms and their naming. CGSmiles are different from BigSMILES as they describe transformations of resolutions. The original idea was to use BigSMILES, but they were insufficient for many cases. As the docs are still under construction you can check this doc for a better explanation. To give you an example: Let's say you have a PS polymer with 5 residues and a CH3 terminal group. The cgsmiles string should be:
The '>' and '<' are connectors that define which atoms to connect to get the all-atom graph. The first brace contains the residue graph using a syntax like SMILES. For your case, I think the string should be something like:
Probably, you will end up with two PS terminal residues that are special, because you did not provide an end-group. We avoid having just hydrogen atoms at the end of a polymer for better balancing of charges. |
Thanks, I ran into a few more errors after switching to CGSmiles and posted an initial analysis starting at #383 (comment). |
@ricalessandri could you perhaps have a look at this and help? I'm quite busy at the moment and not sure when I've time to take a more in depth look. |
Ok, after the recent fixes in cgsmiles and advice at tylerjereddy/polyply_pr_383_repro#1 I'm back in business it seems, thanks! I may have more questions, but so far it is moving forward. I'll need a way to conveniently cycle repeats of two residues at some point as well, maybe I can figure that out from the syntax (new residue composed of N repeats of the individual residues?) or I suppose even generate it programmatically with a long string. |
@fgrunewald @ricalessandri Probably getting close now, but my coordinates look a bit sparse perhaps (Hter=white; styrene=red; ethyl=orange; butyl=pink) for 10 polymers at density 0.7 g/mL?: there were a few warnings like I'll go ahead and try to build a much larger polymer system overnight, but I suspect something isn't quite right yet? The terminal H seems too far away from other molecules for example, no? |
The sparsity might be ok but the missing link is definitely not good. If the warnings are consistently between |
Ah good point, |
@tylerjereddy in addition to what Riccardo said, you should always look at the polymer after an energy minization step. It is part of the protcol to get the inital coordinates. |
So, after energy minimization the polymers now look far more "natural"/linearized. However, the density guarantees are clearly lost--these are huge polymer chains and they've expanded far outside the bounds of the original simulation "container." This is good progress though thanks! Is there any guidance for how I might "guarantee" preservation of density from what |
Note that there's no such thing as being "outside" the simulation box because of periodic boundary conditions. If you just energy-minimized the system, the simulation box won't change dimensions. So whatever target density you set through |
good point, maybe it just needs the right |
|
I see that there is some submission guidance for new building blocks and links at https://github.com/marrink-lab/polyply_1.0/wiki/Submit-polymer-parameters and https://github.com/marrink-lab/polyply_1.0/wiki/Tutorial:-writing-.ff-input-files. Nonetheless, I want to get some guidance for the task I'm being asked to deliver to get a sense for the amount of work involved, and so that I can properly identify the individual steps and what has already been done. I'm happy to contribute to the project and deal with review comments, but first I'd like to check on feasibility, etc.
The task is to build quite large polymers of SEBS (repeats of styrene, ethylene, butylene, and then styrene again, etc.). For the first pass, I can ignore branching, although we do want branching eventually. I just re-read the original Nature Comms paper and I see that styrene and ethylene are already used in published work, and some quick
git grep
suggests that both are available for GROMOS at least (we don't really care about forcefield, we just want the coords, but I think they are somewhat linked for polyply).So, initial assessment might be that some work is needed for:
Does that sound correct? Does the example PR your wiki cites (#227) cover the full spectrum of changes/additions I'd need to make for this to be possible? Or is there more that I should know about here? Laying out a set of steps could be helpful perhaps. It is probably better that I do it myself since we'll need to improve on this capability over time.
The text was updated successfully, but these errors were encountered: