elif opt_dict['q'] is not None:
	Qs = [ opt_dict['q'] ]
else:
	Qs = [ PPU.params['charge'] ]

for iq,Q in enumerate(Qs):
	if ( abs(Q) > 1e-7):
		charged_system=True

if options.tipspline is not None :
	try:
		S = np.genfromtxt(options.tipspline )
		print " loading tip spline from "+options.tipspline
		xs   = S[:,0].copy();  print "xs: ",   xs
		ydys = S[:,1:].copy(); print "ydys: ", ydys
		PPC.setTipSpline( xs, ydys )
		#Ks   = [0.0]
	except:
		print "cannot load tip spline from "+options.tipspline
		sys.exit()
	
# Amps
#if opt_dict['arange'] is not None:
#	Amps = np.linspace( opt_dict['arange'][0], opt_dict['arange'][1], opt_dict['arange'][2] )
#elif opt_dict['a'] is not None:
#	Amps = [ opt_dict['a'] ]
#else:
#	Amps = [ PPU.params['Amplitude'] ]

print "Ks   =", Ks 
print "Qs   =", Qs 
示例#2
0
else:
    Qs = [PPU.params['charge']]

for iq, Q in enumerate(Qs):
    if (abs(Q) > 1e-7):
        charged_system = True

if options.tipspline is not None:
    try:
        S = np.genfromtxt(options.tipspline)
        print(" loading tip spline from " + options.tipspline)
        xs = S[:, 0].copy()
        print("xs: ", xs)
        ydys = S[:, 1:].copy()
        print("ydys: ", ydys)
        PPC.setTipSpline(xs, ydys)
        #Ks   = [0.0]
    except:
        print("cannot load tip spline from " + options.tipspline)
        sys.exit()

tip_base = options.tip_base
if not tip_base:
    tip_base = True if ((PPU.params["tip_base"][0] != 'None') and
                        (PPU.params["tip_base"][0] != None)) else False

print("Ks   =", Ks)
print("Qs   =", Qs)
print("tip_base =", tip_base)

print(" ============= RUN  ")