示例#1
0
  # Command-line input
  parser = argparse.ArgumentParser(description="Make a Lammps data file")
  parser.add_argument('file',help="the PDB or GRO file")
  parser.add_argument('-i','--include',help="the LAMMPS include file")
  parser.add_argument('-o','--out',help="the output prefix")
  parser.add_argument('-b','--box',type=float,nargs=3,help="the box dimensions",default=[0.0,0.0,0.0])
  #parser.add_argument('-a','--atomistic',nargs="+",help="data file(s) for atomistic solutes",default=[])
  parser.add_argument('-c','--converter',help="the dictionary with conversion rules")
  #parser.add_argument('-p','--pairfunc',help="the pair function for the AA",default="lj/charmm/coul/long")
  args = parser.parse_args()

  # Load a converter
  converter = lammps.Aa2Cg()
  if args.converter is None :
    converter.read(lammps.get_filename("aa2cg.dat")) # The default
  else :
    converter.read(args.converter)

  # Load the force field file
  include = lammps.Includefile(args.include)

  # Create a Datafile and PDBFile
  pdbfile = pdb.PDBFile(args.file) # Input PDB
  takeres = [True for res in pdbfile.residues]
  data = lammps.Datafile()

  # Convert residues
  all_coords = []
  nwat = 0
  moli = 0
示例#2
0
                        default=[0.0, 0.0, 0.0])
    #parser.add_argument('-a','--atomistic',nargs="+",help="data file(s) for atomistic solutes",default=[])
    parser.add_argument('-c',
                        '--converter',
                        help="the dictionary with conversion rules")
    parser.add_argument('-k',
                        '--kind',
                        help="the kind of particles",
                        default="cg")
    #parser.add_argument('-p','--pairfunc',help="the pair function for the AA",default="lj/charmm/coul/long")
    args = parser.parse_args()

    # Load a converter
    converter = lammps.Aa2Cg()
    if args.converter is None:
        converter.read(lammps.get_filename("aa2cg.dat"))  # The default
    else:
        converter.read(args.converter)

    # Load the force field file
    include = lammps.Includefile(args.include)

    # Create a Datafile and PDBFile
    pdbfile = pdb.PDBFile(args.file)  # Input PDB
    takeres = [True for res in pdbfile.residues]
    data = lammps.Datafile()

    # Convert residues
    all_coords = []
    nwat = 0
    moli = 0