How To Run Naccess On Ubuntu 11.10
4
3
Entering edit mode
12.7 years ago
tesni ▴ 10

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 • 8.2k views
ADD COMMENT
2
Entering edit mode
12.7 years ago

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

@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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

Yes. you are correct. It is ubunthu 11.10

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode
12.7 years ago

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 COMMENT
1
Entering edit mode

@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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

Thanks sukhdeep. It worked .

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

No worries!! Also, check this one.

Have fun programming

ADD REPLY
0
Entering edit mode
12.6 years ago
raweti • 0

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode
10.7 years ago

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 COMMENT

Login before adding your answer.

Traffic: 2033 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6