Question: How To Run Naccess On Ubuntu 11.10
1
gravatar for tesni
7.0 years ago by
tesni20
tesni20 wrote:

Hi,

I am trying to run Naccess on ubunthu 11.10. I have installed it .But I don't know the usage of Naccess. After the installation , I should create an alias and has to include it in .cshrc file. I can't find the .cshrc file in home directory. I am new to Ubuntu. Please help me to create alias in .cshrc.

This is the link of Naccess http://www.bioinf.manchester.ac.uk/naccess/

I think my installation is correct . When I run ' csh install.scr' I got the following output.

tesni@ubuntu:~/Desktop/naccess2.1.1$ csh install.scr

$ naccess installation program

$ ----------------------------

$ installing naccess in directory /home/tesni/Desktop/naccess2.1.1

$ created naccess - cshell script

$ compiling accall.f

MAIN accall:
 vguess:
 chain:
 gatom:
 ratom
 restype:
 which3:
 fopen:
 readstring:
 parse:
 readint:
 readfloat:
 tolow:
 solva:
 sortag:

 summer:
 polguess:

 what_atom:

 vanin:

$ done

I don't know , how to run naccess after this installation. Please help.

ubuntu • 3.8k views
ADD COMMENTlink modified 5.0 years ago by p_khodabakhsh0 • written 7.0 years ago by tesni20
1
gravatar for Sukhdeep Singh
7.0 years ago by
Sukhdeep Singh9.7k
Netherlands
Sukhdeep Singh9.7k wrote:

I dont know about the software, but alias is nice tool to create a shortcut to a big command with your custom names.

I can make an alias to a ssh singh@mycluster.it.ac.uk as alias myserver='ssh singh@mycluster.it.ac.uk'.

So, from now on, whenever I will write in a terminal myserver this will point to my ssh command and it will be excuted.

To make this alias load by default whenever you boot the system, you have to save it in you .bashrc or .bash_profile and the refresh it using source command like source .bashrc

.bashrc is for bash and .cshrc is for (t)csh- cshell. Read more info about it here. If a .bashrc or .cshrc is not present, you just have to create one in your home dir and then make an alias as they say on the Naccess website alias naccess '/home/username/naccess_directory/naccess'. So, from now on you don't have to write full command with path, you can just write naccess or you can also put it in path (.bashrc), if you don't wanna use alias

I hope that helps.

Cheers

ADD COMMENTlink written 7.0 years ago by Sukhdeep Singh9.7k

if you open terminal and type 'echo $SHELL' (without the quotes) it will tell you if you are running bash or csh, default installation of ubuntu should be running bash

ADD REPLYlink written 7.0 years ago by Ying W3.9k

@sukhdeep Thank you so much for your answer. Actually I don't know how to create .bashrc file. I did like this "sudo gedit ~/.bashrc" . .bashrc file opened. It is in /home/ tesni directory. I created the alias like this " alias naccess 'home/Desktop/naccess2.1.1/naccess'. My naccess directory is in /home/Desktop.After creating this alias , I opened the terminal and typed naccess. But I got error "naccess command not found".

ADD REPLYlink written 7.0 years ago by tesni20

Hi, first try echo $SHELL to see what shell you have as Ying suggested. I am sure you will be having bash in Ubuntu. Also, I never heard of Ubuntu 11.14, its either 11.10 or 11.04. Check my answer again, you are missing something in syntax(=). Re-edit it and then source the file, it will refresh it and then try again. Also, check this page for more help on alias.

Cheers

ADD REPLYlink modified 7.0 years ago • written 7.0 years ago by Sukhdeep Singh9.7k

Yes. you are correct. It is ubunthu 11.10

ADD REPLYlink written 7.0 years ago by tesni20

remember to use the source command after modifying .bashrc This tells the terminal window to reload its settings.

ADD REPLYlink written 7.0 years ago by Ying W3.9k
1
gravatar for Niallhaslam
7.0 years ago by
Niallhaslam2.2k
Dublin
Niallhaslam2.2k wrote:

When you run the 'csh install.scr' command it should create the alias or put naccess on your path. It does on my machine. Are you sure there are no errors when you run csh?

For what its worth I installed my version in /usr/local/share/ which may have already been in my path. But you can check this by running 'echo $PATH'.

ADD COMMENTlink modified 7.0 years ago • written 7.0 years ago by Niallhaslam2.2k
1

@Niallhaslam. Thank you for your answer. I didn't get error when I run ' csh install.scr'. I don't know where I installed Naccess but Naccess directory is in my desktop. I tried 'echo $PATH'. I got this output "usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" I don't understand about this output. Actually I am a windows user. I installed ubunthu only for using this software.

ADD REPLYlink written 7.0 years ago by tesni20

Ok. If you run the script as a super user then it will install it globally. To do this you should run the following commands:

sudo su

Enter your password.

cd /path/to/naccess/

csh install.scr

exit

naccess

Otherwise you will have to type /home/testni/naccess/naccess everytime you want to use naccess. Or 'cd /path/to/naccess/' and then type './naccess'.

ADD REPLYlink modified 7.0 years ago • written 7.0 years ago by Niallhaslam2.2k

I don't understand about 'cd/path/to/naccess/'. Instead of this I gave the path of naccess directory.After that I typed './naccess'. I got the following output usage naccess pdb_file [-p probe_size] [-r vdw_file] [-s stdfile] [-z zslice] -[hwyfaclqb] and then typed 'naccess 1crn.pdb'. But I got error. 'No command 'naccess' found'. What is my mistake? Please help

ADD REPLYlink written 7.0 years ago by tesni20
1

So, the executable is work with ./naccess and while using it you are writing it without it. Just use ./naccess 1crn.pdb and it should work :)

ADD REPLYlink written 7.0 years ago by Sukhdeep Singh9.7k

Thanks sukhdeep. It worked .

ADD REPLYlink written 7.0 years ago by tesni20

@Niallhaslam.Thanks for your help. How can I run Naccess with multiple PDB files? Is it easy with bash?

ADD REPLYlink written 7.0 years ago by tesni20
1

If its just this command ./naccess 1crn.pdb and you wanna run it over a loop over all of your pdf files, then use for i in *pdb; do ./naccess $i; done in your terminal. Use & at the end of this command and this loop will go in the background.

Cheers

ADD REPLYlink written 7.0 years ago by Sukhdeep Singh9.7k

Thank you sukhdeep. I tried your code. It worked. I have lot of pdb files and saved it in a folder. I tried the following code to run all pdb files from this folder. ~/Desktop/naccess2.1.1$ for i in /pdbfiles.pdb; do ./naccess $i; done. But error "/pdbfiles.pdb: No match". 'pdbfiles' is the name of the folder. Is it possible to run all pdb files from this folder?

ADD REPLYlink written 7.0 years ago by tesni20
1

So there is small error in your syntax. If you are in upper level dir, containing folder called pdbfiles, then it should be for in pdbfiles/*.pdb then your normal code.

Cheers

ADD REPLYlink written 7.0 years ago by Sukhdeep Singh9.7k

Great. It worked. I would like to save all output files in to a folder.I tried the following code
ls > output.txt.Using this code I am getting only the name of the output files . Is there any other option to get all outputfiles in to a folder with their contents?

ADD REPLYlink written 7.0 years ago by tesni20
1

Because what you doing is not write, I think you should read a book or some online tutorials about shell scripting and linux in general. If you gonna work on this in future, its important. It saves time rather than asking each step someone else. If the naccess is having any output paramter, then you should use it in the command line only like -o filename or after running the command, when you get lot of files, use mv *.outputpdb folderYouWant, replace outputpdb with whatever your output file ends in.

Cheers

ADD REPLYlink written 7.0 years ago by Sukhdeep Singh9.7k

Yes.That's correct. I am sorry for the trouble. Thank you very much for your help.

ADD REPLYlink written 7.0 years ago by tesni20

No worries!! Also, check this one.

Have fun programming

ADD REPLYlink modified 7.0 years ago • written 7.0 years ago by Sukhdeep Singh9.7k
0
gravatar for raweti
6.9 years ago by
raweti0
raweti0 wrote:

Hello,

I am also having trouble running naccess. When I tried to install it using cygwin, apparently cygwin does not have an f77 compiler and to avoid any more complications we decided it's best that I run it through my university on a secure server. After logging into the server, i run naccess and get the following error:

/home/naccess2.1.1/naccess 1Y98_nopep.pdb

usage: you must supply a pdb file format

Do you have any idea what could be wrong? I know it is a pdb file because I can view it as a text file. As well, I can run it using visualization softwares like PyMol.

ADD COMMENTlink written 6.9 years ago by raweti0

Please just ask a new question instead of opening old questions:

New Question here: http://www.biostars.org/post/show/45386/naccess-issue-pdb-file/

ADD REPLYlink written 6.9 years ago by Niallhaslam2.2k
0
gravatar for p_khodabakhsh
5.0 years ago by
United States
p_khodabakhsh0 wrote:

Hello

I want to use NACCESS but I never work in Linux or Ubuntu! I download the VMBox and run the Ubuntu on it but I Don't know what I have to do next. I don't know how to install the NACCESS.

Please Help me

 

ADD COMMENTlink written 5.0 years ago by p_khodabakhsh0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1085 users visited in the last hour