Tspostat in python. Flexible and incremental
Samo Penic
2018-06-22 ce1751fa0df5f82c005202ead5ae835aef583c11
Change to reflect latest status
1 files modified
9 ■■■■ changed files
poststat.py 9 ●●●● patch | view | raw | blame | history
poststat.py
@@ -14,9 +14,14 @@
            cnt+=1
    return cnt
def sum_stretching_energy(vesicle):
def sum_stretching_energy(vesicle, only_c0_c0=False):
    energy=0.0
    for i in range(0,vesicle.contents.tlist.contents.n):
#        if (only_c0_c0 is True
#            and vesicle.contents.tlist.contents.tria[i].contents.vtx[0].contents.c0<1e-15
#            and vesicle.contents.tlist.contents.tria[i].contents.vtx[1].contents.c0<1e-15
#            and vesicle.contents.tlist.contents.tria[i].contents.vtx[2].contents.c0<1e-15):
        ts.stretchenergy(vesicle,vesicle.contents.tlist.contents.tria[i])
        energy+=vesicle.contents.tlist.contents.tria[i].contents.energy
    return energy
@@ -141,7 +146,7 @@
    django.setup()
    from database import models
    while(True):
        objs=models.Run.objects.order_by('id').all()
        objs=models.Run.objects.order_by('id').filter(simulation=6).all()
        dirlist=[[],[],[]]
        for i,obj in enumerate(objs):
            cdir=os.path.join(obj.simulation.directory, obj.subdir)