Giter VIP home page Giter VIP logo

Comments (10)

chryswoods avatar chryswoods commented on May 28, 2024

I've just taken a look and I think the issue is that you are not loading in a gromacs topology file with the coordinates file. I am guessing this because the result of fileFormat on your loaded system is just Gro87, while for a system constructed from a valid topology+coordinate file it is GroTop,Gro87.

Below I've copied a script that will run minimisation and then equilibration using gromacs for the gromacs input files demo/gromacs/kigaki/kigaki.gro and kigaki.top;

import BioSimSpace as BSS

# load from a valid gromacs topology (kigaki.top) and gro87 file (kigaki.gro)
s = BSS.IO.readMolecules("demo/gromacs/kigaki/kigaki.gro", "demo/gromacs/kigaki/kigaki.top") 

# print the fileformat - this should be "GroTop,Gro87"
print(s.fileFormat())

# run minimisation
process_min = BSS.MD.run(s, BSS.Protocol.Minimisation())

# get the output 
s_min = process_min.getSystem()

# write the minimised system to disk - files written to "minim.grotop" and "minim.gro87"
BSS.IO.saveMolecules(filebase="minim", system=s_min, fileformat=s_min.fileFormat())

# run equilibration
process_eq = BSS.MD.run(s, BSS.Protocol.Equilibration())

# get the output
s_eq = process_eq.getSystem()

# write the equilibrated system to disk - files written to "equil.grotop" and "equil.gro87"
BSS.IO.saveMolecules(filebase="equil", system=s_equil, fileformat=s_min.fileFormat())

Note you can get more output from the equilibration and minimisation process objects (process_min and process_equil) by using the functions as documented here https://michellab.github.io/BioSimSpaceWebsite/api/generated/BioSimSpace.Process.Gromacs.html#BioSimSpace.Process.Gromacs

If you don't have a gromacs topology file then BioSimSpace can help create one for you. See the demo notebook demo/interactive_setup.ipynb either in https://notebook.biosimspace.org/hub/tmplogin or by running Jupyter from your installation and going to demo/interactive_setup.ipynb. There is also a simple python script (demo/molecular_setup.py if you prefer not to use jupyter).

from biosimspace.

davachido avatar davachido commented on May 28, 2024

Thanks for making this thread for me.

I have attempted to follow the script, the first line flags an error immediately where the topoology is not a dictionary, I assume it is attempting to load my topology file as a property map. I loaded the top as a list with the file and that seems to have hit the next step. However I get this error now:

NOT HARMONIC! 2 "Gromacsbond (functionType() = G96 bond, parameters() = [0.133, 1.18e+07] )

I've tried various different topol files from different proteins and the error is identical across all of them. I will attempt to start a fresh run from a literature protein on rcsb to see if I can complete a basic run but it would be good to continue with our models if possible.

from biosimspace.

chryswoods avatar chryswoods commented on May 28, 2024

Sorry - typo in my script. It should read;

# load from a valid gromacs topology (kigaki.top) and gro87 file (kigaki.gro)
s = BSS.IO.readMolecules(("demo/gromacs/kigaki/kigaki.gro", "demo/gromacs/kigaki/kigaki.top"))

(the first argument is a tuple of input files)

from biosimspace.

chryswoods avatar chryswoods commented on May 28, 2024

The "NOT HARMONIC!" output is a debug string printed from line 710 of this file - https://github.com/michellab/Sire/blob/devel/corelib/src/libs/SireMM/gromacsparams.cpp. This is just printing out that the particular bond you have is not a harmonic style bond, and so cannot be parsed by programs that expect harmonic bonds (e.g. Amber, Namd). Instead this is a gromos96 bond of style gromos 96 bond : 0.25 k (r^2 - r0^2)^2.

Are you using the gromos forcefield for your proteins? We've concentrated mostly on the Amber (or Amber-style) forcefields, so things likely won't work well with Gromos. Let us know what forcefield you are using and we can accelerate adding support for it.

Also, the debug output is not an error. It is just printed when "isHarmonic" called, and the bond is not harmonic. Is there anything else printed that signifies an error? Do you see the minimised files output?

from biosimspace.

davachido avatar davachido commented on May 28, 2024

Yes I use GROMOS and OPLS forcefields primarily. I can give it a spin with amber forcefields to see if it alleviates the issue.

from biosimspace.

chryswoods avatar chryswoods commented on May 28, 2024

Thanks - let me know how it goes :-)

Also, what is the actual error? The debug string doesnโ€™t signify an error, just a possible cause if an error was going to occur. Does the script crash or raise an exception? Does gromacs not run? Let us know and we can help. Also, do you have any top/gro files that cause the issue that you are willing to share? It would be great if you do as we can then add them to the unit testing repository and debug then fix the problem (and know the problem would never regress)

Also, just for info the website is now up at https://biosimspace.org, from which you can download easy-install binaries for Mac and Linux. These binaries are auto-generated as we develop the code and are only produced when all of the unit tests pass.

from biosimspace.

davachido avatar davachido commented on May 28, 2024

The full error I get when I run GROMOS/OPLS is below.

`NOT HARMONIC! 2 "Gromacsbond( functionType() = G96 bond, parameters() = [ 0.133, 1.18e+07 ] )" 
NOT HARMONIC! 2 "Gromacsbond( functionType() = G96 bond, parameters() = [ 0.133, 1.18e+07 ] )" 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/davachido/biosimspace.app/lib/python3.6/site-packages/BioSimSpace-2018.1.1+692.g23d7ed5-py3.6.egg/BioSimSpace/IO/_io.py", line 233, in readMolecules
OSError: Failed to read molecules from: ['npt.gro', 'topol.top']`

The amber forcefields appear to have worked and did a minimisation without water. I will be attempting a few other simulations as for some reason it snags with this error when I make a protein in a water box with tip3p in gmx solvate:

`  File "/home/davachido/biosimspace.app/lib/python3.6/site-packages/BioSimSpace-2018.1.1+692.g23d7ed5-py3.6.egg/BioSimSpace/MD/_md.py", line 177, in run
  File "/home/davachido/biosimspace.app/lib/python3.6/site-packages/BioSimSpace-2018.1.1+692.g23d7ed5-py3.6.egg/BioSimSpace/Process/_gromacs.py", line 125, in __init__
  File "/home/davachido/biosimspace.app/lib/python3.6/site-packages/BioSimSpace-2018.1.1+692.g23d7ed5-py3.6.egg/BioSimSpace/Process/_gromacs.py", line 160, in _setup
  File "/home/davachido/biosimspace.app/lib/python3.6/site-packages/BioSimSpace-2018.1.1+692.g23d7ed5-py3.6.egg/BioSimSpace/Process/_gromacs.py", line 517, in _generate_config
  File "/home/davachido/biosimspace.app/lib/python3.6/site-packages/BioSimSpace-2018.1.1+692.g23d7ed5-py3.6.egg/BioSimSpace/Process/_gromacs.py", line 585, in setConfig
  File "/home/davachido/biosimspace.app/lib/python3.6/site-packages/BioSimSpace-2018.1.1+692.g23d7ed5-py3.6.egg/BioSimSpace/Process/_gromacs.py", line 544, in _generate_binary_run_file
RuntimeError: Unable to generate GROMACS binary run input file.`

The same script that was run works fine without water. I think I probably just need to get used to what each step is looking for precisely. Is there anyway to display what error the scripts are hitting exactly? I've just been locating the lines and trying to work backwards so far.
`

from biosimspace.

chryswoods avatar chryswoods commented on May 28, 2024

Interesting - I would have expected the GROMACS/OPLS forcefield molecules to load without problem, and for it to have crashed later when it tried to work with those files. I am very interested to debug this. If there is any way to share the file (or a file on a neutral protein that fails) then that would be really helpful :-)

For the job errors, the Process objects which run the MD programs provide means to show you the actual underlying files that are used. The Gromacs process has getOutput, which returns a zipfile of the simulation directory so that you can debug directly (https://biosimspace.org/api/generated/BioSimSpace.Process.Gromacs.html#BioSimSpace.Process.Gromacs.getOutput).

So use getOutput on the returned process object from MD.run() and tell it which file to write to. Then unzip the contents to see what is wrong. As the error says, it is an issue running grommp (run via the code here https://github.com/michellab/BioSimSpace/blob/devel/python/BioSimSpace/Process/_gromacs.py#L530), so looking at the grommp output will be the best route to debug.

from biosimspace.

lohedges avatar lohedges commented on May 28, 2024

Hi @davachido, is there any progress on this? We'd be happy to debug if you share the problem GROMACS files.

from biosimspace.

lohedges avatar lohedges commented on May 28, 2024

Closing as no progress and no response from original author.

from biosimspace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.