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

Support: Using pre-parameterized topologies in polyply #393

Open
hannaomi opened this issue Nov 6, 2024 · 5 comments
Open

Support: Using pre-parameterized topologies in polyply #393

hannaomi opened this issue Nov 6, 2024 · 5 comments

Comments

@hannaomi
Copy link

hannaomi commented Nov 6, 2024

Describe the bug
Is it possible to apply the self-exclusion random walk method to polymers not built using polyply. I have a GROMACS .top input from OpenFF-interchange (attached), with associated parameters that I would like to use.
polyply --version==1.7.0

Command line arguments
Provide all polyply calls and arguments needed to reproduce the issue:
(using python API)

gen_coords.gen_coords(toppath="openff-polymer.top",
                    outpath='melt.gro',
                     name = 'melt',
                     density=1000)

Expected behavior
Expected gen_coords to read GROMACS topology file and parameters from an alternative source. Are extra files needed to describe?

Additional Files
openff-polymer.top.zip

@fgrunewald
Copy link
Member

Hi @hannaomi,

Yes in principle that is possible. The only issue I see here is that your molecule is defined as a single residue. That would mean polyply only places one gigantic bead, which of course you don't want. So the best course of action would be to assign resids for the individual residues/monomers in your polymer. There is an internal function that allows you to do this, but it is quite slow. It would be better to do this when generating the topology file.

@ricalessandri has some experience with openFF and might have an idea of how to do this automatically.

@ricalessandri
Copy link
Collaborator

@hannaomi as Fabian said, that is possible. For example, I just tried out your top file and this works (i.e., it generates a test.gro):

polyply gen_coords -p openff-polymer.top -name test -box 10 10 10 -o test.gro

It'll generate a test.gro file with initial coordinates for 4 x MOL0 and 1x MOL1 that you have listed in the [ molecules ] section of the top file.

However, as Fabian points out, you'd want the polymers to be divided in residues - a different residue number per monomer. This really depends on how you generated the top file. Let me know if you want to discuss that.

@hannaomi
Copy link
Author

hannaomi commented Nov 7, 2024

Hi @ricalessandri @fgrunewald ,

Many thanks for getting back to me so quickly. I will let you know if I need any further guidance with the residue assignment.

Best,
Hannah

@hannaomi
Copy link
Author

Hi @ricalessandri @fgrunewald ,

I have been using polyply to optimise a new .top file with partitioned residues (attached), but seeing this error message after calling gen_coords
swiftpol_gromacs.top.zip

`!polyply gen_coords -p swiftpol_gromacs.top -name test -box 30 30 30 -o swiftpol_gromacs.gro

INFO - step - reading topology
INFO - step - processing topology
INFO - step - reading build options
INFO - step - checking residue integrity
INFO - step - generating templates
0%| | 0/1 [00:00<?, ?it/s]WARNING - general - Failed to optimize structure for block A4.
WARNING - general - Proceeding with unoptimized coordinates.
WARNING - general - Usually this is OK, but check your final structure.
WARNING - general - Failed to optimize structure for block A3.
WARNING - general - Proceeding with unoptimized coordinates.
WARNING - general - Usually this is OK, but check your final structure.
WARNING - general - Failed to optimize structure for block A7.
WARNING - general - Proceeding with unoptimized coordinates.
WARNING - general - Usually this is OK, but check your final structure.
WARNING - general - Failed to optimize structure for block A6.
WARNING - general - Proceeding with unoptimized coordinates.
WARNING - general - Usually this is OK, but check your final structure.
WARNING - general - Failed to optimize structure for block A8.
WARNING - general - Proceeding with unoptimized coordinates.
WARNING - general - Usually this is OK, but check your final structure.
WARNING - general - Failed to optimize structure for block A9.
WARNING - general - Proceeding with unoptimized coordinates.
WARNING - general - Usually this is OK, but check your final structure.
WARNING - general - Failed to optimize structure for block A1.
WARNING - general - Proceeding with unoptimized coordinates.
WARNING - general - Usually this is OK, but check your final structure.
WARNING - general - Failed to optimize structure for block A2.
WARNING - general - Proceeding with unoptimized coordinates.
WARNING - general - Usually this is OK, but check your final structure.
WARNING - general - Failed to optimize structure for block A5.
WARNING - general - Proceeding with unoptimized coordinates.
WARNING - general - Usually this is OK, but check your final structure.
100%|█████████████████████████████████████████████| 1/1 [00:10<00:00, 10.28s/it]
INFO - step - annotating ligands
INFO - step - generating system coordinates
100%|█████████████████████████████████████████████| 1/1 [00:00<00:00, 9.93it/s]
INFO - step - backmapping to target resolution
100%|█████████████████████████████████████████████| 1/1 [00:00<00:00, 75.29it/s]
INFO - step - writing output`

The polymer chain also sits at the very edge of the box.
Is there a way I can optimise my input files/command to improve the chances of polyply to find an optimal coordinates?
This example is with a single chain but I aim to scale up to many chains to fill the box.

Many thanks for your continued support!

Hannah

@ricalessandri
Copy link
Collaborator

ricalessandri commented Nov 14, 2024

@hannaomi If a subsequent energy-minimization and MD simulation run fine, then this warning may just be disregarded. I would then check if that holds for the multi-chain simulation, too.

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

No branches or pull requests

3 participants