### Hello, world!

HELLO, WORLD!

This is MathJax: $E=mc^2$ and

$$

\begin{equation}

L =

\begin{cases}

1 & \text{if $i = j$ and $deg_j \neq 0 $} \\

stuff & \text{if $(i, j) \in E$} \\

0 & \text{otherwise}

\end{cases}

\end{equation}

$$

- Get link
- Other Apps

HELLO, WORLD!

This is MathJax: $E=mc^2$ and

$$

\begin{equation}

L =

\begin{cases}

1 & \text{if $i = j$ and $deg_j \neq 0 $} \\

stuff & \text{if $(i, j) \in E$} \\

0 & \text{otherwise}

\end{cases}

\end{equation}

$$

- Get link
- Other Apps

The overall procedure is generating Mesh() , MeshValueCollection objects first, and reading information into them. Then generating MeshFunctionSizet accordingly to define dx , ds ... for subdomains. Step 0. Open corresponding XDMF files; e.g., with XDMFFile(MPI.comm_world, "mesh.xdmf") as xdmf_infile: Step 1. Create Mesh object, using mesh = dolfin.cpp.mesh.Mesh() Step 2. Read Mesh from XDMF file, e.g., xdmf_infile.read(mesh) Step 3. Create MeshValueCollection object as container of subdomain information; mvc_subdomain = dolfin.MeshValueCollection("size_t", mesh, mesh.topology().dim()) Step 4. Read subdomain information, xdmf_infile.read(mvc_subdomain, "name-to-read") The "name-to-read" here is the name given in XDMF file generated by meshio . Step 5. Using step 3, 4 to read boundaries (open another file if necessary): mvc_boundaries = dolfin.MeshValueCollection("size_t", mesh, mesh.topology().dim()-1) xdmf_infile.rea

Persistence length $L_p$ is a basic mechanical property quantifying the bending stiffness of a polymer and is defined as the relaxation of $\langle\cos(\theta)\rangle$ of bond angles of the polymer chain: $$ \langle\cos(\theta(s))\rangle = \exp(-sl/L_p) $$ The problem of calculating $L_p$ becomes calculating $\langle\cos(\theta(s))\rangle$, if we choose the $\theta$ as the angle of adjacent bonds, i.e., $s=1$, we have: $$ \langle\cos(\theta)\rangle = \exp(-l/L_p) $$ in simulations, the stiffness constant is given by a bending energy $U_b$, when $U_b$ is large, where excluded volume effect is negligible, we can calculate $\langle\cos(\theta)\rangle$ as $$\langle\cos(\theta)\rangle=\frac{\int_0^\pi \cos(\theta)\sin(\theta)\exp(-\beta U_b)\mathrm{d}\theta}{\int_0^\pi\sin(\theta)\exp(-\beta U_b)\mathrm{d}\theta}$$ the $\sin(\theta)$ is a geometric weight that when 2 bonds are at an angle of $\theta$, then in 3-D space, the number of bonds is proportion to $\sin(\theta)$. Here is an example

NumPy is the fundamental package for scientific computing with Python. It contains among other things: a powerful N-dimensional array object sophisticated (broadcasting) functions tools for integrating C/C++ and Fortran code useful linear algebra, Fourier transform, and random number capabilities Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases. The ndarray is also the basic data structure of JIT tools like Numba, which boosts python dramatically. Recently, I wrote a program about calculation of the gyration tensor, center of mass and end to end vectors of polymer chain models under periodic boundary condition, and I found that using NumPy and Numba would finish the task in very few lines of codes, and also applicable to various situations. Here is the code: def pbc(r, d): return

Test whether this comment supports MathJax or not.

ReplyDelete$$ E=mc^2 $$