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

[BUG] Water molecule coordinates are setting to (0,0,0) (reposting) #148

Closed
ale94mleon opened this issue Aug 2, 2023 · 4 comments · Fixed by #149 or #154
Closed

[BUG] Water molecule coordinates are setting to (0,0,0) (reposting) #148

ale94mleon opened this issue Aug 2, 2023 · 4 comments · Fixed by #149 or #154
Labels
bug Something isn't working

Comments

@ale94mleon
Copy link

ale94mleon commented Aug 2, 2023

I am re-posting issue 427 here for future discussion as @lohedges requested.

@ale94mleon ale94mleon added the bug Something isn't working label Aug 2, 2023
@lohedges
Copy link
Contributor

lohedges commented Aug 2, 2023

Thanks for reposting.

The change in name is not in the gro file but in the topology

Ah, yes, I hadn't checked. It looks like I have forgotten to swap the water topology naming in the gro file within BioSImSpace.IO.saveMolecule. Currently it is only done in the top. I'll fix this and also add in an option to preserve the naming if desired. As mentioned in the other thread, we need to change the naming in order to run things with particular engines, or to be able to solvate in the presence of existing waters, but we do want to allow the user to keep the naming if they are just writing a file.

@lohedges
Copy link
Contributor

lohedges commented Aug 2, 2023

Okay, I've made some updates to allow the user to disable the water topology matching if desired, which it what we want if they are just writing to file.

Looking at the GRO format specification here it is indeed fixed-width. This is why the coordinates were not being parsed correctly. It's hard to add error handling here, since the information is in the file, just in the wrong place.

@lohedges lohedges mentioned this issue Aug 2, 2023
@ale94mleon
Copy link
Author

ale94mleon commented Aug 2, 2023

I have another question respect to the preservation of the names after solvate. I know that the water molecules must be continue. If that is the case. Could not be added the same kind of parameters (match_water) also to the solvate functions? You already have some functionality that detect what is a water molecule. The only thing that it must be done is sort the component of the system and put those crystal water at the end; or am I missing something?

@lohedges
Copy link
Contributor

lohedges commented Aug 2, 2023

Yes, this should be possible, but might be a bit tricky. Crystal waters are hard to deal with in general since they aren't always present as separate molecules (see, e.g. #141) and sometimes only appear as oxygen atoms. In order to create a solvent box correctly and for genion to see the waters then we do need to convert the formatting to match what GROMACS expects, otherwise we'd need to somehow deal with multiple solvent groups. It should be possible to convert back and the end though, if desired. However, some of the GROMACS functionality for water constraints requires consistent naming to the solvent group. I guess we can just add an option to let the user decide if the naming is changed, after which they can deal with any issues that result from multiple solvent groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants