Re: [ccp4bb] PERL system call to CCP4
For those who might want to use his package, Emmanuel Courcelle told me that the new URL is : ftp://ftp.toulouse.inra.fr/pub/LIPM/manu/occp4/occp4-pm-1.0.tar.gz It is there since 2002 and will not be moved. Best regards, Lionel On Mon, 14 Jan 2008 16:41:35 -0500, Ezra Peisach [EMAIL PROTECTED] wrote: You may wish to look at the occp4-pm perl package by E. Courcelle and J.P. Samama (formerly available from ftp://ftp.ipbs.fr/pub/occp4 - but this no longer works...) I no longer have a copy but someone might... Ezra [EMAIL PROTECTED] wrote: Dear CCP4 users, I am writing a PERL script to execute a number of CCP4 commands (ncsmask, pdbset, and dm) in succession. I have tried using system call or PIPE command, neither of which work. The ccp4 scripts generated work independently on the command line. Any suggestions? Thank you in advance! =
Re: [ccp4bb] PERL system call to CCP4
Hi, Here is a copy of the occp4.pm file which we use at the PDB Depositions and Processing Site at the EBI. This perl module works and can be called as following: #/bin/perl require '/ebi/msd/work2/msdsd/production/x86_64/lib/site_perl/occp4.pm'; my $sfcheck = new occp4('sfcheck','hklin'=$sf,'xyzin'=$pdb); $sfcheck-logfile(sfcheck_$pdbid.log); $sfcheck-keywords(LABIN=I=I SIGI=SIGI); error(sfcheck did not complete properly, check $sflog file) if ($sfcheck-run()); Hope it helps. Jawahar Swaminathan [EMAIL PROTECTED] wrote: Dear CCP4 users, I am writing a PERL script to execute a number of CCP4 commands (ncsmask, pdbset, and dm) in succession. I have tried using system call or PIPE command, neither of which work. The ccp4 scripts generated work independently on the command line. Any suggestions? Thank you in advance! #!/ebi/msd/bin/perl # # $Id: occp4.pm,v 1.5 1999/02/08 08:35:42 manu Exp $ # # $Log: occp4.pm,v $ # Revision 1.5 1999/02/08 08:35:42 manu # added copyright notice # # Revision 1.4 1998/09/14 13:20:04 manu # documentation # # Revision 1.3 1998/09/14 10:08:18 manu # split_pdb # # Revision 1.2 1998/08/31 14:24:36 manu # minor changes in documentation # # Revision 1.1 1998/08/31 13:42:58 manu # Initial revision # # This is occp4.pm, an object-oriented perl module for writing ccp4 scripts # Copyright (C) 1999 Emmanuel Courcelle Jean-Pierre Samama # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # # New versions should be available on ftp://ftp.ipbs.fr # Comments are to be sent to [EMAIL PROTECTED] # =head1 NAME occp4.pm - Object oriented CCP4 module =head1 DESCRIPTION This module is VERY useful when you want to use ccp4 programs from within a perl script. The ccp4 environment Imust be loaded before the script is started. =head1 The constructors $ccp4_obj = new OCCP4('prgm_name',log1=file1,log2=file2,...); B'prgm_name' is the name of a ccp4 program. Blog1=Egtfile1 are pairs of logical names/real names, used by the ccp4 programs for specifying the input/output files. Those parameters are optional, and may be overriden with the iofiles (see Liofiles, iofildel member function). =head1 The destructor When the memory allocated for the object is returned to the system (at the end of the block, or more generally when no reference points to that object, see perl documentation for the details), a destructor is called. Its only action is to unlink the temporary files which did belong to this object. If the debug flag 'F' is specified, the files are Inot unlinked, but a message is printed to the standard output. =head1 The member functions Following paragraphs describe the member functions available from every object. =head2 keywords, keywdel, keywrep (1) $ccp4_obj-keywords(keyw1=val1,keyw2=val2,...) (2) $value=$ccp4_obj-keywords('keyword') (3) @value=$ccp4_obj-keywords('keyword') (4) @keywords=$ccp4_obj-keywords() (5) $ccp4_obj-keywdel('keyw1','keyw2') (6) $ccp4_obj-keywrep(keyw1=val1,keyw2=val2) You must use (1) to set the value of one or several keywords. If the function is called and this keyword is already defined, the new value is 'appended', ie the same keyword may appear several times. (2) is used to retrieve the value of one specific keyword. If the keyword appears several times, Bonly the first occurrence of the keyword will be retrieved this way. If you want to retrieve Ball occurrences of a specific keyword, use (3). (4) is used to retrieve all the keyword/value pairs in one operation. (5) The keywdel function is used to delete Ball occurrences of one given keyword. (6) The keywrep function deletes Ball occurrences of the specified keywords, and replaces them with the values passed by parameters. See also LSpecial values, Linput_file, input_string, input_src, LThe KCCP4 and LCCP4 global variables. =head2 iofiles, iofildel (1) $ccp4_obj-iofiles(HKLIN=$file1,HKLOUT=$file2,...) (2) $file=$ccp4_obj-iofiles('HKLIN') (3) %files=$ccp4_obj-iofiles() (4) $ccp4_obj-iofildel('HKLIN') (1) is used to set or change the value of a logical name for the input or output files (they can also. (2) is used to retrieve the value of a logical name. (3) is used to retrieve all logical name/real name pairs. (4) iofildel is used to delete one logical name from the list of iofiles. See also
[ccp4bb] PERL system call to CCP4
Dear CCP4 users, I am writing a PERL script to execute a number of CCP4 commands (ncsmask, pdbset, and dm) in succession. I have tried using system call or PIPE command, neither of which work. The ccp4 scripts generated work independently on the command line. Any suggestions? Thank you in advance!
Re: [ccp4bb] PERL system call to CCP4
This looks promising: http://www.ccp4.ac.uk/newsletters/newsletter36/13_perl.html Ezra Peisach wrote: You may wish to look at the occp4-pm perl package by E. Courcelle and J.P. Samama (formerly available from ftp://ftp.ipbs.fr/pub/occp4 - but this no longer works...) I no longer have a copy but someone might... Ezra [EMAIL PROTECTED] wrote: Dear CCP4 users, I am writing a PERL script to execute a number of CCP4 commands (ncsmask, pdbset, and dm) in succession. I have tried using system call or PIPE command, neither of which work. The ccp4 scripts generated work independently on the command line. Any suggestions? Thank you in advance!
Re: [ccp4bb] PERL system call to CCP4
hi, I am writing a PERL script to execute a number of CCP4 commands (ncsmask, pdbset, and dm) in succession. I have tried using system call or PIPE command, neither of which work. The ccp4 scripts generated work independently on the command line. we do this in the eds map generation script. first create a little shell script that runs the ccp4 programs: -- # generate refmac script file open (OUTFILE,refmac.com) || die $! can't open file refmac.com \n; select (OUTFILE); if ($tls_flag ne ) { print $tlsextract XYZIN $pdbfile TLSOUT $tlsin tlsext.log\n\n; } -- etc. and then execute it with the system command (of course, you have to make the file executable first, or maybe source it instead of executing it - could this have been your problem?): -- close (OUTFILE); system (chmod 744 refmac.com); system (./refmac.com); -- works fine on a plain-vanilla linux box --dvd p.s.: a propos an earlier thread, a solution is to use answers.com instead of wikip... e.g.: http://www.answers.com/molecular%20geometry and http://www.answers.com/topic/dihedral-angle?cat=technology and http://www.answers.com/topic/alkane-stereochemistry - this should work in the land of the great firewall; not sure about other orwellian countries (let me know off-line if it doesn't) ** Gerard J. Kleywegt [Fellow of the Resdep of the Swedish Ministry of Truth] Dept. of Cell Molecular Biology University of Uppsala Biomedical Centre Box 596 SE-751 24 Uppsala SWEDEN http://xray.bmc.uu.se/gerard/ mailto:[EMAIL PROTECTED] ** The opinions in this message are fictional. Any similarity to actual opinions, living or dead, is purely coincidental. **
Re: [ccp4bb] PERL system call to CCP4
Or use print ` xxx ` Artem -Original Message- From: CCP4 bulletin board [mailto:[EMAIL PROTECTED] On Behalf Of Gerard DVD Kleywegt Sent: Monday, January 14, 2008 5:24 PM To: CCP4BB@JISCMAIL.AC.UK Subject: Re: [ccp4bb] PERL system call to CCP4 hi, I am writing a PERL script to execute a number of CCP4 commands (ncsmask, pdbset, and dm) in succession. I have tried using system call or PIPE command, neither of which work. The ccp4 scripts generated work independently on the command line. we do this in the eds map generation script. first create a little shell script that runs the ccp4 programs: -- # generate refmac script file open (OUTFILE,refmac.com) || die $! can't open file refmac.com \n; select (OUTFILE); if ($tls_flag ne ) { print $tlsextract XYZIN $pdbfile TLSOUT $tlsin tlsext.log\n\n; } -- etc. and then execute it with the system command (of course, you have to make the file executable first, or maybe source it instead of executing it - could this have been your problem?): -- close (OUTFILE); system (chmod 744 refmac.com); system (./refmac.com); -- works fine on a plain-vanilla linux box --dvd p.s.: a propos an earlier thread, a solution is to use answers.com instead of wikip... e.g.: http://www.answers.com/molecular%20geometry and http://www.answers.com/topic/dihedral-angle?cat=technology and http://www.answers.com/topic/alkane-stereochemistry - this should work in the land of the great firewall; not sure about other orwellian countries (let me know off-line if it doesn't) ** Gerard J. Kleywegt [Fellow of the Resdep of the Swedish Ministry of Truth] Dept. of Cell Molecular Biology University of Uppsala Biomedical Centre Box 596 SE-751 24 Uppsala SWEDEN http://xray.bmc.uu.se/gerard/ mailto:[EMAIL PROTECTED] ** The opinions in this message are fictional. Any similarity to actual opinions, living or dead, is purely coincidental. **
Re: [ccp4bb] PERL system call to CCP4
You can check whether something strange is happening to your environment variables within the PERL process by typing:perl -e 'print join(\n,%ENV).\n' | more hth