Coder Social home page Coder Social logo

donaldlab / osprey3 Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 15.0 419.89 MB

Open Source Protein REdesign for You v3

License: GNU General Public License v2.0

Java 78.80% Shell 0.13% C 2.33% Cuda 0.91% Kotlin 11.68% Python 1.83% CMake 0.07% C++ 2.18% Smarty 0.01% Makefile 0.01% Batchfile 1.19% Roff 0.33% GLSL 0.27% HTML 0.01% Dockerfile 0.02% Julia 0.19% Roc 0.03%

osprey3's People

Contributors

alowegard avatar axmukund avatar cuchaz avatar eternityslyre avatar grahamtholt avatar gusennan avatar henry-childs avatar hnisonoff avatar hong-niu avatar lancelot-droid avatar longyuxi avatar markhallen369 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osprey3's Issues

Pip not found when python is a subprocess

Using the exec task in the build.gradle.kts script to invoke a python module seems not to be working because the exec task doesn't inherit the environment, which means that python doesn't get a default search path for modules. Hence pythonDevelop and pythonUndevelop don't work right now.

Jpype problems

I am having a JPype-related error a Mac running OS X 10.12. I installed JPype using the wheel python/wheelhouse/JPype_py2-0.5.8-cp27-cp27m-macosx_10_12_x86_64.whl. I then set the JVM path manually in jvm.py because getDefaultJVMPath() points to an old version of Java; I was able to successfully run basic JPype commands outside of OSPREY with the new path. ./gradlew assemble ran without errors, but then when I tried to do osprey.start() I saw this:

osprey.start()
Traceback (most recent call last):
File "", line 1, in
File "/Users/mhall44/anaconda/lib/python2.7/site-packages/osprey-3.0a4-py2.7.egg/osprey/init.py", line 87, in start
raise Exception('dev classpath for python not generated yet. run ./gradlew pythonDevelop')
Exception: dev classpath for python not generated yet. run ./gradlew pythonDevelop

Running the pythonDevelop command gave this error:

mhall44s-MacBook-Pro:OSPREY_refactor mhall44$ ./gradlew pythonDevelop

Task :pythonDevelop
Ignoring indexes: https://pypi.python.org/simple/
Obtaining file:///Users/mhall44/Mark/OSPREY_refactor/python
Running setup.py (path:/Users/mhall44/Mark/OSPREY_refactor/python/setup.py) egg_info for package from file:///Users/mhall44/Mark/OSPREY_refactor/python
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)

Downloading/unpacking JPype-py2>=0.5.8 (from osprey==3.0-alpha4)
Could not find any downloads that satisfy the requirement JPype-py2>=0.5.8 (from osprey==3.0-alpha4)
Cleaning up...
No distributions at all found for JPype-py2>=0.5.8 (from osprey==3.0-alpha4)
Storing debug log for failure in /Users/mhall44/.pip/pip.log

FAILURE: Build failed with an exception.

emat.dat file

Sorry another question. How to access emat.dat file from python? it is a binary file, can we have the option to save it as human readable file? Thanks!

CATS backbone flexibility doesn't work for multiple backbone flexible areas

Florian reports:

I have again a question about CATs. It works really good, but I have tried to set two independet parts of the protein with backbone flexibility.

bbflex1protein = osprey.c.confspace.CATSStrandFlex(protein,'367','372')
bbflex2protein = osprey.c.confspace.CATSStrandFlex(protein,'407','411')
proteinConfSpace = osprey.ConfSpace([[protein, bbflex2protein,
bbflex1protein]])

It runs without an error, but just 'bbflex1protein' shows backbone flexibility.
It it possible at all to apply CATs on two independent parts within the same strand? And if yes, how can I set this up?

LUTE Example not working

Hello! I have been using OSPREY 3.2 and haven't run into issues until I tried out LUTE. I cannot even get the example to run. Have you noticed this on your end? Thanks!

> python findGMEC.LUTE.design.py
OSPREY 3.2-beta1-dev, Python 3.7.6, Java 11.0.6, Darwin-19.4.0-x86_64-i386-64bit
Using up to 1024 MiB heap memory: 128 MiB for garbage, 896 MiB for storage
read PDB file from file: 1CC8.ss.pdb
read pruning matrix from file: /Users/hunternisonoff/Box Sync/Berkeley/BioML/Covid19/moldyn/osprey_install/osprey-osx-python3-3.2-beta1/examples/python.GMEC/LUTE.pmat.dat
LUTE model read from /Users/hunternisonoff/Box Sync/Berkeley/BioML/Covid19/moldyn/osprey_install/osprey-osx-python3-3.2-beta1/examples/python.GMEC/LUTE.dat
Traceback (most recent call last):
  File "LUTEConfEnergyCalculator.java", line 49, in edu.duke.cs.osprey.lute.LUTEConfEnergyCalculator.<init>
  File "ConfEnergyCalculator.java", line 129, in edu.duke.cs.osprey.energy.ConfEnergyCalculator.<init>
  File "ConfEnergyCalculator.java", line 142, in edu.duke.cs.osprey.energy.ConfEnergyCalculator.<init>
Exception: Java Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "findGMEC.LUTE.design.py", line 19, in <module>
    gmecFinder = osprey.LUTE_GMECFinder(confSpace, model, pmat, printIntermediateConfs=True)
  File "/Users/hunternisonoff/.local/lib/python3.7/site-packages/osprey/__init__.py", line 1287, in LUTE_GMECFinder
    builder = _get_builder(c.lute.LUTEGMECFinder)(pmat, LUTE_ConfEnergyCalculator(confSpace, model))
  File "/Users/hunternisonoff/.local/lib/python3.7/site-packages/osprey/__init__.py", line 1245, in LUTE_ConfEnergyCalculator
    return c.lute.LUTEConfEnergyCalculator(confSpace, model)
osprey.NullPointerException: java.lang.NullPointerException

java.lang.NullPointerException
	at edu.duke.cs.osprey.energy.ConfEnergyCalculator.<init>(ConfEnergyCalculator.java:142)
	at edu.duke.cs.osprey.energy.ConfEnergyCalculator.<init>(ConfEnergyCalculator.java:129)
	at edu.duke.cs.osprey.lute.LUTEConfEnergyCalculator.<init>(LUTEConfEnergyCalculator.java:49)

Extraneous function defined in python BBK* example

This function is extraneous and can be removed for clarity:

https://github.com/donaldlab/OSPREY3/blob/master/examples/python.KStar/bbkstar.py#L46

Hi Nate,

in the BBK* example I don't get the use of the following function, which
is defined:

how should we define energies of conformations?

def confEcalcFactory(confSpace, ecalc):
eref = osprey.ReferenceEnergies(confSpace, ecalc)
return osprey.ConfEnergyCalculator(confSpace, ecalc, referenceEnergies=eref)

I don't see, where it is called.

Best,
Florian

Race issue in ThreadPoolTaskExecutor?

From time to time when I run a design I encounter the following bug. I've seen it in maybe 10% of my runs, and seems to occur when more CPUs are allocated (e.g. giving 48 CPUs to parallelism vs 20 CPUs seems to increase the proportion of occurences), and re-running the same design with the same parameters tends to work the second time.

WARNING: couldn't find solvation parameters for atom N2 @ B253, using default values
WARNING: couldn't find solvation parameters for atom N10 @ B253, using default values
edu.duke.cs.osprey.parallelism.TaskExecutor$TaskException: A task failed, no new tasks can be submitted
        at edu.duke.cs.osprey.parallelism.ConcurrentTaskExecutor.recordException(ConcurrentTaskExecutor.java:106)
        at edu.duke.cs.osprey.parallelism.ConcurrentTaskExecutor.taskFailure(ConcurrentTaskExecutor.java:87)
        at edu.duke.cs.osprey.parallelism.ThreadPoolTaskExecutor.lambda$submit$1(ThreadPoolTaskExecutor.java:109)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException
        at java.base/java.nio.Buffer.checkIndex(Unknown Source)
        at java.base/java.nio.DirectByteBuffer.get(Unknown Source)
        at org.mapdb.DataInput2$ByteBuffer.readUnsignedByte(DataInput2.java:313)
        at edu.duke.cs.osprey.tools.IntEncoding$1.read(IntEncoding.java:53)
        at edu.duke.cs.osprey.confspace.ConfDB$AssignmentsSerializer.deserialize(ConfDB.java:213)
        at edu.duke.cs.osprey.confspace.ConfDB$AssignmentsSerializer.deserialize(ConfDB.java:188)
        at org.mapdb.serializer.GroupSerializerObjectArray.valueArrayDeserialize(GroupSerializerObjectArray.java:26)
        at org.mapdb.serializer.GroupSerializerObjectArray.valueArrayDeserialize(GroupSerializerObjectArray.java:14)
        at org.mapdb.BTreeMapJava$NodeSerializer.deserialize(BTreeMapJava.java:183)
        at org.mapdb.BTreeMapJava$NodeSerializer.deserialize(BTreeMapJava.java:136)
        at org.mapdb.StoreDirectAbstract.deserialize(StoreDirectAbstract.kt:229)
        at org.mapdb.StoreWAL.get(StoreWAL.kt:527)
        at org.mapdb.BTreeMap.getNode(BTreeMap.kt:800)
        at org.mapdb.BTreeMap.getNonBinary(BTreeMap.kt:276)
        at org.mapdb.BTreeMap.get(BTreeMap.kt:235)
        at edu.duke.cs.osprey.confspace.ConfDB$ConfTable.getEnergied(ConfDB.java:425)
        at edu.duke.cs.osprey.energy.ConfEnergyCalculator.calcEnergy(ConfEnergyCalculator.java:481)
        at edu.duke.cs.osprey.energy.ConfEnergyCalculator.calcEnergy(ConfEnergyCalculator.java:399)
        at edu.duke.cs.osprey.kstar.pfunc.GradientDescentPfunc$EnergyTask.run(GradientDescentPfunc.java:551)
        at edu.duke.cs.osprey.kstar.pfunc.GradientDescentPfunc$EnergyTask.run(GradientDescentPfunc.java:506)
        at edu.duke.cs.osprey.parallelism.TaskExecutor.runTask(TaskExecutor.java:166)
        at edu.duke.cs.osprey.parallelism.ThreadPoolTaskExecutor.lambda$submit$1(ThreadPoolTaskExecutor.java:101)
        ... 3 more

Attached are the kstar script and additional files that were used to generate this error on slurm.

KE70-r2-7-12f-rs.zip

Tips for Getting ACE and N-Methyl Templates

I would like to include N- and C-terminal caps in my designs (acetyl group / ACE for N-terminus and N-methyl for the C-terminus). Do you have any guidance on how to generate the appropriate templates for these?
Thanks!

BBK* does not work with the sequence analyzer

It appears BBK* has a bug when the sequence analyzer is run on it. Message from Florian G:

And thank you for providing me the link to the script to write out ensembles. This works fine for me for the kstar method, but I always fail to adapt it to the bbkstar method. I just passed the configured bbkstar to the SequenceAnalyzer instead of the kstar.
'analyzer = osprey.SequenceAnalyzer(bbkstar)'
It tells me then:
'java.lang.NullPointerException
at
edu.duke.cs.osprey.kstar.SequenceAnalyzer.analyze(SequenceAnalyzer.java:172)'

no classpath.txt

cd examples/1CC8.python/
python findGMEC.py
Traceback (most recent call last):
File "findGMEC.py", line 4, in
osprey.start()
File "/home/mango/python/lib/python2.7/site-packages/osprey-3.0a1-py2.7.egg/osprey/init.py", line 70, in start
for path in open('../../build/output/classpath.txt', 'r').readlines():
IOError: [Errno 2] No such file or directory: '../../build/output/classpath.txt'

Installation script error

Dear Developers,
thank you for sharing the program.
I have downloaded the latest release (osprey-python-3.0-beta1),
followed the installation instructions (on Linux) and
have encountered the following error:

j@ac:~/software/osprey$ ./install.sh 
Skipping JPype-py2 as it is not installed.
Skipping osprey as it is not installed.
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (1.12.0)

Usage:   
  pip2 install [options] <requirement specifier> [package-index-options] ...
  pip2 install [options] -r <requirements file> [package-index-options] ...
  pip2 install [options] [-e] <vcs project url> ...
  pip2 install [options] [-e] <local project path> ...
  pip2 install [options] <archive url/path> ...

no such option: --use-wheel

Any help would be appreciated,
thanks,
Jens

GLIBC Importerror

Hi, I tried installing and importing opsrey and received the following error message:

Traceback (most recent call last):
File "", line 1, in
File "/netapp/home/castephens/.local/lib/python2.7/site-packages/osprey/init.py", line 2, in
import sys, os, jpype
File "/netapp/home/castephens/.local/lib/python2.7/site-packages/jpype/init.py", line 17, in
from _jpackage import *
File "/netapp/home/castephens/.local/lib/python2.7/site-packages/jpype/_jpackage.py", line 18, in
import _jpype
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /netapp/home/castephens/.local/lib/python2.7/site-packages/_jpype.so)

I think this means that you complied on a different version of the library? Do you have any instructions for installing this from the source?

System details:
OS: CentOS 7
python: 2.7.5
java: 1.8.0_201

thanks!

BBK* throws null pointer exception

BBK* throws a NullPointerException on prepped 5aei. It's unclear if this is caused by a bug in the implementation of the algorithm, a programming error, or something else. The stack trace of the failed run is below, and the input structure and python script are attached.

bbkstar-bug.zip

➜  florian python 5aei_kstar.py 
OSPREY 3.1-beta1-b162
Using up to 30000 MiB heap memory: 10048 MiB for garbage, 19952 MiB for storage
read PDB file from file: 5aei_final_osprey-noWater_mut-Tyr-binder.pdb
### Started: edu.duke.cs.osprey.kstar.BBKStar$ConfSpaceInfo@7853363c
Calculating reference energies for 125 residue confs...
Progress:  100.0%   ETA: 0 ns
Finished in 172.0 ms
read energy matrix from file: /usr/project/dlab/Users/nguerin/collaborations/florian/emat.protein.dat
read energy matrix from file: /usr/project/dlab/Users/nguerin/collaborations/florian/emat.protein.rigid.dat
### Started: edu.duke.cs.osprey
.kstar.BBKStar$ConfSpaceInfo@fb5d334
Calculating reference energies for 91 residue confs...
Progress:  100.0%   ETA: 0 ns
Finished in 43.2 ms
read energy matrix from file: /usr/project/dlab/Users/nguerin/collaborations/florian/emat.ligand.dat
read energy matrix from file: /usr/project/dlab/Users/nguerin/collaborations/florian/emat.ligand.rigid.dat
### Started: edu.duke.cs.osprey.kstar.BBKStar$ConfSpaceInfo@45dc7be
Calculating reference energies for 216 residue confs...
Progress:  100.0%   ETA: 0 ns
Finished in 91.6 ms
read energy matrix from file: /usr/project/dlab/Users/nguerin/collaborations/florian/emat.complex.dat
read energy matrix from file: /usr/project/dlab/Users/nguerin/collaborations/florian/emat.complex.rigid.dat
computing K* score for the wild-type sequence...
Making energy matrix for edu.duke.cs.osprey.energy.ConfEnergyCalculator@3f64d943
read energy matrix from file: /usr/project/dlab/Users/nguerin/collaborations/florian/protein.default.emat
Making energy matrix for edu.duke.cs.osprey.energy.ConfEnergyCalculator@4a0c3aa8
read energy matrix from file: /usr/project/dlab/Users/nguerin/collaborations/florian/ligand.default.emat
Making energy matrix for edu.duke.cs.osprey.energy.ConfEnergyCalculator@26a33cf
read energy matrix from file: /usr/project/dlab/Users/nguerin/collaborations/florian/complex.default.emat
Total Z upper bound reduction through minimizations: -4.114647e+09
Average Z upper bound reduction per minimizations: -5.143308e+08
Total Z upper bound reduction through minimizations: 1.098857e-01
Average Z upper bound reduction per minimizations: 7.229325e-04
Total Z upper bound reduction through minimizations: 1.539918e+49
Average Z upper bound reduction per minimizations: 1.924897e+48
sequence    0/   0   159=glu 162=val   K*(log10): 25.558831 in [25.157639,25.916724] (log10)   protein: [22.706870,22.715215] (log10)                   , numConfs: 8, epsilon: 0.019   ligand: [-0.208957, 0.183889] (log10)                   , numConfs: 152, epsilon: 0.595   complex: [48.056743,48.414637] (log10)                   , numConfs: 8, epsilon: 0.561
computing K* scores for the 3 best sequences to epsilon = 0.6 ...
Refining sequence 
Traceback (most recent call last):
  File "5aei_kstar.py", line 93, in <module>
    scoredSequences = bbkstar.run()
jpype._jexception.NullPointerExceptionPyRaisable: java.lang.NullPointerException

java.lang.NullPointerException
        at edu.duke.cs.osprey.kstar.BBKStar$MultiSequenceNode.calcUpperBound(BBKStar.java:335)
        at edu.duke.cs.osprey.kstar.BBKStar$MultiSequenceNode.estimateScore(BBKStar.java:255)
        at edu.duke.cs.osprey.kstar.BBKStar.run(BBKStar.java:641)

printGpuInfo() error

import osprey
osprey.start()

run osprey commands, e.g.

osprey.printGpuInfo()

output:

OSPREY 3.0-alpha1
Discovering CUDA GPUs... found 1
All CUDA devices:

GeForce GTX 850M
	memory:                        4045 MiB
	compute version:               5.0
	integrated or discrete:        discrete
	clock rate:                    901 MHz
	multiprocessors:               5
	threads per multiprocessor:    2048
	warp size:                     32
	max block threads:             1024
	max grid blocks:               2147483647
	registers per block (32-bit):  65536
	memory per block:              48 KiB
	constant memory:               64 KiB

	64-bit double support:         true
	dynamic parallelism support:   true

CUDA GPUs usable by Osprey:
GeForce GTX 850M
Looking for OpenCL GPUs...

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007fcf0e08d404, pid=211728, tid=0x00007fcf0e491740

JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode linux-amd64 compressed oops)

Problematic frame:

C [libpthread.so.0+0xa404] pthread_mutex_lock+0x4

Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

An error report file with more information is saved as:

/home/mango/ospreypy/examples/1CC8.python/hs_err_pid211728.log

If you would like to submit a bug report, please visit:

http://bugreport.java.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

Aborted (core dumped)

Update Python API to expose translation/rotation flexibility for strands

Just need to add an idiomatic Python wrapper function that does something like this:

ligandFlex = osprey.jvm.getInnerClass(osprey.c.confspace.StrandFlex, 'TranslateRotate')(
 5.0, # max rotation degrees
 1.2, # max translation angstroms
)
complexConfSpace = osprey.ConfSpace([protein, [ligand, ligandFlex]])

structure generation

Can this function genStructDEE be wrapped in python? or write out certain number of structures, not the top one only?

gmec = confs.peek()
gmecMol = confSpace.makeMolecule(gmec)

Thanks!

K* example script

Hi, sorry for spamming, if you'd prefer I email questions let me know.

I'm trying to run the K* example script here on the latest release (3.0 beta) and ran into this error:

>>> parallelism=osprey.Parallelism(cpuCores=2)
>>> ecalc = osprey.EnergyCalculator(complexConfSpace, ffparams, parallelism=parallelism)
>>> kstar = osprey.KStar(proteinConfSpace, ligandConfSpace, complexConfSpace, epsilon=0.99, writeSequencesToConsole=True, writeSequencesToFile='kstar.results.tsv')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: KStar() takes at least 6 arguments (6 given)
>>> kstar = osprey.KStar(
...     proteinConfSpace,
...     ligandConfSpace,
...     complexConfSpace,
...     epsilon=0.99, # you proabably want something more precise in your real designs
...     writeSequencesToConsole=True,
...     writeSequencesToFile='kstar.results.tsv'
... )
Traceback (most recent call last):
  File "<stdin>", line 7, in <module>
TypeError: KStar() takes at least 6 arguments (6 given)

Strange error message! I searched the repo and didn't find anything with this message, is it a JPype thing? I confirmed that just running the script throws this error too.

Bug in PartialStructureSwitch copy constructor when running DeePER

Please see my proposed fix in https://github.com/gokeO/OSPREY_refactor. Even after fixing the small copy constructor bug, the proper DOFs don't seem to get into the conf tree. In particular, I get the following error:

Exception in thread "main" java.lang.IllegalArgumentException: val shouldn't be NaN
at edu.duke.cs.osprey.astar.conf.scoring.mplp.MessageVars.set(MessageVars.java:126)
at edu.duke.cs.osprey.astar.conf.scoring.mplp.NodeUpdater.update(NodeUpdater.java:148)
at edu.duke.cs.osprey.astar.conf.scoring.MPLPPairwiseHScorer.calc(MPLPPairwiseHScorer.java:34)
at edu.duke.cs.osprey.astar.conf.scoring.MPLPPairwiseHScorer.calcDifferential(MPLPPairwiseHScorer.java:50)
at edu.duke.cs.osprey.astar.conf.order.StaticScoreHMeanAStarOrder.scorePos(StaticScoreHMeanAStarOrder.java:79)
at edu.duke.cs.osprey.astar.conf.order.StaticScoreHMeanAStarOrder.calcPosOrder(StaticScoreHMeanAStarOrder.java:46)
at edu.duke.cs.osprey.astar.conf.order.StaticScoreHMeanAStarOrder.getNextPos(StaticScoreHMeanAStarOrder.java:33)
at edu.duke.cs.osprey.astar.conf.ConfAStarTree.nextLeafNode(ConfAStarTree.java:126)
at edu.duke.cs.osprey.astar.conf.ConfAStarTree.nextConf(ConfAStarTree.java:65)
at edu.duke.cs.osprey.kstar.pfunc.ParallelConfPartitionFunction.calcWeightSumUpperBound(ParallelConfPartitionFunction.java:120)
at edu.duke.cs.osprey.multistatekstar.ParallelPartitionFunction.init(ParallelPartitionFunction.java:39)
at edu.duke.cs.osprey.multistatekstar.KStarScore.compute(KStarScore.java:59)
at edu.duke.cs.osprey.control.MultiStateKStarDoer.calcStateKSScore(MultiStateKStarDoer.java:229)
at edu.duke.cs.osprey.control.MultiStateKStarDoer.exhaustiveMultistateSearch(MultiStateKStarDoer.java:436)
at edu.duke.cs.osprey.control.MultiStateKStarDoer.calcBestSequences(MultiStateKStarDoer.java:384)
at edu.duke.cs.osprey.control.Main$6.run(Main.java:136)
at edu.duke.cs.osprey.control.Main.main(Main.java:62)

Error in OSPREY3/examples/python.GMEC/findGMEC.DEEPer.py

Issue in making the DEEPerStrandFlex conformational space. Running the example as is causes the error:
"File "findGMEC.DEEPer.py", line 19, in
pdb_file='1CC8.ss.pdb')
File "/home/holtcm/.local/lib/python2.7/site-packages/osprey/init.py", line 900, in DEEPerStrandFlex
bbflex = c.confspace.DEEPerStrandFlex(strand,deeper_settings)
File "/home/holtcm/.local/lib/python2.7/site-packages/jpype/_jclass.py", line 87, in _javaInit
self.javaobject = self.class.javaclass.newClassInstance(*args)
jpype._jexception.IllegalArgumentExceptionPyRaisable: java.lang.IllegalArgumentException: can't resolve path: 1CC8.ss.pdb
path is not absolute and no relative root was set

java.lang.IllegalArgumentException: can't resolve path: 1CC8.ss.pdb
path is not absolute and no relative root was set
at edu.duke.cs.osprey.tools.FileTools$ResourcePathRoot.resolve(FileTools.java:224)
at edu.duke.cs.osprey.tools.FileTools$ResourcePathRoot.open(FileTools.java:242)
at edu.duke.cs.osprey.tools.FileTools$PathRoot.read(FileTools.java:61)
at edu.duke.cs.osprey.tools.FileTools.readResource(FileTools.java:346)
at edu.duke.cs.osprey.dof.deeper.PerturbationSelector.(PerturbationSelector.java:98)
at edu.duke.cs.osprey.dof.deeper.DEEPerSettings.loadPertFile(DEEPerSettings.java:118)
at edu.duke.cs.osprey.confspace.DEEPerStrandFlex.(DEEPerStrandFlex.java:63)"

Whereas specifying the exact path for the pdb file results in the following error:
"Traceback (most recent call last):
File "findGMEC.DEEPer.py", line 19, in
pdb_file=pdb)
File "/home/holtcm/.local/lib/python2.7/site-packages/osprey/init.py", line 900, in DEEPerStrandFlex
bbflex = c.confspace.DEEPerStrandFlex(strand,deeper_settings)
File "/home/holtcm/.local/lib/python2.7/site-packages/jpype/_jclass.py", line 87, in _javaInit
self.javaobject = self.class.javaclass.newClassInstance(*args)
jpype._jexception.RuntimeExceptionPyRaisable: java.lang.RuntimeException: can't find resource on classpath: /gpfs52/home/holtcm/humira/gmec-jobs/practice/DEEPer/1CC8.ss.pdb

java.lang.RuntimeException: can't find resource on classpath: /gpfs52/home/holtcm/humira/gmec-jobs/practice/DEEPer/1CC8.ss.pdb
at edu.duke.cs.osprey.tools.FileTools$ResourcePathRoot.open(FileTools.java:247)
at edu.duke.cs.osprey.tools.FileTools$PathRoot.read(FileTools.java:61)
at edu.duke.cs.osprey.tools.FileTools.readResource(FileTools.java:346)
at edu.duke.cs.osprey.dof.deeper.PerturbationSelector.(PerturbationSelector.java:98)
at edu.duke.cs.osprey.dof.deeper.DEEPerSettings.loadPertFile(DEEPerSettings.java:118)
at edu.duke.cs.osprey.confspace.DEEPerStrandFlex.(DEEPerStrandFlex.java:63)"

The issue occurred on both Linux CENTOS 7 and MacOS Catalina 10.15 operating systems

pip2 removes --use-wheel option in 10.1

The latest version of pip2 is 18.0. Version 10.1 removes the --use-wheel option and uses wheels by default. So this flag used in install.sh causes an error. One possible check in install.sh could be:

wheel_flag="--use-wheel"
version=$(pip2 --version | cut --delimiter=' ' --fields 2 | cut --delimiter='.' --fields 1,2)
if python -c "exit($version > 10)"
then
  wheel_flag=""
fi
pip2 install --user osprey --no-index $wheel_flag --find-link=wheelhouse

Might be worth just checking if it works simply omitting it on older versions of pip2 (like 8.1) before adding in a conditional check.

no compile target

ant
Buildfile: /home/mango/design/OSPREY_refactor-master/build.xml

build:

BUILD FAILED
/home/mango/design/OSPREY_refactor-master/build.xml:28: /home/mango/design/OSPREY_refactor-master/build/classes does not exist.

Total time: 0 seconds

define the protein strand

In 1CC8.python
protein = osprey.Strand(mol, residues=[2, 73])

but what about 2 chains? For example in 4HEM

numOfStrands 2
strand0 34 463
strand1 601 722
how to define the protein strand? Thanks!

build script

Dear developer,

Is it possible you could provide instructions or a build script to compile this program or create an executable jar file (ant or mvn)? No IDE is installed on my system. Thanks!

Versioning identifier

Request from Bruce:

I think that’s good. I think the switching between Colons and dots, and the omission of .101 were what of bothered me. I would suggest naming as: Osprey-V3.2.101-linux-python2.zip

Designs with Cystines crash

When trying to determine the GMEC of the example of TEM1 beta lactamase 1Zg4 for a user, we took the following steps:

  1. Uploaded the PDB to OSPREYPrep
  2. Deleted the first HIS from the structure, which was incomplete, and then,
  3. Run the FindGMEC.py script from the examples folder, slightly modified to incorporate the additional templates, coordinates, and rotamers from OSPREYPrep's output.

The design crashed with the following stacktrace:

OSPREY 3.1-beta1-dev
Using up to 1024 MiB heap memory: 128 MiB for garbage, 896 MiB for storage
read PDB file from file: 1zg4.prepared.minimized.pdb
Traceback (most recent call last):
  File "findGMEC.py", line 31, in <module>
    ecalc = osprey.EnergyCalculator(confSpace, ffparams)
  File "/home/home2/nguerin/.local/lib/python2.7/site-packages/osprey/__init__.py", line 533, in EnergyCalculator
    return builder.build()
jpype._jexception.UnsupportedOperationExceptionPyRaisable: java.lang.UnsupportedOperationException: atom connectivity queries for cysteine bonds are not yet implemented

java.lang.UnsupportedOperationException: atom connectivity queries for cysteine bonds are not yet implemented
        at edu.duke.cs.osprey.restypes.InterResBondingTemplate$CysteineBondingTemplate.makeInterResBondForward(InterResBondingTemplate.java:220)
        at edu.duke.cs.osprey.structure.AtomConnectivity.makeInterResBond(AtomConnectivity.java:379)
        at edu.duke.cs.osprey.structure.AtomConnectivity.makeDouble(AtomConnectivity.java:358)
        at edu.duke.cs.osprey.structure.AtomConnectivity.lambda$new$2(AtomConnectivity.java:286)
        at edu.duke.cs.osprey.parallelism.TaskExecutor.submit(TaskExecutor.java:60)
        at edu.duke.cs.osprey.structure.AtomConnectivity.<init>(AtomConnectivity.java:285)
        at edu.duke.cs.osprey.structure.AtomConnectivity.<init>(AtomConnectivity.java:56)
        at edu.duke.cs.osprey.structure.AtomConnectivity$Builder.build(AtomConnectivity.java:121)
        at edu.duke.cs.osprey.energy.EnergyCalculator$Builder.build(EnergyCalculator.java:228)
        at edu.duke.cs.osprey.energy.EnergyCalculator$Builder.build(EnergyCalculator.java:82)

@eternityslyre indicated that:

If I remember correctly, you shouldn't see that error message unless somehow you've tried to make a disulfide bonded cysteine mutable or flexible.

If that's not that case, and we're not trying to design with cysteine bonds, then the error message is probably caused by a bug, and the fix should hopefully be simple.

If we really are trying to design cysteine bonds, then the fix probably isn't so simple. As far as I know, we haven't yet applied our kind of discrete and continuous sidechain flexibilty under the closed-loop constraints that a disulfide bond would impose, so it's not supported in the code yet.

This issue appears to the be the first case, as the design does not request flexible cystines.

The attached zip file can be unzipped and the FindGMEC.py design therein run directly, assuming the published version of OSPREY is present in one's PYTHONPATH.

nates-version.zip

NullPointer using MARK*

I'm getting the following error:

MARK* expanded: 116, queued: 0, scored/sec:28599, partial minimizations: 0, time:19.35 ms, delta:1.00000000000 heapMem:0.5% of 586 GiB, extMem:0 B
Found a leaf!
Traceback (most recent call last):
File "runMARKStar.py", line 88, in
scoredSeqs = bbkstar.run()
jpype._jexception.NullPointerExceptionPyRaisable: java.lang.NullPointerException

java.lang.NullPointerException
at edu.duke.cs.osprey.kstar.BBKStar$MultiSequenceNode.calcLowerBound(BBKStar.java:312)
at edu.duke.cs.osprey.kstar.BBKStar$MultiSequenceNode.estimateScore(BBKStar.java:263)
at edu.duke.cs.osprey.kstar.BBKStar.run(BBKStar.java:641)

When running BBK* with MARK*. The design I'm running it on can be found here: /usr/project/dlab/Users/anna/Projects/RAS/designs/newPep/3kuc_4dsn/markStar/group1.3

Osprey crashes when calculating GMEC of butane

Please find attached a minimalistic GMEC script to calculate the energy of butane. Please also find attached the molecule butane in pdb format.
This script does not load a proper protein-ligand complex (I can send that to you, as well, if needed). However, the error message is the same.

GMECbutane.py.txt
butane.pdb.txt

P.S.: Version numbers and error message:

OSPREY version: OSPREY 3.0-beta1 (https://github.com/donaldlab/OSPREY3/releases/download/v3.0b1/osprey-python-3.0-beta1.zip)
OS (uname -a): Linux CARNIFEX 4.4.0-125-generic #150-Ubuntu SMP Thu May 10 07:14:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu: Ubuntu 16.04.4 LTS
Python: Python 2.7.12
Error message:
andreas@CARNIFEX:~/osprey-test$ python2 GMECbutane.py 
OSPREY 3.0-beta1
read PDB file from file: butane.pdb
Calculating energy matrix with 1 entries...
Traceback (most recent call last):
  File "GMECbutane.py", line 88, in <module>
    emat = osprey.EnergyMatrix(confEcalc)
  File "/CLUSTERFS/homes/andreas/.local/lib/python2.7/site-packages/osprey/__init__.py", line 503, in EnergyMatrix
    return builder.build().calcEnergyMatrix()
jpype._jexception.NullPointerExceptionPyRaisable: java.lang.NullPointerException

java.lang.NullPointerException
at edu.duke.cs.osprey.dof.MutAlignment.<init>(MutAlignment.java:44)
at edu.duke.cs.osprey.dof.ResidueTypeDOF.switchToTemplate(ResidueTypeDOF.java:102)
at edu.duke.cs.osprey.confspace.SimpleConfSpace$ResidueConf.updateResidue(SimpleConfSpace.java:174)
at edu.duke.cs.osprey.confspace.SimpleConfSpace.makeMolecule(SimpleConfSpace.java:501)
at edu.duke.cs.osprey.energy.ConfEnergyCalculator.calcEnergy(ConfEnergyCalculator.java:133)
at edu.duke.cs.osprey.energy.ConfEnergyCalculator.calcSingleEnergy(ConfEnergyCalculator.java:104)
at edu.duke.cs.osprey.ematrix.SimplerEnergyMatrixCalculator$1Batch.lambda$submitTask$0(SimplerEnergyMatrixCalculator.java:123)
at edu.duke.cs.osprey.parallelism.TaskExecutor.submit(TaskExecutor.java:28)
at edu.duke.cs.osprey.ematrix.SimplerEnergyMatrixCalculator$1Batch.submitTask(SimplerEnergyMatrixCalculator.java:116)
at edu.duke.cs.osprey.ematrix.SimplerEnergyMatrixCalculator$1Batcher.submit(SimplerEnergyMatrixCalculator.java:170)
at edu.duke.cs.osprey.ematrix.SimplerEnergyMatrixCalculator.reallyCalcEnergyMatrix(SimplerEnergyMatrixCalculator.java:196)
at edu.duke.cs.osprey.ematrix.SimplerEnergyMatrixCalculator.calcEnergyMatrix(SimplerEnergyMatrixCalculator.java:83)

generating a custom template library

Hi,

I'm trying to the parameters of a small molecule in my pdb file to the template library. I don't understand the formatting shown in /examples/python.GMEC/templateLibrary.py. Is there any more specific documentation on how to format the custom template, as in what information is in each column?

Writting down top conformations

Hi,

I couldn't get the top conformations written down as pdb files in a K* design, 'kStarSaveTopConfsAsPDB' was checked to be turned on. It turns out to be observed only when 'kStarPFuncMethod' set to 'parallelConf'. Thanks.

Duke CS Cluster Java default version

The default java version on the CS clusters seems to have changed from 8 to 11. This is great--allows for taking advantage of nicer language features and is faster, but some of the code is java-8 dependent and needs to be updated. In particular, two areas that I've found changed are:

  1. references to specific names of the GC need to be updated. I've done this in my fork here:

https://github.com/gusennan/osprey/blob/c4d26fee0fd5724457e9af46aee75532e0890508/src/main/java/edu/duke/cs/osprey/tools/JvmMem.java

  1. Update the JavaFX stuff. This seems to work for me, but I haven't run the code:

https://github.com/gusennan/osprey/blob/master/build.gradle#L1
https://github.com/gusennan/osprey/blob/master/build.gradle#L36

CHARMM forcefields (19 and 22) can't be used

It appears that the parameter files are either misspelled in the code or missing from the config directory. I've attached a sample script that causes the following error on CHARMM19:

OSPREY 3.1-beta1-b138
Using up to 1024 MiB heap memory: 128 MiB for garbage, 896 MiB for storage
read PDB file from file: 2RL0.min.reduce.pdb
Traceback (most recent call last):
  File "kstar2.py", line 12, in <module>
    templateLib = osprey.TemplateLibrary(forcefield=osprey.Forcefield.CHARMM19)
  File "/home/home2/nguerin/.local/lib/python2.7/site-packages/osprey/__init__.py", line 362, in TemplateLibrary
    return builder.build()
jpype._jexception.ErrorPyRaisable: java.lang.Error: can't read forcefield params

java.lang.Error: can't read forcefield params
        at edu.duke.cs.osprey.energy.forcefield.ForcefieldParams.init(ForcefieldParams.java:253)
        at edu.duke.cs.osprey.energy.forcefield.ForcefieldParams.<init>(ForcefieldParams.java:243)
        at edu.duke.cs.osprey.restypes.ResidueTemplateLibrary.<init>(ResidueTemplateLibrary.java:243)
        at edu.duke.cs.osprey.restypes.ResidueTemplateLibrary$Builder.build(ResidueTemplateLibrary.java:218)
Caused by: java.lang.RuntimeException: can't find resource on classpath: /config/parmcharm19.dat
        at edu.duke.cs.osprey.tools.FileTools$ResourcePathRoot.open(FileTools.java:247)
        at edu.duke.cs.osprey.tools.FileTools$PathRoot.read(FileTools.java:61)
        at edu.duke.cs.osprey.tools.FileTools.readResource(FileTools.java:346)
        at edu.duke.cs.osprey.energy.forcefield.ForcefieldParams.readParm96(ForcefieldParams.java:291)
        at edu.duke.cs.osprey.energy.forcefield.ForcefieldParams.init(ForcefieldParams.java:250)
        ... 3 more

a similar error occurs with CHARMM22.

error-script.zip

Need smarter installation script that can handle different python 2,3 environments

Current installation scripts are dumb and blindly call either pip2 or pip3. But some platforms (specifically Windows) only have pip and don't provide versioned aliases.

Need to update the installation scripts to use the correction python/pyp invocation, even on Windows platforms. Maybe the installation scripts should themselves be written in python?

Out of Error Memory on gpu-compute7

I feel like these Nvidia GPU-equipped machines should be able to run OSPREY 3.0a4 just fine. Is this the error we should be seeing?

1 jj@gpu-compute7$ python
2 Python 2.7.12 (default, Nov 19 2016, 06:48:10)
3 [GCC 5.4.0 20160609] on linux2
4 Type "help", "copyright", "credits" or "license" for more information.
5 >>> import osprey
6 >>> osprey.start()
7 OSPREY 3.0-alpha4
8 >>> osprey.printGpuInfo()
9 Discovering CUDA GPUs... none found
10 Traceback (most recent call last):
11 File "", line 1, in
12 File "/usr/project/dlab/Users/jj/OSPREY_Python/python/osprey/init.py", line 183, in printGpuInfo
13 c.gpu.cuda.Diagnostics.main(None)
14 jpype._jexception.CudaExceptionPyRaisable: jcuda.CudaException: CUDA_ERROR_OUT_OF_MEMORY
15
16 jcuda.CudaException: CUDA_ERROR_OUT_OF_MEMORY
17 at jcuda.driver.JCudaDriver.checkResult(JCudaDriver.java:337)
18 at jcuda.driver.JCudaDriver.cuCtxCreate(JCudaDriver.java:1514)
19 at edu.duke.cs.osprey.gpu.cuda.Gpu.(Gpu.java:31)
20 at edu.duke.cs.osprey.gpu.cuda.Gpus.(Gpus.java:49)
21 at edu.duke.cs.osprey.gpu.cuda.Gpus.get(Gpus.java:22)
22 at edu.duke.cs.osprey.gpu.cuda.Diagnostics.main(Diagnostics.java:13)
23
24 >>>

osprey.printGpuInfo() Cuda error

I just installed the python version of OSPREY on my laptop (2015 era Macbook Pro). When I went to print the GPU info I received the following error:

In [2]: import osprey

In [3]: osprey.start()
OSPREY 3.0-alpha2

In [4]: osprey.printGpuInfo()
Discovering CUDA GPUs... none found
---------------------------------------------------------------------------
jcuda.CudaExceptionPyRaisable             Traceback (most recent call last)
<ipython-input-4-c610ee56c954> in <module>()
----> 1 osprey.printGpuInfo()

/Users/hunternisonoff/anaconda3/lib/python3.6/site-packages/osprey/__init__.py in printGpuInfo()
    167         Both Cuda and OpenCL APIs are queried.
    168 	'''
--> 169         c.gpu.cuda.Diagnostics.main(None)
    170         c.gpu.opencl.Diagnostics.main(None)
    171

jcuda.CudaExceptionPyRaisable: jcuda.CudaException: CUDA_ERROR_NOT_INITIALIZED

I am pretty ignorant of Cuda and GPUs at the moment. Any hints for how to debug this?

import Osprey Error

Hello Dear Guys!
when i do the instruction after installation i have the error below:
Traceback (most recent call last):
File "analyzeSequence.py", line 2, in
import osprey
ImportError: No module named osprey
What should i do with that??

Allow for non-integer dihedral values in library file?

Is it possible to allow for rotamer libraries that specify decimal dihedral angles (e.g. 64.5) instead of just ints? I'm trying to play around with using smaller voxels + more rotamers.

rotamerValues[q][w] = Integer.parseInt(StringParsing.getToken(line,(w+1)));

Error in OSPREY3/examples/python.GMEC/findGMEC.cats.py

Running the following code results in this error:

python findGMEC.cats.py
Traceback (most recent call last):
File "/Applications/osprey-osx-python2-3.2-beta1/examples/python.GMEC/findGMEC.cats.py", line 36, in
gmec = dgf.calcGMEC()
jpype._jexception.ErrorPyRaisable: java.lang.Error: can't write object

java.lang.Error: can't write object
at edu.duke.cs.osprey.tools.ObjectIO.writeObject(ObjectIO.java:180)
at edu.duke.cs.osprey.gmec.PrecomputedMatrices.loadMatrix(PrecomputedMatrices.java:256)
at edu.duke.cs.osprey.gmec.PrecomputedMatrices.loadEPICMatrix(PrecomputedMatrices.java:236)
at edu.duke.cs.osprey.gmec.PrecomputedMatrices.precompute(PrecomputedMatrices.java:165)
at edu.duke.cs.osprey.gmec.PrecomputedMatrices.(PrecomputedMatrices.java:110)
at edu.duke.cs.osprey.gmec.DEEGMECFinder.calcGMEC(DEEGMECFinder.java:142)
at edu.duke.cs.osprey.gmec.DEEGMECFinder.calcGMEC(DEEGMECFinder.java:120)
Caused by: java.io.NotSerializableException: edu.duke.cs.osprey.dof.MutAlignmentCache
at java.base/java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.base/java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.base/java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.base/java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.base/java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.base/java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.base/java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.base/java.io.ObjectOutputStream.writeObject(Unknown Source)
at edu.duke.cs.osprey.tools.ObjectIO.writeObject(ObjectIO.java:172)
... 6 more

The same error occurs in release 3.1 and occurs in both Linux CENTOS 7 and MacOS 10.15 operating systems

Perturbations fail at residue termini with addWTRots on

This is an issue I found when working with RNA, but applies to proteins as well. WIll leave a copy of Mark's correspondence here:

Sun 4/16/2017 4:08 AM

Hi Mark,

I just wanted to let you know that I think I found a bug in the DEEPer code. Whenever a perturbation involves a residue at the the terminus, it looks like the code breaks with an error like the one below:

BEGINNING ENERGY MATRIX PRECOMPUTATION

Starting intra+shell energy calculations for residue 0

java.lang.RuntimeException: ERROR: Didn't find atom H in residue ALA A 2

at edu.duke.cs.osprey.dof.deeper.ResBBState.putInState(ResBBState.java:121)
at edu.duke.cs.osprey.dof.deeper.perts.Perturbation.apply(Perturbation.java:70)
at edu.duke.cs.osprey.minimization.MoleculeModifierAndScorer.setDOF(MoleculeModifierAndScorer.java:292)
at edu.duke.cs.osprey.minimization.MoleculeModifierAndScorer.getValForDOF(MoleculeModifierAndScorer.java:307)
at edu.duke.cs.osprey.minimization.CCDMinimizer.minimizeFromCurPoint(CCDMinimizer.java:270)
at edu.duke.cs.osprey.minimization.CCDMinimizer.minimize(CCDMinimizer.java:191)
at edu.duke.cs.osprey.ematrix.TermECalculator.calcTupleEnergy(TermECalculator.java:335)
at edu.duke.cs.osprey.ematrix.TermECalculator.oneBodyCalc(TermECalculator.java:163)
at edu.duke.cs.osprey.ematrix.TermECalculator.doCalculation(TermECalculator.java:125)
at edu.duke.cs.osprey.ematrix.EnergyMatrixCalculator.calcPEMLocally(EnergyMatrixCalculator.java:132)
at edu.duke.cs.osprey.ematrix.EnergyMatrixCalculator.calcPEM(EnergyMatrixCalculator.java:111)
at edu.duke.cs.osprey.confspace.SearchProblem.calcMatrix(SearchProblem.java:310)
at edu.duke.cs.osprey.confspace.SearchProblem.loadMatrix(SearchProblem.java:283)
at edu.duke.cs.osprey.confspace.SearchProblem.loadEnergyMatrix(SearchProblem.java:256)
at edu.duke.cs.osprey.control.GMECFinder.precomputeMatrices(GMECFinder.java:612)
at edu.duke.cs.osprey.control.GMECFinder.calcGMEC(GMECFinder.java:281)
at edu.duke.cs.osprey.control.GMECFinder.calcGMEC(GMECFinder.java:258)
at edu.duke.cs.osprey.TestFindGMEC.test1CC8DEEPer(TestFindGMEC.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Process finished with exit code -1

The reason for this seems to be that the termini have to be treated specially in the same way you handle prolines, because some of the backbone atoms are different than what the code expects.

I've created a test case that reproduces this error called test1CC8DEEPer in tests\edu\duke\cs\osprey\TestFindGMEC.java, in the commit here (davidiot@da8451a). This uses the code from the current master branch of OSPREY 3.0

It was also failing back in December 2016 (davidiot@d2a576f). Same code as a commit from back then, but with my new unit test.

Please check this out if you get a chance and let me know if it is in fact a bug, or that perhaps DEEPer was not meant to do perturbations at the termini.

Also, I've finished up implementing a perturbation for RNA involving the ring, and it seems to be working! Would love to show you everything after I finish up my thesis.

Thanks for your help!

Sun 4/16/2017 4:34 PM

Hi thanks for finding this! So it looks like this is an issue with allowing addWTRot and having an N-terminal flexible residue. Basically since our dataFiles only have template coordinates for the non-N-terminal form of the amino acid, when you call ResidueTypeDOF.mutateTo to do mutations on a residue, it will change an N-terminal residue to the non-N-terminal form (NH instead of NH_3). But when addWTRot = true, it also uses ResidueTemplate.makeFromResidueConfs to create a “wild-type template” that has the three N-terminal hydrogens.
Thus mutations and RC changes will keep adding and removing two of the hydrogens attached to N. Among other problems, this leads to the DEEPer issue, because the perturbation could be created with 3 hydrogens and then applied with 1 hydrogen, making it not know how to create the perturbed backbone.

The best way I can think of to fix this would probably be to treat N-terminal residues as a different residue type than their non-N-terminal equivalents (similar to how we do D-amino acids). Not sure if this worth doing or not…if you do have a particular use case where you need this maybe we should go ahead with it.

Another option would be just do everything with a single hydrogen on the N even for N-terminal residues (like OSPREY 3 originally did, and still does if addWTRots=false). Of course this is less correct chemically.

One thing to bear in mind is that the N-terminus of a protein will be pretty floppy, so DEEPer perturbations may be a less effective description of the flexibility than they would be in regions with more defined structure.

That sounds great about the RNA perturbation! Let me know.

Thanks
Mark

Synchronization bug with ParallelConfPartitionFunction.compute(int) function

Please see multistatekstar.ParallelPartitionFunction.compute(int) in my branch https://github.com/gokeO/OSPREY_refactor for a proposed fix.

To properly exit on Status.NotEnoughConformations or Status.NotEnoughFiniteEnergies, I think you need a wait function that releases the lock. I used java's built wait() and notify() function to achieve the desired functionality. the notify() function is at the end of ecalc.calcEnergyAsync(). this required that i use a variable called numActiveThreads to count down the number of active threads.

ConfDB appears to be using unsafe code

Running the attached script on 3.2.101 produces the following exception:

➜  osprey-files cat florian-no-confdb.err 
Traceback (most recent call last):
  File "BBKStar.java", line 590, in edu.duke.cs.osprey.kstar.BBKStar.run
  File "BBKStar.java", line 179, in edu.duke.cs.osprey.kstar.BBKStar$ConfSpaceInfo.openConfDB
  File "ConfDB.java", line 746, in edu.duke.cs.osprey.confspace.ConfDB.<init>
  File "DBMaker.kt", line 477, in org.mapdb.DBMaker$Maker.make
  File "DB.kt", line 40, in org.mapdb.DB.<init>
  File "DB.kt", line 269, in org.mapdb.DB.<init>
  File "StoreWAL.kt", line 595, in org.mapdb.StoreWAL.commit
  File "WriteAheadLog.java", line 911, in org.mapdb.WriteAheadLog.walPutByteArray
  File "WriteAheadLog.java", line 1009, in org.mapdb.WriteAheadLog.ensureFileReady
  File "WriteAheadLog.java", line 135, in org.mapdb.WriteAheadLog.startNextFile
  File "ByteBufferVol.java", line 53, in org.mapdb.volume.ByteBufferVol.putLong
  File "java.nio.DirectByteBuffer.java", line -1, in java.nio.DirectByteBuffer.putLong
  File "java.nio.DirectByteBuffer.java", line -1, in java.nio.DirectByteBuffer.putLong
  File "jdk.internal.misc.Unsafe.java", line -1, in jdk.internal.misc.Unsafe.putLongUnaligned
  File "jdk.internal.misc.Unsafe.java", line -1, in jdk.internal.misc.Unsafe.putLongUnaligned
  File "jdk.internal.misc.Unsafe.java", line -2, in jdk.internal.misc.Unsafe.putLong
Exception: Java Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "bbkstar.py", line 153, in <module>
    scoredSequences = bbkstar.run(minimizingEcalc.tasks)
__main__.InternalError: java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code



The job can be submitted to slurm using 

`sbatch run-test.sh`

osprey-files.zip

May 6th build causes error in SimplerEnergyMatrixCalculator

The examples/python.KStar/bkkstar.py script no longer works after the latest bug fixes. Here's the error message.

OSPREY 3.2-beta1-b194, Python 2.7.18, Java 11.0.2, Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-centos-7.6.1810-Core
Using up to 1024 MiB heap memory: 128 MiB for garbage, 896 MiB for storage
read PDB file from file: 2RL0.min.reduce.pdb
Calculating reference energies for 0 residue confs...
Traceback (most recent call last):
File "bbkstar.py", line 69, in
ematMinimized = osprey.EnergyMatrix(info.confEcalcMinimized, cacheFile='emat.%s.dat' % info.id)
File "/gpfs52/home/holtcm/conda/osprey32/lib/python2.7/site-packages/osprey/init.py", line 684, in EnergyMatrix
return builder.build().calcEnergyMatrix()
jpype._jexception.IndexOutOfBoundsExceptionPyRaisable: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
at java.base/java.util.Objects.checkIndex(Unknown Source)
at java.base/java.util.ArrayList.get(Unknown Source)
at edu.duke.cs.osprey.ematrix.SimpleReferenceEnergies.getOffset(SimpleReferenceEnergies.java:95)
at edu.duke.cs.osprey.energy.EnergyPartition$1.makeSingle(EnergyPartition.java:51)
at edu.duke.cs.osprey.energy.ConfEnergyCalculator.makeSingleInters(ConfEnergyCalculator.java:212)
at edu.duke.cs.osprey.ematrix.SimplerEnergyMatrixCalculator.reallyCalcEnergyMatrix(SimplerEnergyMatrixCalculator.java:175)
at edu.duke.cs.osprey.ematrix.SimplerEnergyMatrixCalculator.lambda$calcEnergyMatrix$1(SimplerEnergyMatrixCalculator.java:157)
at edu.duke.cs.osprey.tools.ObjectIO.readOrMake(ObjectIO.java:243)
at edu.duke.cs.osprey.ematrix.SimplerEnergyMatrixCalculator.calcEnergyMatrix(SimplerEnergyMatrixCalculator.java:152)

Script: bbkstar.txt

Support Python IDLE environment?

Python IDLE is an IDE for Python.

But apparently the IDLE environment changes the way stdout and stdin work, breaking our Java/Python integration. See: https://stackoverflow.com/questions/31080829/python-error-io-unsupportedoperation-fileno

I don't know how hard it would be to support the IDLE environment, or if it's important enough to spend the effort, but this issue can serve as a reminder to us to think about it.

There's at least one issue that reported this error.

Bitness mismatch on Windows causes cryptic error message

OSError: [WinError 193] JVM DLL not found: C:\Users\axue8\AppData\Roaming\Python\Python38\site-packages\osprey\jre\bin\server\jvm.dll

Happens when user with 32-bit Python tries to run Osprey in 64-bit JVM.

Need to trap the exception and show a friendlier error to the user. ie, as the user to install 64-bit Python instead.

`pythonDevelop` build task sometimes fails on Python 2

> Task :pythonDevelop FAILED
Obtaining file://somepath/
Collecting JPype-py2>=0.5.8 (from osprey==3.2b1)
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 795, in get_page
    resp.raise_for_status()
  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/jpype-py2/

jpype-py2 is not in the package index. The pythonDevelop task/pip invocation should look for it in the given wheelhouse, but it dies trying to check the package index first.

The --no-index flag seems to work around the problem, but has other downsides. Need a better fix.

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.