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.
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
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
@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".
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.
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'.
@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.
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
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.
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?
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.
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?
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.
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.
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.
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
@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".
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
Yes. you are correct. It is ubunthu 11.10
remember to use the source command after modifying .bashrc This tells the terminal window to reload its settings.