Ejemplo n.º 1
0
checkConnDistances(S, 1, setType=2, doAssert=True)

# See if any connections are not symmetric:
findAsymmetry(S, doAssert=True)

if not globals().has_key("noviz"):
    V = saiga12.viz.VizSystem(S)
    V.vizMakeBox()
    V.vizDisplay()

    # draw connections:
    drawConn(V, S, pos=1, )
    #drawConn(V, S, 1, whichi=(8, 10))

if __name__ == "__main__":
    interact(local=locals(), banner="")



# 
# Now test the 2d grids:
#
S = GridHex2d()
S.makegrid(a, b)
S.addParticleRandomDensity(density, type_=6)

# set the first two particles on the x-axis to be a different color:
S.atomtype[S.lattsite[0]] = 3
S.atomtype[S.lattsite[6]] = 3

checkConnDistances(S, 1, setType=2, doAssert=True)
Ejemplo n.º 2
0
                                        
        data = [ ]
        for i, rho in enumerate(sorted(array.iterkeys())):
            print rho
            l = [ ]
            Legend.add(legend="rho="+str(rho), lty=1, col=i+1)
            for T in sorted(array[rho].iterkeys()):
                l.append((T, array[rho][T][species]))
            print l
            data.append(zip(*l))
        rplot(data, par={"type": "p"},
              title={"main": plottitle,
                     "xlab":"T",
                     "ylab":species+" in natural units"})
        Legend.make(x="topleft")
        interact()


    if exptype == "test":
        build()
        T = 1.446 / 10.75
        rho = .102 * 5.088448
        #boxedge = 17.2
        boxedge = 10.
        S = dragunov.System(N=int(rho*(boxedge**3)),
                            boxsize=(boxedge, boxedge, boxedge),
                            beta=1./T,
                            trialMoveScale=.5)
        S.dispRadius = 1/1.72
        print S.N
        #S.fill(10, 10, 10, scale=1.7)