6

chemfig is a great package to draw molecules. But it's not very fast. I am searching for a software to create chemfig code of chemical graphs (molecules, reactions etc.). It would be great if it is free (better if it's open source :) ).

  • 1
    chemdraw? Your question could use some extra wording. – Johannes_B Apr 15 '15 at 17:31
  • 1
    Sorry English is not my mother tongue. Chemdraw looks like a good software but it is very expensive. – jnbrq -Canberk Sönmez Apr 15 '15 at 18:49
12

You can use any software able to export in smiles format or MDL molfile format. That done, you can use the mol2chemfig package to convert it to a chemfig command.

I also want to point the excellent moltochemfig site in which you can draw a molecule whith your mouse, convert it to mol format and then to chemfig command. For example, in a few seconds, I draw that

enter image description here

Then I press the "Get Mol" button to obtain that code:

Molecule from ChemDoodle Web Components

http://www.ichemlabs.com
 22 24  0  0  0  0            999 V2000
   -0.9948   -0.8453    0.0000 C   0  0  0  0  0  0
   -0.1287   -1.3453    0.0000 C   0  0  0  0  0  0
   -0.1287   -2.3453    0.0000 C   0  0  0  0  0  0
   -0.9948   -2.8453    0.0000 C   0  0  0  0  0  0
   -1.8608   -2.3453    0.0000 C   0  0  0  0  0  0
   -1.8608   -1.3453    0.0000 C   0  0  0  0  0  0
    0.7373   -0.8453    0.0000 C   0  0  0  0  0  0
   -2.7268   -0.8453    0.0000 C   0  0  0  0  0  0
   -0.9948   -3.8453    0.0000 C   0  0  0  0  0  0
    0.7373    0.1547    0.0000 C   0  0  0  0  0  0
    1.6033    0.6547    0.0000 C   0  0  0  0  0  0
    2.4693    0.1547    0.0000 C   0  0  0  0  0  0
    2.4693   -0.8453    0.0000 C   0  0  0  0  0  0
    1.6033   -1.3453    0.0000 C   0  0  0  0  0  0
    1.6033    1.6547    0.0000 C   0  0  0  0  0  0
    0.7023    2.0886    0.0000 C   0  0  0  0  0  0
    0.4798    3.0635    0.0000 C   0  0  0  0  0  0
    1.1033    3.8453    0.0000 C   0  0  0  0  0  0
    2.1033    3.8453    0.0000 C   0  0  0  0  0  0
    2.7268    3.0635    0.0000 C   0  0  0  0  0  0
    2.5043    2.0886    0.0000 C   0  0  0  0  0  0
   -0.0795    1.4651    0.0000 C   0  0  0  0  0  0
  1  21  0     0  0
  2  31  0     0  0
  3  41  0     0  0
  4  51  0     0  0
  5  61  0     0  0
  6  11  0     0  0
  2  71  0     0  0
  6  81  6     0  0
  4  91  1     0  0
  7 101  0     0  0
 10 111  0     0  0
 11 121  0     0  0
 12 131  0     0  0
 13 141  0     0  0
 14  71  0     0  0
 11 151  0     0  0
 15 161  0     0  0
 16 171  0     0  0
 17 181  0     0  0
 18 191  0     0  0
 19 201  0     0  0
 20 211  0     0  0
 21 151  0     0  0
 16 221  1     0  0
M  END

After that, I clic "Convert" and I obtain the chemfig code:

\chemfig{
             % 8
     >:[:330]% 6
      -[:270]% 5
      -[:330]% 4
                (
          <[:270]% 9
                )
       -[:30]% 3
       -[:90]% 2
                (
          -[:150]% 1
          -[:210]% -> 6
                )
       -[:30]% 7
       -[:90]% 10
       -[:30]% 11
                (
          -[:330]% 12
          -[:270]% 13
          -[:210]% 14
          -[:150]% -> 7
                )
       -[:90]% 15
    -[:154.3]% 16
                (
        <[:218.6]% 22
                )
    -[:102.9]% 17
     -[:51.4]% 18
            -% 19
    -[:308.6]% 20
    -[:257.1]% 21
                (
        -[:205.7]% -> 15
                )
}

Which generates an automatic pdf containing this picture:

enter image description here

Easy, isn't it?

  • 2
    It is easy BUT the generated chemfig code is ugly. A human should write \chemfig{*6(-(<)--(-*6(----(-*7(------(<)-))--))--(<:)-)} – unbonpetit Apr 15 '15 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.