Example #1
0
args = parser.parse_args()


ff = args.ff
if args.ratio != 0:
  polyhedron = args.shape + "_%05.2f" %args.ratio
else:
  polyhedron = args.shape

if args.periodic:
  celltype = 'periodic'
else:
  celltype = 'walls'

if args.N == 0:
  N = read.get_N("figs/mc/%s-%4.2f-density-%s" %(celltype, ff, polyhedron))
  if N == 0:
    exit(1)
else: N = args.N

if args.hide:
  matplotlib.use('Agg')
from pylab import *

e, densities = read.read_mc_density(ff, polyhedron, N, celltype)
if e == 0:
  exit(1)
length = read.read_mc_dimensions(ff, polyhedron, N, celltype)
print('cell shape: ', length)
dims = ['x', 'y', 'z']
colors = ['r', 'b', 'k']
Example #2
0
args = parser.parse_args()

ff = args.ff
if args.ratio != 0:
  polyhedron = args.shape + "_%05.2f" %args.ratio
else:
  polyhedron = args.shape

if args.periodic:
  celltype = 'periodic'
else:
  celltype = 'walls'

if args.N == 0:
  N = read.get_N("figs/mc/%s-%4.2f-g-%s" %(celltype, ff, polyhedron))
  if N == 0:
    exit(1)
else: N = args.N

if args.hide:
  matplotlib.use('Agg')
from pylab import *


names, data = read.read_mc_g(ff, polyhedron, N, celltype)
colors = ['k', 'b', 'c', 'r', 'g', 'g']
xmax = max(data[:,0])
xlim(0,xmax)

for i in xrange(1, len(names)):
Example #3
0
  ff = args.ff
  if args.ratio != 0:
    polyhedron = args.shape + "_%05.2f" %args.ratio
  else:
    polyhedron = args.shape
  frames = args.frames

  if args.periodic:
    celltype = 'periodic'
  else:
    celltype = 'walls'
  print ("Using %s with %s" %(polyhedron, celltype))

  if args.N == 0:
    N = read.get_N("figs/mc/vertices/%s-%4.2f-vertices-%s" %(celltype, ff, polyhedron))
    if N == 0:
      exit(1)
  else: N = args.N

  if (args.xmin == 0 and args.xmax == 1000 and args.ymin == 0 and args.ymax == 1000 and
      args.zmin == 0 and args.zmax == 1000):
    partial_cell = False
  else: partial_cell = True


  # ------------------------------------------------------------------------------
  # Inital plot setup
  # ------------------------------------------------------------------------------
  figure = mlab.figure(bgcolor=(1,1,1), fgcolor=(0,0,0), size=(1024,768))
Example #4
0
    ff = args.ff
    if args.ratio != 0:
        polyhedron = args.shape + "_%05.2f" % args.ratio
    else:
        polyhedron = args.shape
    frames = args.frames

    if args.periodic:
        celltype = 'periodic'
    else:
        celltype = 'walls'
    print(("Using %s with %s" % (polyhedron, celltype)))

    if args.N == 0:
        N = read.get_N("figs/mc/vertices/%s-%4.2f-vertices-%s" %
                       (celltype, ff, polyhedron))
        if N == 0:
            exit(1)
    else:
        N = args.N

    if (args.xmin == 0 and args.xmax == 1000 and args.ymin == 0
            and args.ymax == 1000 and args.zmin == 0 and args.zmax == 1000):
        partial_cell = False
    else:
        partial_cell = True

    # ------------------------------------------------------------------------------
    # Inital plot setup
    # ------------------------------------------------------------------------------
    figure = mlab.figure(bgcolor=(1, 1, 1),
Example #5
0
    help='will use periodic cell - defaults to walls otherwise')
parser.add_argument('--hide',
                    action='store_true',
                    help='will just save the plot and won\'t display it')
args = parser.parse_args()

ff = args.ff
polyhedron = args.shape

if args.periodic:
    celltype = 'periodic'
else:
    celltype = 'walls'

if args.N == 0:
    N = read.get_N("figs/mc/%s-%4.2f-order-%s" % (celltype, ff, polyhedron))
    if N == 0:
        exit(1)
else:
    N = args.N

if args.hide:
    matplotlib.use('Agg')
from pylab import *

order_parameters = read.read_mc_order(ff, polyhedron, N, celltype)

dim = read.read_mc_dimensions(ff, polyhedron, N, celltype)
dz = dim[2] / len(order_parameters[0, :])
dcostheta = 1 / len(order_parameters[:, 0])
print dz