if options.input == None: sys.exit( "ERROR!!! Please, specify the input file with the '-i' option \n\n" + HELP_MSG) print " >> OVEWRITING SETTINGS by params.ini " PPU.loadParams('params.ini') print "--- Compute Lennard-Jones Force-filed ---" atoms, lvec = PPH.importGeometries(options.input) FFparams = None if os.path.isfile('atomtypes.ini'): print ">> LOADING LOCAL atomtypes.ini" FFparams = PPU.loadSpecies('atomtypes.ini') else: FFparams = PPU.loadSpecies(cpp_utils.PACKAGE_PATH + '/defaults/atomtypes.ini') PBC = False if not options.noPBC else PPU.params['PBC'] iZs, Rs, Qs = PPH.parseAtoms(atoms, autogeom=False, PBC=options.noPBC, FFparams=FFparams) # This function returns the following information: # iZs - 1D array, containing the numbers of the elements, which corresponds to # their position in the atomtypes.ini file (Number of line - 1) # Rs - 2D array, containing the coordinates of the atoms: # [ [x1,y1,z1],
atoms, nDim, lvec = basUtils.loadXSFGeom( options.input ) PPU.params['gridN'] = nDim PPU.params['gridA'] = lvec[1] PPU.params['gridB'] = lvec[2] PPU.params['gridC'] = lvec[3] else: sys.exit("ERROR!!! Unknown format of geometry system. Supported " "formats are: .xyz, .cube, .xsf \n\n") FFparams=None if os.path.isfile( 'atomtypes.ini' ): print ">> LOADING LOCAL atomtypes.ini" FFparams=PPU.loadSpecies( 'atomtypes.ini' ) else: FFparams = PPU.loadSpecies( cpp_utils.PACKAGE_PATH+'/defaults/atomtypes.ini' ) iZs,Rs,Qs=PPH.parseAtoms(atoms, autogeom = False, PBC = options.noPBC, FFparams=FFparams ) # This function returns the following information: # iZs - 1D array, containing the numbers of the elements, which corresponds to # their position in the atomtypes.ini file (Number of line - 1) # Rs - 2D array, containing the coordinates of the atoms: # [ [x1,y1,z1], # [x2,y2,z2], # ... # [xn,yn,zn]] # Qs - 1D array, containing the atomic charges