def main(outname,pltname): mol_info = read_output_as_dict(outname) plt_info = read_plt(pltname) name = mol_info['name'] scene = Scene(name) #scene.set_camera((0,4,0.5),(0,0,0.5)) scene.set_camera((0,10,0)) atoms = mol_info['structure'] for i,j in get_bonds_from_distance(atoms): atnoi,xyzi = atoms[i] atnoj,xyzj = atoms[j] scene.add(Cylinder(xyzi,xyzj,0.1)) for atno,xyz in atoms: r,g,b = color[atno] sphere = Sphere(xyz,rscale*radius[atno],(r/255.,g/255.,b/255.)) scene.add(sphere) ptris = mcube_contour(plt_info,0.1) ntris = mcube_contour(plt_info,-0.1) # if desired, compute normals at each vertex ptris = smooth_tris(ptris) ntris = smooth_tris(ntris) if ptris: scene.add(TriangleMesh(ptris,(1,0,0))) if ntris: scene.add(TriangleMesh(ntris,(0,0,1))) scene.write_pov() scene.render() scene.display() return
def jagout_scanner(fname): """\ Scan a Jaguar output file and get the relevant information for kinetics calculations, including: - geometry - frequencies - rotational symmetry number - spin multiplicity - total energy - zero point energy """ from Pistol.Jaguar import read_output_as_dict props = read_output_as_dict(fname) geo = props.get('structure') if not geo: raise Exception("Structure not obtained from Jaguar file") freqs = props.get('freqs',[]) rotsym = props.get('rotsym',1) emult = props.get('multiplicity',1) energy = props.get('energy') zpe = props.get('zpe',0) #print "Properties obtained from Jaguar output" #print "structure" #for atno,(x,y,z) in geo: # print "%d %10.4f %10.4f %10.4f" % (atno,x,y,z) #print "multiplicity = ",emult #print "frequencies = ",freqs #print "zpe = ",zpe #print "rotsym = ",rotsym #print "energy = ",energy return geo,freqs,rotsym,emult,energy,zpe
0.1 01/01/00 Original version 0.2 03/01/00 Fixed bug related to intensities and symmetries 0.3 12/04/00 Fixed bug related to reduced masses. 0.4 08/22/02 Cleaned code slightly 0.5 06/06/03 Fixed a bug related to the force constant line in Jaguar v4.2 0.6 06/09/03 Put most of the functions into the appropriate parts of Pistol Copyright (c) 2003 Richard P. Muller ([email protected]). All rights reserved. See the LICENSE file for licensing details. """ # Things to do: # Put the frequency stuff into the MOLF format in Pistol import sys for filename in sys.argv[1:]: from Pistol.Jaguar import read_output_as_dict from Pistol.MOLF import write output = read_output_as_dict(filename) mol = output['structure'] freqlist = output['freqs'] modes = output['modes'] fileout = filename.replace('.out','.molf') write(fileout,mol,freqlist,modes)