def main(): """ Read in data file and replicate it """ # # Read options # options, args = get_options() # # Initialize mpi # p = mpiBase.getMPIObject() pt = periodictable() # # Read in cply file into a structure container object # bb_o = Buildingblock() bb_o.read_xmol(options.in_xyz) if( options.setlabel ): bb_o.set_label() if( options.setmass ): bb_o.set_mass() print bb_o comment = "Read in from {} to output {} ".format(options.in_xyz,options.out_id) append = False bb_o.ptclC.write_xmol("{}.xyz".format(options.out_id),comment,append) bb_o.write_cply("{}.cply".format(options.out_id),write_ff=True,write_bonds=True) del bb_o
def main(): """ Read in gaussian fchk file and create an xyz file """ # # Read options # options, args = get_options() # # Initialize blank system # bb_o = Buildingblock() bb_o.read_cply(options.in_cply) param_o = ParameterContainer() bb_o,param_o = read_lmpdata( bb_o , param_o , options.in_data) print bb_o print param_o if( options.mol_pbcs ): bb_o.bondC_nblist() molpbcs(bb_o,bb_o.bonded_nblist, bb_o.bonded_nbindx,debug=False) comment = " From data file {} ".format( options.in_data) append = False out_xyz = "{}.xyz".format(options.out_id) bb_o.ptclC.write_xmol("{}".format(out_xyz),comment,append) if( options.verbose ): print " Writing cply file {}.cply".format(options.out_id) bb_o.write_cply("{}.cply".format(options.out_id),write_ff=True,write_bonds=True)
def main(): """ Read in gaussian fchk file and create an xyz file """ # # Read options # options, args = get_options() # # Initialize blank system # bb_o = Buildingblock() bb_o.read_cply(options.in_cply) param_o = ParameterContainer() bb_o, param_o = read_lmpdata(bb_o, param_o, options.in_data) print bb_o print param_o if (options.mol_pbcs): bb_o.bondC_nblist() molpbcs(bb_o, bb_o.bonded_nblist, bb_o.bonded_nbindx, debug=False) comment = " From data file {} ".format(options.in_data) append = False out_xyz = "{}.xyz".format(options.out_id) bb_o.ptclC.write_xmol("{}".format(out_xyz), comment, append) if (options.verbose): print " Writing cply file {}.cply".format(options.out_id) bb_o.write_cply("{}.cply".format(options.out_id), write_ff=True, write_bonds=True)
def main(): """ Read in data file and replicate it """ # # Read options # options, args = get_options() # # Initialize mpi # p = mpiBase.getMPIObject() pt = periodictable() # # Read in cply file into a structure container object # bb_o = Buildingblock() bb_o.read_xmol(options.in_xyz) if (options.setlabel): bb_o.set_label() if (options.setmass): bb_o.set_mass() print bb_o comment = "Read in from {} to output {} ".format(options.in_xyz, options.out_id) append = False bb_o.ptclC.write_xmol("{}.xyz".format(options.out_id), comment, append) bb_o.write_cply("{}.cply".format(options.out_id), write_ff=True, write_bonds=True) del bb_o
def main(): """ Read in data file and replicate it """ # # Read options # options, args = get_options() # # Initialize mpi # p = mpiBase.getMPIObject() # # Read in fchk file into a simulation object # sim_o = SimulationGaussian(options.out_id) sim_o.readfchk(options.in_fchk) print sim_o write_xyz = True if (write_xyz): comment = " adf" append = False sim_o.write_xmol("{}.xyz".format(options.out_id), comment, append) struc_o = sim_o.getstrucC() param_o = sim_o.getparamC() # initialize_fftags(struc_o) struc_o.build_bonded_nblist(max_nn=12.0, radii_buffer=1.25) struc_o.nblist_bonds() struc_o.nblist_angles() limdih = False limitdih_n = 0 struc_o.nblist_dih(limdih, limitdih_n) # # Use oplsaa types as fftype guess # These should be checked and edited in the cply file # ring_nblist, ring_nbindex = find_rings(struc_o, struc_o.bonded_nblist, struc_o.bonded_nbindx) oplsaa_atomtypes(struc_o, struc_o.bonded_nblist, struc_o.bonded_nbindx) set_chargegroups(struc_o, ring_nblist, ring_nbindex, struc_o.bonded_nblist, struc_o.bonded_nbindx) print " Charge groups set " bb_o = Buildingblock() print " bb_o created " bb_o.setStructureContainer(struc_o) print " bb_o strucC set to struc_o " bb_o.set_cply_tags() # struc_o.zero_unitq() print " cply tags set " bb_o.write_cply("{}.cply".format(options.out_id), write_ff=True, write_bonds=True) del sim_o
def main(): """ Read in data file and replicate it """ # # Read options # options, args = get_options() # # Initialize mpi # p = mpiBase.getMPIObject() # # Read in fchk file into a simulation object # sim_o = SimulationGaussian(options.out_id) sim_o.readfchk(options.in_fchk) print sim_o write_xyz = True if( write_xyz ): comment = " adf" append = False sim_o.write_xmol("{}.xyz".format(options.out_id),comment,append) struc_o = sim_o.getstrucC() param_o = sim_o.getparamC() # initialize_fftags(struc_o) struc_o.build_bonded_nblist(max_nn=12.0,radii_buffer=1.25) struc_o.nblist_bonds() struc_o.nblist_angles() limdih = False limitdih_n = 0 struc_o.nblist_dih(limdih,limitdih_n) # # Use oplsaa types as fftype guess # These should be checked and edited in the cply file # ring_nblist, ring_nbindex = find_rings(struc_o,struc_o.bonded_nblist, struc_o.bonded_nbindx) oplsaa_atomtypes(struc_o,struc_o.bonded_nblist, struc_o.bonded_nbindx) set_chargegroups(struc_o , ring_nblist, ring_nbindex,struc_o.bonded_nblist, struc_o.bonded_nbindx) print " Charge groups set " bb_o = Buildingblock() print " bb_o created " bb_o.setStructureContainer(struc_o) print " bb_o strucC set to struc_o " bb_o.set_cply_tags() # struc_o.zero_unitq() print " cply tags set " bb_o.write_cply("{}.cply".format(options.out_id),write_ff=True,write_bonds=True) del sim_o