i2bc / SURFMAP

Other
20 stars 3 forks source link

apbs error #6

Closed Dan-Burns closed 1 year ago

Dan-Burns commented 1 year ago

Hello,

I have the apbs binaries in my path. When I do: surfmap -pdb xyz.pdb -tomap electrostatics

I get: TypeError: expected str, bytes or os.PathLike object, not NoneType

with PATH_APBS = Path(os.getenv("APBS")) in the traceback.

I do: export APBS='path/to/apbs/bin'

the issue the same surfmap command and get:

SURFACE MAPPING OF THE ELECTROSTATICS PROPERTY
Step 1: computing a shell around the protein surface
Step 2: computing electrostatics potential
Error occured during the inputgen command, the process will stop. Status: 2

I don't know where to go from here to get the electrostatics calculation working.

The other calculations work (stickiness, circular_variance). This is a really cool package - I really want to get the electrostatics to work!

Thank you, Dan

nchenche commented 1 year ago

Hello Dan,

Thanks for using SURFMAP. Unfortunately, the error you are facing is related to the installation of APBS, not SURFMAP per se.

We provide a docker image, in particular to facilitate the installation of APBS. All you have to do is to install docker on your machine. Then you will use the image by typing the same command but with the additionnal --docker flag (the image will be automatically downloaded if not detected on your system):

surfmap -pdb xyz.pdb -tomap electrostatics --docker

This should help. However, if for any reason you cannot or don't want to use docker, i will try to remember how to fix your manual installation of APBS.

Nicolas.

nchenche commented 1 year ago

Hello Dan,

If you really want to install manually APBS (even though i won't recommend it), please try the unix procedure below:

  1. install pdb2pqr as follow: pip install pdb2pqr (remove any other pre-installed pdb2pqr before)
  2. download APBS binaries (3.4.1)
  3. edit your .bashrc file (or ~/.bash_profile or ~/.profile) as follows:
    export PATH="$HOME/APBS-3.4.1.Linux/bin:$PATH"
    export LD_LIBRARY_PATH="$HOME/APBS-3.4.1.Linux/lib"
    export APBS="$HOME/APBS-3.4.1.Linux/"
  4. activate your changes: source ~/.bashrc
  5. fix a bug in an APBS file: sed -i '152s/nsmall/nsmall\[i\]/' $APBS/tools/manip/psize.py

This is the procedure we have to follow to make APBS work successfully on a unix system.

I'd also like to inform you that TypeError: expected str, bytes or os.PathLike object, not NoneType comes from the APBS related installation (if i recall it might come from pdb2pqr more precisely - this won't appear anymore through a install wih pip).

And PATH_APBS = Path(os.getenv("APBS")) comes from SURFMAP; It means that the APBS variable environment has not been set, does not exist.

Please if you're still facing issues, please share:

This would allow to help reproduce the errors and fix them.

Thanks,

Nicolas.

Dan-Burns commented 1 year ago

Hello Dan,

Thanks for using SURFMAP. Unfortunately, the error you are facing is related to the installation of APBS, not SURFMAP per se.

We provide a docker image, in particular to facilitate the installation of APBS. All you have to do is to install docker on your machine. Then you will use the image by typing the same command but with the additionnal --docker flag (the image will be automatically downloaded if not detected on your system):

surfmap -pdb xyz.pdb -tomap electrostatics --docker

This should help. However, if for any reason you cannot or don't want to use docker, i will try to remember how to fix your manual installation of APBS.

Nicolas.

Thank you - worked like a charm. You have excellent documentation and I should have just gone ahead and done the docker route from the beginning. Thanks again!