~ubuntu-branches/ubuntu/trusty/bkchem/trusty

« back to all changes in this revision

Viewing changes to bkchem/oasa/test.py

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Leidert (dale)
  • Date: 2009-02-23 22:43:18 UTC
  • mfrom: (1.1.3 upstream) (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090223224318-7rs4x9kqrdhjynz5
Tags: 0.13.0-1
* New upstream release 0.13.0.

* debian/control (Vcs-Svn): Fixed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#print oasa.CAIRO_AVAILABLE
3
3
 
4
4
def cairo_out_test2():
5
 
    #mol = smiles.text_to_mol( "COC(=O)CNC(C1=CC=CC=C1)C2=C(C=CC(=C2)Br)NC(=O)C3=CC(=CC=C3)Cl")
6
 
    #mol = smiles.text_to_mol( "c1nccc2c1cncn2")
7
 
    mol = oasa.smiles.text_to_mol( "OC(O)C(O)C(O)CO")
 
5
    mol = oasa.smiles.text_to_mol( "c1ccccc1Cl.c1ccccc1OC.CCCl")
8
6
    mol.normalize_bond_length( 30)
9
7
    mol.remove_unimportant_hydrogens()
10
8
    c = oasa.cairo_out.cairo_out( color_bonds=True, color_atoms=True)
11
9
    c.show_hydrogens_on_hetero = True
12
10
    c.font_size = 20
13
 
    c.mol_to_cairo( mol, "test.png")
 
11
    mols = list( mol.get_disconnected_subgraphs())
 
12
    c.mols_to_cairo( mols, "test.pdf", format="pdf")
 
13
    c.mols_to_cairo( mols, "test.png")
 
14
    c.mols_to_cairo( mols, "test.svg", format="svg")
 
15
 
 
16
def inchi_test():
 
17
    mol = oasa.smiles.text_to_mol( "c1ccccc1\C=C/CC")
 
18
    print oasa.inchi.mol_to_text( mol, program="stdinchi-1.exe", fixed_hs=False)
14
19
 
15
20
cairo_out_test2()
 
21
#inchi_test()