def voropp(a, q='<STR_LIT>', voropp_path=VOROPP_PATH, fast=False, dump=None):
cx, cy, cz = a.get_cell()<EOL>lx, ly, lz = np.linalg.norm(cx), np.linalg.norm(cy), np.linalg.norm(cz)<EOL>if abs(lx*ly*lz - a.get_volume()) > <NUM_LIT> or '<STR_LIT>' in a.info:<EOL><INDENT>return voropp_for_non_orthorhombic_cells(a, q, voropp_path, fast, dump)<EOL><DEDENT>x, y, z = a.get_positions().T<EOL>f = open('<STR_LIT>', '<STR_LIT:w>')<EOL>for jn, ( jx, jy, jz ) in enumerate(zip(x, y, z)):<EOL><INDENT>print >> f, jn, jx, jy, jz<EOL><DEDENT>f.close()<EOL>if isinstance(q, str) or isinstance(q, unicode):<EOL><INDENT>c = '<STR_LIT:%s>' % format(q)<EOL><DEDENT>else:<EOL><INDENT>c = reduce(lambda x,y: '<STR_LIT>'.format(x,y), map(lambda x: '<STR_LIT:%>'+x, q))<EOL><DEDENT>os.system('<STR_LIT>'.format(voropp_path, c, lx, ly, lz))<EOL>r = np.loadtxt('<STR_LIT>', unpack=True)<EOL>os.remove('<STR_LIT>')<EOL>os.remove('<STR_LIT>')<EOL>r = r[:,np.array(r[<NUM_LIT:0>,:], dtype=int)]<EOL>if r.shape[<NUM_LIT:0>] == <NUM_LIT:2>:<EOL><INDENT>return r[<NUM_LIT:1>,:]<EOL><DEDENT>else:<EOL><INDENT>return r[<NUM_LIT:1>:,:]<EOL><DEDENT>
Run voro++ on current configuration and return selected quantities.
Parameter *q* can be a list of voro++ output quantities.
Run 'voro++ -hc' to see options.