http://stackoverflow.com/questions/3502177/how-to-count-number-of-unique-values-of-a-field-in-a-tab-delimited-text-file
Friday, October 28, 2016
Friday, October 21, 2016
sed - how to do several consecutive substitutions but process file only once?
http://unix.stackexchange.com/questions/97428/sed-how-to-do-several-consecutive-substitutions-but-process-file-only-once
How to remove a column or multiple columns from file using shell command?
http://unix.stackexchange.com/questions/222121/how-to-remove-a-column-or-multiple-columns-from-file-using-shell-command
Thursday, October 20, 2016
Converting vertical items into Horizontal
Converting vertical items into Horizontal
paste -d, -s mylist2 >testml1
paste -sd' ' mylist2
http://www.unix.com/shell-programming-and-scripting/116537-converting-vertical-items-into-horizontal-plz.html
http://www.linuxquestions.org/questions/linux-newbie-8/bash-to-print-words-lines-horizontally-4175450926/
paste -d, -s mylist2 >testml1
paste -sd' ' mylist2
http://www.unix.com/shell-programming-and-scripting/116537-converting-vertical-items-into-horizontal-plz.html
http://www.linuxquestions.org/questions/linux-newbie-8/bash-to-print-words-lines-horizontally-4175450926/
How to grep for a pattern in the files in tar archive without filling up disk space
http://stackoverflow.com/questions/13041068/how-to-grep-for-a-pattern-in-the-files-in-tar-archive-without-filling-up-disk-sp
calculate the rmsd of all ligands loaded in the pymol with reference to a reference ligand using a script
[unformatted]
Hi There,I am trying to calculate the rmsd of all ligands loaded in the pymol with reference to a reference ligand using a script. My current script looks like this,myobjects = cmd.get_object_list()print myobjectscmd.select('sele', "F60_target_14 and resn UNK")cmd.create('obj01', 'sele')for i in myobjects:i = i.strip()cmd.sele('sele', i +'and resn UNK')cmd.create ('obj02', 'sele')cmd.rms_cur ('obj02', 'obj01')cmd.delete ('obj02')obj01 will be my reference and I want to use rms_cur to all objects loaded.The problems here are,(1) My obj02 selection part is not working properly. I know I am not calling the myobject list in the correct way. Could somebody help me fix this?(2) I want to write the rmsd values to a file. How can I do it?Thanks for the help.Regards,Subha
Looks like you’re missing a space in the string ‘and resn UNK’, it should be: i + ‘ and resn UNK’
I figured out the rms_cur part too.
Wednesday, October 19, 2016
Using 'python' and 'python end' in pymol scripts
Using 'python' and 'python end' in pymol scripts
Dear Users,
I am trying to implement a script which uses a mix of pymol and python scripting. I enclosed the main portion within the 'python' and 'python end' commands. This runs perfectly fine in Pymol GUI mode, however when I tried it with 'pymol -cg my_script.py', it generates an error:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pymol/parser.py", line 338, in parse
parsing.run_file(path,self.pymol_names,self.pymol_names)
File "/usr/lib/python2.7/dist-packages/pymol/parsing.py", line 452, in run_file
execfile(file,global_ns,local_ns)
File "/usr/lib/python2.7/dist-packages/pymol/parsing.py", line 447, in execfile
b.execfile(filename, global_ns, local_ns)
File "bondH.py", line 122
python end
^
SyntaxError: invalid syntax
How do I overcome this problem?
Rename the script from .py to .pml
Dear Users,
I am trying to implement a script which uses a mix of pymol and python scripting. I enclosed the main portion within the 'python' and 'python end' commands. This runs perfectly fine in Pymol GUI mode, however when I tried it with 'pymol -cg my_script.py', it generates an error:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pymol/parser.py", line 338, in parse
parsing.run_file(path,self.pymol_names,self.pymol_names)
File "/usr/lib/python2.7/dist-packages/pymol/parsing.py", line 452, in run_file
execfile(file,global_ns,local_ns)
File "/usr/lib/python2.7/dist-packages/pymol/parsing.py", line 447, in execfile
b.execfile(filename, global_ns, local_ns)
File "bondH.py", line 122
python end
^
SyntaxError: invalid syntax
How do I overcome this problem?
Answer:
Rename the script from .py to .pml
Monday, October 17, 2016
Run JavaScript from command line in Linux
https://fixmynix.com/run-javascript-from-command-line-linux/
Subscribe to:
Comments (Atom)