Pore(Mesh) size in a polymer newtork

Hi,

I need to be able to calculate the mesh size (pore size) in between the chains in my (end-linked) polymer network using my LAMMPS data. Does anyone have any experience doing this either directly in LAMMPS or in a secondary software package?

Yours

Sam Edgecombe
Theoretical Chemistry, Lund

This is a post-processing task. One way it is done is to overlay
a fine mesh on your atom coords and sample points on the mesh.
Define an "overlap" as a mesh point within some cutoff of an atom.
Then you can estimate pore size by the number of clustered
mesh points that are far enough away from any atom.

Steve

Hi,

I need to be able to calculate the mesh size (pore size) in between the
chains in my (end-linked) polymer network using my LAMMPS data. Does anyone
have any experience doing this either directly in LAMMPS or in a secondary
software package?

i would check the net for software to spot holes or cavities in proteins
and particularly for channel proteins. there is a number of tools around
that use different approaches (inscribing spheres of varying size,
overlaying the system with a mesh and cutting away all overlaps with atoms)

cheers,
     axel.

Sam,

How do you define the mesh size or pore size? From my experience and
in the polymer physics point of view, you usually relate the pore/mesh
size with the number of strands or the degree of polymerization of
your polymer between crosslinks. This can be done in lammps by just
"processing" your data file (file read from read_data) and determine
the degree of polymerization between crosslink. You can then relate
shear modulus G with the network mass density, rho (mass per unit
volume) and the number average molar mass of a network strand, Ms. G =
rho*R*T/ Ms. (R is the gas constant).

Jan-Michael

Hi,

I need to be able to calculate the mesh size (pore size) in between the
chains in my (end-linked) polymer network using my LAMMPS data. Does anyone
have any experience doing this either directly in LAMMPS or in a secondary
software package?

Sam,
How do you define the mesh size or pore size?

Do you mean the number of bonds in a loop?
If so, you can try the "simple_cycles()" or "cycle_basis()" functions
in networkx.

http://networkx.lanl.gov/reference/generated/networkx.algorithms.cycles.simple_cycles.html

From this web page:

   "A list of circuits, where each circuit is a list of nodes, with the first :
   and last node being the same. :
   Example: :
   >>> G = nx.DiGraph([(0, 0), (0, 1), (0, 2), (1, 2), (2, 0), (2, 1),
(2, 2)]) :
   >>> nx.simple_cycles(G) :
    [[0, 0], [0, 1, 2, 0], [0, 2, 0], [1, 2, 1], [2, 2]]"

Sam, in this example, the 2nd entry [0, 1, 2, 0] is a loop containing 3 atoms.
This is an unrealistic example for a molecular system because the
other loops are too small (self-loops, or pairs of atoms connected by
multiple bonds). But hopefully it shows how to do it.

--- sample code ---
First, save create a data file for your system, extract the "Bonds"
section and load it into networkx. We covered this in an earlier post
a few days ago:
http://sourceforge.net/mailarchive/message.php?msg_id=29760749

...Then you can iterate through all of the loops in your system and
print out their lengths this way:

  cycles = nx.simple_cycles(G)
  for cycle in cycles:
      print('Number of atoms in loop is: '+str(len(cycle)-1))

    1
    3
    2
    2
    1

Warning: You will have to take care to eliminate loops which are
compositions of smaller loops. (It might also be necessary to embed
your network onto a plane. I'm not sure. You will have to figure
this out.)

After thinking about it further, perhaps you should use the
"cycle_basis()" function instead.

Take a look at:
http://networkx.lanl.gov/reference/generated/networkx.algorithms.cycles.cycle_basis.html#networkx.algorithms.cycles.cycle_basis

(The picture you showed me was not very planar. It was pretty, though.)
Good luck

Andrew

---- forwarded from earlier email correspondence ----

Hi Andrew,

I am looking for some more help with my analysis. I was wondering if you
would be prepared to help.

I want to know how to find the number of a) loops b) loose ends and if
possible the functionality of nodes (by nodes I mean the particles linking
ends of chains, not every node on the graph). Do you know of some nice
algorithms (sam) that could help me do this instead of me just looking at
the outputted file and counting them.

  ------- loops -------
For the loops ("cycles"), have you tried using the "simple_cycles()"
command in networkx?
http://networkx.lanl.gov/reference/generated/networkx.algorithms.cycles.simple_cycles.html

For example, once you have created a graph G from the "Bonds" section
of you data file (previous email), you could use

cycles = nx.simple_cycles(G)
num_cycles = len(cycles) #<-- counts the number of loops

If you like, you can check the size of each cycle and throw away small
or trivial cycles first, for example using code like this:

min_size_cycle = 3

cycles = nx.simple_cycles(G)
i=0
while i < len(cycles):
    cycle = cycles[i]
    if len(cycle)-1 < min_size_cycle:
        del cycles[i]
    else:
        i += 1

num_cycles = len(cycles)

  -------- ends --------

Perhaps there's an easier way to count the ends ("terminal nodes" or
"external nodes"), but would this work?

ends = []
for n in G.nodes():
    if len(G.neighbors(n)) < 2:
        ends.append(n)
num_ends = len(ends)

If that does not work, try replacing "for n in G.nodes():" with
"for n in dfs_preorder_nodes(G):"

It sounds like you are interested in computing the pore size in a 3d cross linked structure. Google pore size distribution and you will find code by Supriyo Bhattacharya which does just this (PSDsolv). I have used the code, modified to read mol2 files to compute the pores sizes in a 3d model of oil shales we have developed. Our structure is not a polymer, but it is a 3d cross linked organic structure (size ~30,000 atoms) and the computed numbers agree with small angle scattering results.

Kevin Gilbert
Serena Software