Esempio n. 1
0
 def build(self):
     params = self.params
     h = self.h
     if params.diamPore is not None:
         diamPore = params.diamPore  # inner (effective) pore diameter
         diamDNA = params.diamDNA  # dna diameter of outer dna layers
         l0 = diamPore + 6. * diamDNA
         l1 = diamPore + 4. * diamDNA
         l2 = diamPore + 2. * diamDNA
         l3 = diamPore
         l4 = l1
         params.update(l0=l0, l1=l1, l2=l2, l3=l3, l4=l4)
     if params.dim == 3:
         geo = pughpore.get_geo(h, **params)
         if geo.params["x0"] is not None:
             molec = curved.Sphere(geo.params["rMolecule"],
                                   geo.params["x0"])
             geo.curved = dict(moleculeb=molec.snap)
     elif params.dim == 2:
         geo = pughpore.get_geo_cyl(h, **params)
         if geo.params["x0"] is not None:
             molec = curved.Circle(geo.params["rMolecule"],
                                   geo.params["x0"])
             geo.curved = dict(moleculeb=molec.snap)
     elif params.dim == 1:
         geo = pughpore.get_geo1D(h, **params)
     return geo
Esempio n. 2
0
 def init_geo(self, create_geo=True):
     if self.geop.diamPore is not None:
         diamPore = self.geop.diamPore # inner (effective) pore diameter
         diamDNA = self.geop.diamDNA # dna diameter of outer dna layers
         l0 = diamPore + 6.*diamDNA
         l1 = diamPore + 4.*diamDNA
         l2 = diamPore + 2.*diamDNA
         l3 = diamPore
         l4 = l1
         self.geop.update(l0=l0, l1=l1, l2=l2, l3=l3, l4=l4)
     if not create_geo:
         self.geo = None
         return
     if self.geop.dim == 3:
         geo = pughpore.get_geo(self.solverp.h, **self.geop)
         if geo.params["x0"] is not None:
             molec = nano.curved.Sphere(geo.params["rMolecule"],
                                        geo.params["x0"])
             geo.curved = dict(moleculeb = molec.snap)
     if self.geop.dim == 2:
         geo = pughpore.get_geo_cyl(self.solverp.h, **self.geop)
         if geo.params["x0"] is not None:
             molec = nano.curved.Circle(geo.params["rMolecule"],
                                        geo.params["x0"][::2])
             geo.curved = dict(moleculeb = molec.snap)
     self.geo = geo
Esempio n. 3
0
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 24 11:42:54 2016

@author: gregor
"""
import os
import dolfin
import nanopores.geometries.pughpore as pugh
import nanopores

nanopores.add_params(
    z=0.,
    r=1.,
)
print os.getpid()
geo = pugh.get_geo_cyl(x0=[1., 1., z], rMolecule=r)  #rMolecule=0.15)
dolfin.plot(geo.subdomains)
dolfin.plot(geo.boundaries)
dolfin.interactive()