Convert chemical file format .

Recently I knew KCF file format. The format represents molecules as graph structure. And it is used in KEGG.
KCF uses atom label and orientation, and bond information.
RDKit or Openbabel can not convert sdf 2 kcf.

Someone who want to convert sdf to kcf. KEGG site provide us API for file format conversion.
Example is following.
I have a sdf file.

iwatobipen$ head cdk2.sdf 
ZINC03814457
                    3D
 Structure written by MMmdl.
 30 31  0  0  1  0            999 V2000
    5.4230   -0.4412    0.7616 C   0  0  0  0  0  0
    4.2434    0.3667    0.1880 C   0  0  0  0  0  0
    4.5978    0.9630   -1.1852 C   0  0  0  0  0  0
    2.9575   -0.4703    0.1074 C   0  0  0  0  0  0
    2.9988   -1.6999    0.0580 O   0  0  0  0  0  0
    1.6357    0.2975    0.0804 C   0  0  0  0  0  0

Know convert the file to kcf format using REST API.

iwatobipen$ curl -F sdffile=@cdk2.sdf http://rest.genome.jp/sdf2kcf/ > cdk2.kcf
iwatobipen$ head cdk2.kcf 
ENTRY       cdk21                       Compound
ATOM        17
            1   C1a C     5.4230   -0.4412
            2   C1c C     4.2434    0.3667
            3   C1a C     4.5978    0.9630
            4   C5a C     2.9575   -0.4703
            5   O5a O     2.9988   -1.6999
            6   C1b C     1.6357    0.2975
            7   O2a O     0.5374   -0.6063
            8   C8y C    -0.7229   -0.0532

API works fine. But if user want to convert large dataset, API is too slow.
I will try to make converter someday.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s