cdsgroup / resp

A. Alenaizan's restricted electrostatic potential (RESP) plugin to Psi4
BSD 3-Clause "New" or "Revised" License
27 stars 8 forks source link

install RESP plugin #5

Closed qasimpars closed 5 years ago

qasimpars commented 5 years ago

Hi,

I installed the RESP plugin but it doesn't work properly. Here are the install commands: git clone https://github.com/cdsgroup/resp.git cd resp sudo python setup.py install

Then I run the test_resp.py but it doesn't give any output: pc@pc~/Desktop/resp/resp/tests$ python test_resp.py

Am I doing something wrong?

Hope that you will help me.

Regards,

loriab commented 5 years ago

Your commands are perfectly reasonable for a python module. But RESP is a plugin to Psi4, which is hybrid C++/Python, and building it doesn't play nicely with setup.py. Good point that we ought to have some "getting started" directions in the README.

To get ahold of Psi4, it's recommended to use the conda package manager or the installers, both of which are available from https://admiring-tesla-08529a.netlify.com/installs/v13/ by clicking appropriate choices (go for the "v1.3" and "conda" or "installer"). If you're plain (non WSL) Windows, post back, as there's experimental Win conda packages.

If you use the installer, the resp package will already be present. If you use conda directly, you can get it through conda install resp -c psi4 or in the psi4-rt metapackage.

Post back if you get into trouble. Sorry for the confusion.

qasimpars commented 5 years ago

I downloaded it ("v1.3" and "installer") on ubuntu 18.1 from the link you provided. Then installed it with the commands below:

bash Psi4conda-1.3-py36-Linux-x86_64.sh -b -p $HOME/psi4conda echo $'. $HOME/psi4conda/etc/profile.d/conda.sh\nconda activate' >> ~/.bashrc psi4 --test

1st problem: The installation causes a flag/prefix (base) on the terminal. When I open a new terminal, it pops out:

(base)pc@pc~/Desktop/

That is strange. How can I get rid of this "(base)" flag?

2nd problem: I run the test_resp.py as the following but it still doesn't give any output.

(base) phy@phy:~/psi4conda/lib/python3.6/site-packages/resp/tests$ python test_resp.py

Thanks for your response and help.

loriab commented 5 years ago

conda is a package and environment manager (some docs here), and the (base) in your terminal just shows that you're in the main environment, not any other environment (for example that you might have created through conda create -n py37env python=3.7 to try out a different python version). There's nothing wrong with having the (base) there, though note that your which python has probably changed from system python to the conda python.

That https://github.com/cdsgroup/resp/blob/master/resp/tests/test_resp.py file is a test file for pytest (runnable though python -c "import resp, sys; sys.exit(resp.test('long'))") and thus has all its commands in functions which aren't called if you plain execute the file. If you replace the fn defs https://github.com/cdsgroup/resp/blob/master/resp/tests/test_resp.py#L5 with if True:, then the (former) fn contents will execute when you execute the file.

qasimpars commented 5 years ago

I did what you said and it works well now. Thanks for your helps.