Exemple #1
0
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
Exemple #2
0
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