Skip to main content

Posts

Showing posts from June, 2019

Python : Turtle tree

Turtle module can be used to draw some very nice patterns in Python. Following are some examples with code. ==================== import turtle import random t = turtle.Turtle( shape = "circle" ) t.lt( 90 ) lv = 14 l = 120 s = 30 t.color( 'indigo' ) t.width(lv) t.penup() t.bk(l) t.pendown() t.fd(l) def draw_tree ( l , level ): width = t.width() # save the current pen width t.width(width * 3.0 / 4.0 ) # narrow the pen width l = 3.0 / 4.0 * l #t.color(R,G,B) #provide the RGB numbers t.color(random.random(), random.random(), random.random()) t.lt(s) t.fd(l) if level < lv: draw_tree(l, level + 1 ) t.color(random.random(), random.random(), random.random()) t.bk(l) t.rt( 2 * s) t.fd(l) if level < lv: draw_tree(l, level + 1 ) t.color(random.random(), random.random(), random.random()) t.bk(l) t.lt(s) t.width(width) # restore the previous pen width t.speed( "fastest" ) draw_tree(l, 5 ) turtle.done() ===========...

MD convert (xtc to dcd)

CATDCD program can be used to convert one file format to another file format. For example: How to convert trajectory output of GROMACS .xtc format into NAMD .dcd format ==== /path/to/catdcd -o /path/to/save/file/abc.dcd -xtc /input/path/to/save/file/abc.xtc ==== How to install CATDCD? Follow the link-   https://www.ks.uiuc.edu/Development/MDTools/catdcd/ Download the catdcd-X.Xx.tar.gz Extract all files from the tar. Locate the catdcd file. It should be in directory :  catdcd-4.0b/LINUXAMD64/bin/catdcd4.0/ Source the catdcd in your bashrc: export PATH="/path/to/catdcd/directory/:$PATH"

Science News

Enter your email address:

PhD Vacancy Bioinformatics

PhD Vacancy Chemoinformatics