Re: CCL:file convertion
Asim Kumar Debnath wrote:
>
> Hi!
> I would greatly appreciate if someone can give me suggestions on
> how to convert a pdb file [containing multiple small molecules that
> was obtained from DOCK (UCSF) run] to a mult-mol2 or multi-sdf file.
You mean a 'multi-record SD-file', I presume? One structure
per record?
> I would also like to keep the mol-ID of each compound in those files.
> Thank you in advance for your help and Happy New Year to all of
> you!
>
> Asim
>
You problem can be solved by a small application script.
Please download the latest release of the CACTVS toolkit for
your platform from our ftp server
(ftp://www2.ccc.uni-erlangen.de/pub/cactvs) and install
the standard toolkit (unpack in empty,
temporary directory, execute the 'installme' script
and answer its questions).
Next store the following script in a text file (named for example
'convertpdb.tcl'):
---
foreach file $argv {
if {[catch {molfile open $file} fh]} {
puts stderr $fh
} else {
if {[catch {molfile read $fh} eh]} {
puts stderr $eh
} else {
set fh2 [molfile open [file rootname $file].sdf w]
foreach eh2 [ens split $eh] {
molfile write $fh2 $eh2
ens delete $eh2
}
molfile close $fh2
}
molfile close $fh
}
}
---
Finally run this script as:
csts -f convertpdb.tcl file1.pdb file2.pdb...
Other formats and processing of the structures before
they are written out (such as djusting hdyrogens) can easily
be added by means of additional script commands. Since I do not
know how the MolID is stored in your PDB file, this script
will probably not yet preserve it. If you can provide me
with a sample PDB file, I will send you an updated script which
does have this feature.
The software is free for educational and non-profit use.
--
Dr. Wolf-D. Ihlenfeldt
Computer Chemistry Center, Institute for Organic Chemistry,
University of Erlangen-Nuremberg
Naegelsbachstrasse 25, D-91052 Erlangen (Germany)
Tel (+49)-(0)9131-85-26579 Fax (+49)-(0)9131-85-26566
http://www2.ccc.uni-erlangen.de/wdi/