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

installation not clear? #56

Open
ghost opened this issue Jun 27, 2022 · 12 comments
Open

installation not clear? #56

ghost opened this issue Jun 27, 2022 · 12 comments
Labels

Comments

@ghost
Copy link

ghost commented Jun 27, 2022

Just came across P2Rank and interested to run it on a zipped folder containing protein conformations from a trajectory.
I have pymol installed on the linux cluster and I did this:
#git clone https://github.com/rdk/p2rank.git

I see a p2rank folder created.
What is the next step? Do I have to do a make install or how to run it on a test.pdb file?

Thanks

@rdk
Copy link
Owner

rdk commented Jul 3, 2022

There are 2 ways how to install P2Rank: downloading a pre-built .tar.gz distribution from https://github.com/rdk/p2rank/releases (easier) or cloning a git repo and building from sources (better if you want to use the latest updates or train new models).

You have started with cloning a repo... so please try to follow steps here: https://github.com/rdk/p2rank#build-from-sources
Basically, the only necessary step is to run ./make.sh and then you can run prediction either with ./prank.sh predict test.pdb or ./distro/prank predict test.pdb. Note that you need to have Java installed on the machine (JRE, version >= 8).

Let me know it it works.

@iitb33
Copy link

iitb33 commented Oct 2, 2022

There are 2 ways how to install P2Rank: downloading a pre-built .tar.gz distribution from https://github.com/rdk/p2rank/releases (easier) or cloning a git repo and building from sources (better if you want to use the latest updates or train new models).

You have started with cloning a repo... so please try to follow steps here: https://github.com/rdk/p2rank#build-from-sources Basically, the only necessary step is to run ./make.sh and then you can run prediction either with ./prank.sh predict test.pdb or ./distro/prank predict test.pdb. Note that you need to have Java installed on the machine (JRE, version >= 8).

Let me know it it works.

Hi
After installing p2rank I ran it from the installation directory but I got these errors

command used
./prank.sh predict -f /home/loki/Desktop/p2rank/distro/test_data/1fbl.pdb

Errors

./prank.sh: line 9: local-env.sh: No such file or directory
Error: Could not find or load main class cz.siret.prank.program.Main
Caused by: java.lang.ClassNotFoundException: cz.siret.prank.program.Main

Could you help me resolve these errors?
Thanks

@rdk
Copy link
Owner

rdk commented Oct 12, 2022

Hi

after you build P2Rank from sources go to /distro directory and use ./prank script to run P2Rank. This is a prefered version for preope who use P2Rank to make binding site predictions. Directory /distro is equivalent to installation directory that you get when you download P2Rank as .tar.gz package.

Alternatively, you can run P2Rank with ./prank.sh script in the repo root directory, but first you need to copy and edit misc/locval-env.sh into repo root directory (see https://github.com/rdk/p2rank/blob/develop/misc/tutorials/training-tutorial.md#preparing-the-environment). This is an advenced version for people who tran new models or work on P2Rank development.

@rdk rdk added the question label Oct 12, 2022
@iitb33
Copy link

iitb33 commented Nov 6, 2022

Hi, I got this error after ./make.sh

Downloading https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
...........10%............20%...........30%............40%...........50%............60%...........70%............80%...........90%............100%

Welcome to Gradle 7.5.1!

Here are the highlights of this release:
 - Support for Java 18
 - Support for building with Groovy 4
 - Much more responsive continuous builds
 - Improved diagnostics for dependency resolution

For more details see https://docs.gradle.org/7.5.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'p2rank'.
> Could not load compiled classes for build file '/home/loki/Desktop/tcs/downloads/p2rank/build.gradle' from cache.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 21s

@rdk
Copy link
Owner

rdk commented Nov 6, 2022

Hi @iitb33,
what operating system and Java Virtual Machine are you using? Could you paste here an output of running java -version on your machine?

@iitb33
Copy link

iitb33 commented Nov 6, 2022

operating system - Ubuntu 20.04.5 LTS

java -version output

openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)

@rdk
Copy link
Owner

rdk commented Nov 6, 2022

Could you try to

  1. Paste here the output of command echo $JAVA_HOME
  2. pull the latest changes on brench develop (there was one dependency that became unavailable and I had to change it)
  3. build it by running ./gradlew -i clean assemble
    ...and attach the console output in case it fails?

@iitb33
Copy link

iitb33 commented Nov 7, 2022

Hi @rdk

  1. output of command echo $JAVA_HOME

/usr/lib/jvm/java-11-openjdk-amd64/bin/java

  1. I don't understand the second point. Can you elaborate?
  2. Output of ./gradlew -i clean assemble
ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-11-openjdk-amd64/bin/java

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

@rdk
Copy link
Owner

rdk commented Nov 7, 2022

You need to set up your
JAVA_HOME environment variable correctly. I guess the correct location in your case is /usr/lib/jvm/java-11-openjdk-amd64/.

You can try it by running the following:

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/

and then rebuilding again.

@iitb33
Copy link

iitb33 commented Nov 7, 2022

I did that and build it again but got the same error. one thing to note that I am not the root user of the system.

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'p2rank'.
> Could not load compiled classes for build file '/home/loki/Desktop/tcs/p2rank/build.gradle' from cache.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 38s

@rdk
Copy link
Owner

rdk commented Nov 7, 2022

The fact that you are not root shouldn't be a problem. I just tried o build it as non-root on the same version of ubuntu and java and it worked.

Did you agin get exactly the same error "ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-11-openjdk-amd64/bin/java"?
If not could you repeat the 3 steps from my earlier comment exactly and attach the exact error message here?

By the way if you don't need the latest development version you can just download the latest release package that is already compiled. However, even for running P2Rank you need to have Java environment configured correctly.

@iitb33
Copy link

iitb33 commented Nov 7, 2022

I am doing this with sudo -s command

  1. output of command echo $JAVA_HOME
    /usr/lib/jvm/java-11-openjdk-amd64/bin/java

  2. I don't understand the second point. Can you elaborate?

  3. Output of ./gradlew -i clean assemble

Initialized native services in: /root/.gradle/native
Initialized jansi services in: /root/.gradle/native
Removing 0 daemon stop events from registry
Starting a Gradle Daemon (subsequent builds will be faster)
Starting process 'Gradle build daemon'. Working directory: /root/.gradle/daemon/7.5.1 Command: /usr/lib/jvm/java-11-openjdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=IN -Duser.language=en -Duser.variant -cp /root/.gradle/wrapper/dists/gradle-7.5.1-bin/7jzzequgds1hbszbhq3npc5ng/gradle-7.5.1/lib/gradle-launcher-7.5.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.5.1
Successfully started process 'Gradle build daemon'
An attempt to start the daemon took 4.601 secs.
The client will now receive all logging from the daemon (pid: 591575). The daemon log file: /root/.gradle/daemon/7.5.1/daemon-591575.out.log
Starting build in new daemon [memory: 512 MiB]
Using 8 worker leases.
Watching the file system is configured to be enabled if available
Now considering [/home/loki/Desktop/tcs/p2rank] as hierarchies to watch
File system watching is active
Starting Build
Settings evaluated using settings file '/home/loki/Desktop/tcs/p2rank/settings.gradle'.
Projects loaded. Root project using build file '/home/loki/Desktop/tcs/p2rank/build.gradle'.
Included projects: [root project 'p2rank']

> Configure project :
Evaluating root project 'p2rank' using build file '/home/loki/Desktop/tcs/p2rank/build.gradle'.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'p2rank'.
> Could not load compiled classes for build file '/home/loki/Desktop/tcs/p2rank/build.gradle' from cache.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s

Additionally I downloaded and extracted p2rank_2.4.tar.gz and ran the command prank predict -f /home/loki/Desktop/1hkg.pdb from the extracted folder.

I go this error message

Command 'prank' not found, but can be installed with:

sudo apt install prank

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

No branches or pull requests

2 participants