-
Notifications
You must be signed in to change notification settings - Fork 19
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
Specify ions during system setup #369
Comments
Currently BioSimSpace.Solvent.solvate will solvate water box with monoatomic (Na+ , Cl-) ions using parameter sets consistent with the water model chosen during parameterisation. See https://biosimspace.org/api/index_Solvent.html |
Thanks for your reply. Yeah, sometimes I would need to use Mg2+... But it's okay if it is not possible to have this feature. One can always prepare the system "manually" and use BSS starting from coordinate and parameter files. About the structural ions, I have tried to prepare a system containing a structural calcium ion but I would always get an error. I will try to reproduce the error and post it in a separate issue. |
Hi there, as @jmichel80 says we currently use monatomic ions for solvation and allow the user to specify consistent ion parameters when parameterising in the presence of structural ions. Please let us know the issue you are seeing with a structural calcium. I'd be happy to debug. |
Hi @lohedges, Hi @jmichel80 I was able to reproduce the error with the calcium ion. See the figure below. I am also attaching here the test pdb file so that you are able to reproduce the error. Instead, if I use tleap directly with the following configuration file, I get no error and the calcium ion is correctly parametrized.
I thought there was a problem when loading the water model, so I tried loading the water manually with leap_commands but I also got an error PS. In the current amber parameter functions, are PBRadii adjusted for the different Amber force fields, e.g. |
Hi there, It appears that it works if you use the original PDB file, but not the one written by BioSimSpace (using its internal PDB parser) during the parameterisation. Looking at the files, the difference is in the TER record for ATOM 1731 before the Ca ion. Although this is being parsed correctly on read, it isn't preserved properly on write, leading to the error by import BioSimSpace as BSS
# Load the molecule.
m = BSS.IO.readMolecules("1oxr_prot_prep3.pdb")[0]
# Create a parameterisation process.
p = BSS.Parameters.ff14SB(m, water_model="tip3p", work_dir="tmp")
# Try to get the parameterised moelcule.
par_m = p.getMolecule()
...
ParameterisationError: Parameterisation failed! Last error: 'tLEaP failed!' Now, if you move the the
I'll try to figure out why the TER record isn't being preserved and will post an update. (I haven't seen this before and have dealt with multi-chain PDBs previously without issue.)
No, currently not, so assume that the default is used in all cases. Let me know what the preferable behaviour is and I can update accordingly. I'm not sure if this would need to be coupled appropriately to AMBER config parameters at runtime, although this is tricky to do in general if the AMBER files were generated elsewhere. Cheers. |
Okay, I've figured it out. The issue is because the calcium ion has the same chain identifier, despite coming after the TER record in the PDB. When the PDB is parsed into an internal Sire molecule we rely on the chain identifiers to determine which atoms are part of a chain, and which atom is the terminal atom. In this case, since the CA atom (number 1732) is the last atom with chain identifier A, then it is assumed to be the terminal atom in the chain and the TER is placed after it. Simply deleting the A identifier for the CA makes things work correctly. I imagine that this is a common issue, and also assume that ions of this type will likely be labeled as HETATM rather than ATOM. I'll try to figure out what is standard so that we can come up with a workaround. (If I recall, HETATM are usually placed at the end, rather than the "position" at which they occur in the residue. I've previously had issues where the numbering is messed up by the presence of HETATM records, i.e. it is non sequential.) |
I've made a few tweaks to preserve HETATM records and make sure that the TER entry has the correct number. (This doesn't solve this issue, but was an error that I spotted.) Looking at the PDB standard for TER records here, it sounds (to my reading) like the TER record should come after the chain (any ATOM/HETATM block in a chain), so should be after the final HETATM, as we write. Given the level of abuse to the PDB format, I would not be at all surprised if this was seldom upheld. I guess the important thing is what LEaP expects. I'll take a look at some files from the PDB to see how variable the formatting is. |
Hi @lohedges, sorry for taking so long to reply. |
About the PBRadii parameter, it was more of a curiosity. This is only relevant when a Generalized Born model is used (igb != 0 in amber). I think that expert users will manually set this up anyway and they should be able to do it with |
Thanks for the comments. With regards to the TER / HETATM, I've looked at some of our example files and a few from the PDB and annoyingly the formatting is fairly inconsistent. I'll try to follow the guideline that you suggest, i.e. placing HETATM records after the TER. At present we take a Sire molecular structure and insert TERs after the last atom in a chain. I'll just need to update the logic to walk backwards up the chain whenever the last atom is a HETATM record. Cheers. |
I've looked more at how I guess the important thing is what |
For example, in this there a
|
For what it's worth, changing the chain identifier of the
to
gives an indentical topology file output from I'll have a think about how best to proceed. I imagine a lot of other PDB parsers simply read/write the data as is. In our case, we are parsing into an internal molecular representation, where atoms are added to residues, which are reparented to chains, which are reparented to molecules. On write, we are reconverting this structure back to PDB records, so the chain identifiers are essential, and the |
Thanks @lohedges for looking into this. You are right, unfortunately there is not a unique way to write PDB files. Anyway, is there a way to disactivate BSS PDB preprocessing? |
Hi @cespos, I have been working on some improvements to our PDB parser, particularly in terms of the handling of
This is something that has come up in discussion, i.e. should we just assume a valid PDB file as input and pass this directly to the parameterisation engine, e.g. With regards to your specific issue, I think my most recent edits might solve this. Once I've finished my own testing, I'd be happy to try it using your file if you are able to share. Cheers. |
Is your feature request related to a problem? Please describe.
Hi! I could not find the option to specify the ions to use during system preparation, what in tleap would be addIons2 or pname/nname for gmx genion... Is there already a feature or would it be possible to add it?
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: