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