# [ [x1,y1,z1], # [x2,y2,z2], # ... # [xn,yn,zn]] # Qs - 1D array, containing the atomic charges FFLJ, VLJ=PPH.computeLJ( Rs, iZs, FFLJ=None, FFparams=FFparams, Vpot=options.energy ) # This function computes the LJ forces experienced by the ProbeParticle # FFparams either read from the local "atomtypes.ini" file, or will be read from # the default one inside the computeLJ function GU.limit_vec_field( FFLJ, Fmax=10.0 ) # remove too large valuesl; keeps the same direction; good for visualization print "--- Save ---" GU.save_vec_field( 'FFLJ', FFLJ, lvec,format=format) if options.energy : Vmax = 10.0; VLJ[ VLJ>Vmax ] = Vmax GU.save_scal_field( 'VLJ', VLJ, lvec,format=format) if opt_dict["charge"]: print "Electrostatic Field from xyzq file" FFel, VeL = PPH.computeCoulomb( Rs, Qs, FFel=None, Vpot=options.energy ) print "--- Save ---" GU.save_vec_field('FFel', FFel, lvec, format=format) if options.energy : Vmax = 10.0; Vel[ Vel>Vmax ] = Vmax GU.save_scal_field( 'Vel.xsf', Vel, lvec, format=format)
GU.save_scal_field('VLJ', VLJ, lvec, data_format=data_format) if opt_dict["charge"]: print "Electrostatic Field from xyzq file" multipole = { options.tip: 1.0 } if (options.tip in { 's', 'px', 'py', 'pz', 'dx2', 'dy2', 'dz2', 'dxy', 'dxz', 'dyz' }) else { PPU.params['tip']: 1.0 } sigma = options.sigma if (options.sigma > 0.0) else PPU.params['sigma'] print "DEBUG: multipole, sigma", multipole, sigma Vpot = options.energy if (multipole == {'s': 1.0}) else True print "DEBUG: Vpot", Vpot FFel, Vel = PPH.computeCoulomb(Rs, Qs, FFel=None, Vpot=Vpot) if (multipole != {'s': 1.0}): print " computing convolution with tip by FFT " Fel_x, Fel_y, Fel_z = fFFT.potential2forces(Vel, lvec, PPU.params['gridN'][::-1], rho=None, sigma=sigma, multipole=multipole) del multipole FFel = GU.packVecGrid(Fel_x, Fel_y, Fel_z) del Fel_x, Fel_y, Fel_z print "--- Save ---" GU.save_vec_field('FFel', FFel, lvec, data_format=data_format) if options.energy: Vmax = 10.0
# [ [x1,y1,z1], # [x2,y2,z2], # ... # [xn,yn,zn]] # Qs - 1D array, containing the atomic charges FFLJ, VLJ=PPH.computeLJ( Rs, iZs, FFLJ=None, FFparams=FFparams, Vpot=options.energy ) # This function computes the LJ forces experienced by the ProbeParticle # FFparams either read from the local "atomtypes.ini" file, or will be read from # the default one inside the computeLJ function GU.limit_vec_field( FFLJ, Fmax=10.0 ) # remove too large valuesl; keeps the same direction; good for visualization print "--- Save ---" GU.save_vec_field( 'FFLJ', FFLJ, lvec,data_format=data_format) if options.energy : Vmax = 10.0; VLJ[ VLJ>Vmax ] = Vmax GU.save_scal_field( 'VLJ', VLJ, lvec,data_format=data_format) if opt_dict["charge"]: print "Electrostatic Field from xyzq file" FFel, VeL = PPH.computeCoulomb( Rs, Qs, FFel=None, Vpot=options.energy ) print "--- Save ---" GU.save_vec_field('FFel', FFel, lvec, data_format=data_format) if options.energy : Vmax = 10.0; Vel[ Vel>Vmax ] = Vmax GU.save_scal_field( 'Vel', Vel, lvec, data_format=data_format)