<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel rdf:about="https://community.wolfram.com">
    <title>Community RSS Feed</title>
    <link>https://community.wolfram.com</link>
    <description>RSS Feed for Wolfram Community showing any discussions tagged with Chemistry sorted by most replies.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2411604" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2667943" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/787142" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1575334" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/131302" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1860769" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2546972" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1190717" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1551098" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2927764" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1799757" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1390630" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/172875" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/824832" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/763824" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/337745" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2068787" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1589719" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/828033" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/253270" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2411604">
    <title>[WSG21] Daily Study Group: Differential Equations (begins November 29)</title>
    <link>https://community.wolfram.com/groups/-/m/t/2411604</link>
    <description>A new study group devoted to Differential Equations begins next Monday! A list of daily topics can be found on our [Daily Study Groups][1] page. This group will be led by one of our outstanding Wolfram certified instructors, Luke Titus, and will meet daily, Monday to Friday, over the next three weeks. Luke will share the excellent lesson videos created by him for the upcoming Wolfram U course &amp;#034;[Introduction to Differential Equations][2]&amp;#034;. Study group sessions include time for exercises, discussion and Q&amp;amp;A. This study group will help you achieve the &amp;#034;Course Completion&amp;#034; certificate for the &amp;#034;Introduction to Differential Equations&amp;#034; course after you complete the course quizzes.&#xD;
&#xD;
Sign up: [Study group registration page][3]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolfram.com/wolfram-u/special-event/study-groups/&#xD;
  [2]: https://www.wolfram.com/wolfram-u/introduction-to-differential-equations/&#xD;
  [3]: https://www.bigmarker.com/series/daily-study-group-intro-to-differential-equations/series_details?utm_bmcr_source=community</description>
    <dc:creator>Devendra Kapadia</dc:creator>
    <dc:date>2021-11-22T16:35:30Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2667943">
    <title>How to set up a simple plot of pH against volume of titrant?</title>
    <link>https://community.wolfram.com/groups/-/m/t/2667943</link>
    <description>My very first notebook.  I have the following equation&#xD;
Vb = Va * ((Ca/(1 + H/Ka)) - H + Kw/H) / ((Cb/(1 + Kw/(H*Kb))) + H - &#xD;
     Kw/H)&#xD;
which I have managed to set up in Mathematica.  I have tested it by entering different values of pH one at a time.&#xD;
For given values of Ca, Cb, Ka, Kb, Kw, and Va, I want to plot pH (y-axis) against Vb (x-axis) by specifying a range and increment of pH (e.g., from pH 3.0 to 12.5 in steps of 0.2)&#xD;
I would also like to tabulate the values of pH and Vb.&#xD;
&#xD;
My longer-term goal is to use manipulate to illustrate the effects of changes to Ca, Cb, Ka, Kb, and Va&#xD;
&#xD;
Any help with giving me a kickstart will be much appreciated&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/3408892f-86b1-4033-bb34-39c090f32b45</description>
    <dc:creator>Paul Newton</dc:creator>
    <dc:date>2022-10-23T21:22:41Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/787142">
    <title>Crystallica: A package to plot crystal structures</title>
    <link>https://community.wolfram.com/groups/-/m/t/787142</link>
    <description>## General information and download links ##&#xD;
&#xD;
If you&amp;#039;re interested in crystal structures, you can now download the Crystallica application from the Wolfram Library Archive, and then you can do things like this:&#xD;
&#xD;
    Needs[&amp;#034;Crystallica`&amp;#034;];&#xD;
    CrystalPlot[&#xD;
    {{5.4,0,0},{0,5.4,0},{0,0,5.4}},&#xD;
    {{0,0,0},{0,0,.5},{0,.5,0},{.5,0,0},{.24,.24,.24},{.24,.76,.76},{.76,.24,.76},{.76,.76,.24}},&#xD;
    {1,2,2,2,3,3,3,3},&#xD;
    AtomCol-&amp;gt;{&amp;#034;Firebrick&amp;#034;,&amp;#034;YellowGreen&amp;#034;,White},AtomRad-&amp;gt;.4,&#xD;
    BondStyle-&amp;gt;2,BondDist-&amp;gt;3,&#xD;
    CellLineStyle-&amp;gt;False,AddQ-&amp;gt;True,Lighting-&amp;gt;{{&amp;#034;Directional&amp;#034;,White,ImageScaled[{0,0,1}]}},Background-&amp;gt;Black]&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
Here are the download links for Crystallica and two other packages you may need:&#xD;
&#xD;
[Crystallica][2] - contains the functions `CrystalPlot` and `CrystalChange`&#xD;
&#xD;
[CifImport][3] - contains an import function for CIF files&#xD;
&#xD;
[VaspImport][4] - contains an import function for files related to [VASP][5]&#xD;
&#xD;
Once you&amp;#039;ve installed Crystallica (by saving the entire Crystallica folder - not the zip archive - to `$USerBaseDirectory/Applications` and re-starting the Kernel), you can enter Crystallica into the Documentation Center and you&amp;#039;ll find lots of useful examples. Most of the examples in this post are taken from the Documentation. For the other two packages, just install them and evaluate this:&#xD;
&#xD;
    ?CifImport&#xD;
    ?VaspImport&#xD;
&#xD;
I&amp;#039;ll first show you a few things the `CrystalPlot` function can do when you already have crystal structure data inside Mathematica, wherever it may have come from. Then we&amp;#039;ll take a look at how to get the data into Mathematica in the first place, which is where `CifImport` and `VaspImport` will come into play - but we&amp;#039;ll get data from other sources as well. I&amp;#039;ll cover the different import solutions in separate replies to this thread, because I have a feeling that I&amp;#039;ll be rambling on and on and on...&#xD;
&#xD;
## Simple plot ##&#xD;
&#xD;
Traditional ball-and-stick plots are usually just fine, so the simplest thing you can do is this:&#xD;
&#xD;
    CrystalPlot[&#xD;
    {{4.5,0,0},{0,4.5,0},{0,0,3}},&#xD;
    {{0,0,0},{.5,.5,.5},{.2,.8,.5},{.3,.3,0},{.7,.7,0},{.8,.2,.5}},&#xD;
    {1,1,2,2,2,2}]&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
As you can see, `CrystalPlot` expects three arguments. The first one contains the lattice vectors, which are simply the three vectors that create the parallelepiped that constitutes the cell. The second argument contains the atomic coordinates, but they&amp;#039;re given in the basis of the lattice vectors (which is quite useful in crystallography). The third argument is a list of integers that gives the atom types, with one entry for each atom. If you want to plot a molecule instead, you can call `CrystalPlot` with just two arguments: A list of atom coordinates in cartesian space, and a list of atom types. Everything else you see in the plot - the atoms, bonds, colours, arrows etc. - represents the default settings of various layout options.&#xD;
&#xD;
## Advanced atoms and bonds ##&#xD;
&#xD;
Let&amp;#039;s take a look at some more advanced options just for fun. For instance, atoms and bonds can look any way you need them to, because you can specify your own functions for them. You can also fine-tune where to put bonds and what to do with their thickness and colour in a physically (or chemically) meaningful way, but I won&amp;#039;t show that here. So here are some customized atoms and bonds:&#xD;
&#xD;
    Row[Table[&#xD;
    CrystalPlot[{{4,0,0},{0,4,0},{0,0,4}},{{0,0,0},{.4,.4,.4},{.8,.8,.8}},{1,2,3},&#xD;
    AtomRad-&amp;gt;{.4,1.2,.7},AtomFunction-&amp;gt;style,ImageSize-&amp;gt;400],&#xD;
    {style,{&#xD;
    (Ball[#1,#2]&amp;amp;),&#xD;
    (Scale[Sphere[#1,#2],{1,1,.5}]&amp;amp;),&#xD;
    ({EdgeForm[Thick],Opacity[.7],Cuboid[#1-.5*#2,#1+.5*#2]}&amp;amp;)&#xD;
    }}]]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
    Row[Table[&#xD;
    CrystalPlot[{{0,0,0},{5,0,0},{2.5,4,0}},{1,2,3},BondDist-&amp;gt;6,BondStyle-&amp;gt;style,ImageSize-&amp;gt;400],&#xD;
    {style,{&#xD;
    1,&#xD;
    Function[{bonds,partcol},Table[{If[ii&amp;lt;.5,partcol[#,1],partcol[#,2]],Sphere[bonds[[#,1]]+ii*(bonds[[#,2]]-bonds[[#,1]]),.15]},{ii,0,1,1/9}]&amp;amp;/@Range[Length[bonds]]],&#xD;
    Function[{bonds,partcol},Module[{spiral,points,rad=.05},&#xD;
    spiral[atoms_]:=Module[{scale=.5,dist=atoms[[2]]-atoms[[1]],curls=60,normal,rot,scaled},&#xD;
    normal=Table[{scale*Cos[ii],scale*Sin[ii],.1*ii},{ii,0,curls,\[Pi]/10}];&#xD;
    scaled={#[[1]],#[[2]],10*Norm[dist]/curls*#[[3]]}&amp;amp;/@normal;&#xD;
    rot=scaled.Quiet[RotationMatrix[{dist,{0,0,1}}]];&#xD;
    Join[{atoms[[1]]},#+atoms[[1]]&amp;amp;/@(rot[[25;;-25]]),{atoms[[2]]}]];&#xD;
    points=spiral/@bonds;&#xD;
    {partcol[#,1],Tube[BSplineCurve[points[[#,;;Round[Length[points[[#]]]/2]]],rad]],partcol[#,2],Tube[BSplineCurve[points[[#,Round[Length[points[[#]]]/2];;]],rad]]}&amp;amp;/@Range[Length[bonds]]&#xD;
    ]]&#xD;
    }}]]&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
## Lattice planes ##&#xD;
&#xD;
Crystallica can also add lattice planes to the plot. You can specify them using [h,k,l] Miller indices and distance to the origin.&#xD;
&#xD;
    CrystalPlot[{{3,0,0},{0,3,0},{0,0,3}},{{0,0,0}},{1},&#xD;
    AddQ-&amp;gt;True,AtomRad-&amp;gt;.3,AtomCol-&amp;gt;&amp;#034;CadmiumYellow&amp;#034;,Sysdim-&amp;gt;2,CellLineStyle-&amp;gt;2,&#xD;
    LatticePlanes-&amp;gt;Table[{{1,1,1},dist},{dist,1,5}],ContourStyle-&amp;gt;{&amp;#034;TerreVerte&amp;#034;,Opacity[.7]},BoundaryStyle-&amp;gt;Thick]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
## Coordination polyhedra ##&#xD;
&#xD;
You can automatically search for and plot coordination polyhedra. This is not limited to the commonly occurring tetrahedra and octahedra - you can actually look for polyhedra with arbitrary numbers of corners. There are also options to fine-tune both the searching and the rendering.&#xD;
&#xD;
    plot[corners_,mixed_]:=CrystalPlot[{{0,0,0},{0,0,1.8},{-.9,-1.5,-.6},{-.9,1.5,-.6},{1.7,0,-.6},{.8,.8,.8}},{1,2,2,2,2,3},&#xD;
    BondStyle-&amp;gt;False,ImageSize-&amp;gt;250,&#xD;
    PolyMode[corners]-&amp;gt;{&amp;#034;Show&amp;#034;-&amp;gt;All,&amp;#034;AllowMixed&amp;#034;-&amp;gt;mixed},PolyStyle[corners]-&amp;gt;Directive[Opacity[.5],EdgeForm[Thick]]];&#xD;
    Grid[{{&#xD;
    &amp;#034;&amp;#034;,&#xD;
    &amp;#034;Search for polyhedra with \n4 corners&amp;#034;,&#xD;
    &amp;#034;Search for polyhedra with \n5 corners&amp;#034;&#xD;
    },{&#xD;
    &amp;#034;Allow \nmixed corners&amp;#034;,&#xD;
    plot[4,True],&#xD;
    plot[5,True]&#xD;
    },{&#xD;
    &amp;#034;Don&amp;#039;t allow \nmixed corners&amp;#034;,&#xD;
    plot[4,False],&#xD;
    plot[5,False]&#xD;
    }},Dividers-&amp;gt;All]&#xD;
&#xD;
![enter image description here][10]&#xD;
&#xD;
    CrystalPlot[{{2.5,-4.3,0},{2.5,4.3,0},{0,0,5.5}},&#xD;
    {{.5,0,0},{0,.5,.7},{.5,.5,.3},{.2,.4,.5},{.6,.8,.2},{.2,.8,.8},{.8,.6,.5},{.4,.2,.2},{.8,.2,.8}},{1,1,1,2,2,2,2,2,2},&#xD;
    PolyMode[4]-&amp;gt;True,PolyStyle[4]-&amp;gt;EdgeForm[None],AddQ-&amp;gt;True,&#xD;
    Sysdim-&amp;gt;2,AtomRad-&amp;gt;0,CellLineStyle-&amp;gt;False,AtomCol-&amp;gt;{&amp;#034;SlateGray&amp;#034;,&amp;#034;Firebrick&amp;#034;},&#xD;
    ViewAngle-&amp;gt;.4,ViewPoint-&amp;gt;{3.2,0,1.1},ViewVertical-&amp;gt;{.5,0,1.2}]&#xD;
&#xD;
![enter image description here][11]&#xD;
&#xD;
## Other things ##&#xD;
&#xD;
Visualization aside, you can also build supercells, change cell shapes, or add, remove and sort atoms... but that&amp;#039;s a bit boring to read, so I&amp;#039;ll refer you to the Documentation page of the `CrystalChange` function instead.&#xD;
&#xD;
If you&amp;#039;re interested, we can use this thread to talk about any questions you may have, or you can share your use of the package (if you decide to use it). I&amp;#039;m not offering full support here, but I&amp;#039;ll be floating around, and I&amp;#039;d like to hear your feedback. We don&amp;#039;t have any intentions to be involved in further development. But if you have a good idea and some time, then by all means, work on it for yourself, or host it on your favourite code collaboration site.&#xD;
&#xD;
Bianca Eifert and Christian Heiliger&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=teaser.png&amp;amp;userId=69107&#xD;
  [2]: http://library.wolfram.com/infocenter/MathSource/9372/&#xD;
  [3]: http://library.wolfram.com/infocenter/MathSource/9373/&#xD;
  [4]: http://library.wolfram.com/infocenter/MathSource/9375/&#xD;
  [5]: http://vasp.at/&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=9692simple.png&amp;amp;userId=69107&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=atoms.png&amp;amp;userId=69107&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=bonds.png&amp;amp;userId=69107&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=planes.png&amp;amp;userId=69107&#xD;
  [10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=polys.png&amp;amp;userId=69107&#xD;
  [11]: http://community.wolfram.com//c/portal/getImageAttachment?filename=polys2.png&amp;amp;userId=69107&#xD;
  [12]: http://rruff.geo.arizona.edu/AMS/CIF_text_files/13532_cif.txt&#xD;
  [13]: http://cms.mpi.univie.ac.at/vasp/vasp/POSCAR_file.html&#xD;
  [14]: http://wiki.jmol.org/index.php/File:Caffeine.mol</description>
    <dc:creator>Bianca Eifert</dc:creator>
    <dc:date>2016-02-05T18:43:18Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1575334">
    <title>Get numerical solution of PDE for diffusion at high diffusion rates?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1575334</link>
    <description>I am trying to solve numerically the following PDE with IC and BCs as shown for u(t,x).	&#xD;
&#xD;
    \[PartialD]u/\[PartialD]t = \[PartialD]^2u/\[PartialD]x^2 + p Subscript[(\[PartialD]u/\[PartialD]x), x=0]\[PartialD]u/\[PartialD]x&#xD;
    t = 0, u= 0&#xD;
    x= 0, u= 1&#xD;
    x = 1, u = 0&#xD;
&#xD;
This equation arises in binary diffusion of a species where the diffusion rates are large as opposed to low rates where the second term on the RHS is very small and the PDE becomes identical to the heat conduction equation.  This second term accounts for the convective flow induced by the diffusing species.  The parameter p is related to the surface concentration of the diffusing species (at x = 0).  A closed form solution is available for the case of a semi-infinite region where the last BC becomes x = \[Infinity], u = 0.&#xD;
I tried to use NDSolve and NDSolveValue (code shown below) but I got an error message:&#xD;
NDSolveValue::delpde: Delay partial differential equations are not currently supported by NDSolve.&#xD;
&#xD;
I am unsure if there is (1)a mistake in the code, (2) code is correct but NDSolve cannot provide a solution, or (3) there is a different approach that will work.  Would appreciate any help.  Thanks.&#xD;
&#xD;
    usolh = NDSolveValue[{D[u[t, x], t] == &#xD;
        D[u[t, x], x, x] + 0.5*(D[u[t, x], x] /. x -&amp;gt; 0)*D[u[t, x], x], &#xD;
       u[0, x] == 0, u[t, 0] == 1, u[t, 1] == 0}, &#xD;
      u, {t, 0, 5}, {x, 0, 1}](*we are assuming p=0.5 here*)</description>
    <dc:creator>Rutton Patel</dc:creator>
    <dc:date>2018-12-20T03:09:22Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/131302">
    <title>Plotting electronic orbitals with Wolfram Language</title>
    <link>https://community.wolfram.com/groups/-/m/t/131302</link>
    <description>I am reposting this here from the [url=http://mathematica.blogoverflow.com/]Stackexchange Mathematica blog[/url] so that more people might see it.  I&amp;#039;d be very happy to get some feedback on this plotting function.  If anyone can use the function, let me know how it works out for you, and if you&amp;#039;d recommend any changes.  If so, I can edit this post to have to most up-to-date version.&#xD;
&#xD;
As a chemist it is often useful to plot electronic orbitals.  These are used to describe the wave function of electrons in atoms or molecules.  Typically, these are output from electronic structure software in the form of a cube file, first developed by Gaussian.  These files contain volumetric data for a given orbital on a three-dimensional grid.&#xD;
&#xD;
&#xD;
There exist many applications to visualize cube files, such as [url=http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/cubeplugin.html]VMD [/url]or [url=http://www.gaussian.com/g_tech/gv5ref/results.htm]GaussView[/url], but I wanted to take advantage of Mathematicas  capability to easily combine graphics, as well as the ability to automate the process in order to efficiently create frames for a [url=http://www.pnas.org/content/suppl/2013/09/05/1308604110.DCSupplemental/sm01.mp4]movie[/url].&#xD;
&#xD;
First off, we need a function to extract the data from the cube file. In the process, we will create the text for an XYZ file, a format also developed by Gaussian. The function [b]OutForm[/b] is used here to mimic the printf function found in other programming languages.&#xD;
&#xD;
[mcode]OutForm[num_?NumericQ, width_Integer, ndig_Integer, &#xD;
   OptionsPattern[]] :=&#xD;
  Module[{mant, exp, val},&#xD;
   {mant, exp} = MantissaExponent[num];&#xD;
   mant = ToString[NumberForm[mant, {ndig, ndig}]];&#xD;
   exp = If[Sign[exp] == -1, &amp;#034;-&amp;#034;, &amp;#034;+&amp;#034;] &amp;lt;&amp;gt; IntegerString[exp, 10, 2];&#xD;
   val = mant &amp;lt;&amp;gt; &amp;#034;E&amp;#034; &amp;lt;&amp;gt; exp;&#xD;
   StringJoin@PadLeft[Characters[val], width, &amp;#034; &amp;#034;]&#xD;
   ];&#xD;
&#xD;
ReadCube[cubeFileName_?StringQ] := Module[&#xD;
   {moltxt, nAtoms, lowerCorner, nx, ny, nz, xstep, ystep, zstep, &#xD;
    atoms, desc1, desc2, xyzText, cubeDat, xgrid, ygrid, zgrid, &#xD;
    dummy1, dummy2, atomicNumber, atomx, atomy, atomz, tmpString, &#xD;
    headerTxt,bohr2angstrom},&#xD;
   bohr2angstrom = 0.529177249;&#xD;
   moltxt = OpenRead[cubeFileName];&#xD;
   desc1 = Read[moltxt, String];&#xD;
   desc2 = Read[moltxt, String];&#xD;
   lowerCorner = {0, 0, 0}; &#xD;
   {nAtoms, lowerCorner[[1]], lowerCorner[[2]], lowerCorner[[3]]} = &#xD;
    Read[moltxt, String] // ImportString[#, &amp;#034;Table&amp;#034;][[1]] &amp;amp;;&#xD;
   xyzText = ToString[nAtoms] &amp;lt;&amp;gt; &amp;#034;\n&amp;#034;;&#xD;
   xyzText = xyzText &amp;lt;&amp;gt; desc1 &amp;lt;&amp;gt; desc2 &amp;lt;&amp;gt; &amp;#034;\n&amp;#034;;&#xD;
   {nx, xstep, dummy1, dummy2} = &#xD;
    Read[moltxt, String] // ImportString[#, &amp;#034;Table&amp;#034;][[1]] &amp;amp;;&#xD;
   {ny, dummy1, ystep, dummy2} = &#xD;
    Read[moltxt, String] // ImportString[#, &amp;#034;Table&amp;#034;][[1]] &amp;amp;;&#xD;
   {nz, dummy1, dummy2, zstep} = &#xD;
    Read[moltxt, String] // ImportString[#, &amp;#034;Table&amp;#034;][[1]] &amp;amp;;&#xD;
   Do[&#xD;
    {atomicNumber, dummy1, atomx, atomy, atomz} = &#xD;
     Read[moltxt, String] // ImportString[#, &amp;#034;Table&amp;#034;][[1]] &amp;amp;;&#xD;
    xyzText = If[Sign[lowerCorner[[1]]] == 1,&#xD;
      xyzText &amp;lt;&amp;gt; ElementData[atomicNumber, &amp;#034;Abbreviation&amp;#034;] &amp;lt;&amp;gt; &#xD;
       OutForm[atomx, 17, 7] &amp;lt;&amp;gt; OutForm[atomy, 17, 7] &amp;lt;&amp;gt; &#xD;
       OutForm[atomz, 17, 7] &amp;lt;&amp;gt; &amp;#034;\n&amp;#034;,&#xD;
      xyzText &amp;lt;&amp;gt; ElementData[atomicNumber, &amp;#034;Abbreviation&amp;#034;] &amp;lt;&amp;gt; &#xD;
       OutForm[bohr2angstrom atomx, 17, 7] &amp;lt;&amp;gt; &#xD;
       OutForm[bohr2angstrom atomy, 17, 7] &amp;lt;&amp;gt; &#xD;
       OutForm[bohr2angstrom atomz, 17, 7] &amp;lt;&amp;gt; &amp;#034;\n&amp;#034;];&#xD;
    , {nAtoms}];&#xD;
   cubeDat = &#xD;
    Partition[Partition[ReadList[moltxt, Number, nx ny nz], nz], ny];&#xD;
   Close[moltxt];&#xD;
   moltxt = OpenRead[cubeFileName];&#xD;
   headerTxt = Read[moltxt, Table[String, {2 + 4 + nAtoms}]];&#xD;
   Close[moltxt];&#xD;
   headerTxt = StringJoin@Riffle[headerTxt, &amp;#034;\n&amp;#034;];&#xD;
   xgrid = &#xD;
    Range[lowerCorner[[1]], lowerCorner[[1]] + xstep (nx - 1), xstep];&#xD;
   ygrid = &#xD;
    Range[lowerCorner[[2]], lowerCorner[[2]] + ystep (ny - 1), ystep];&#xD;
   zgrid = &#xD;
    Range[lowerCorner[[3]], lowerCorner[[3]] + zstep (nz - 1), zstep];&#xD;
   {cubeDat, xgrid, ygrid, zgrid, xyzText, headerTxt}&#xD;
   ];[/mcode]&#xD;
If you need to create a cube file, then the following function can be used:&#xD;
[mcode]WriteCube[cubeFileName_?StringQ, headerTxt_?StringQ, cubeData_] := &#xD;
 Module[{stream}, &#xD;
  stream = OpenWrite[cubeFileName, FormatType -&amp;gt; FortranForm];&#xD;
  WriteString[stream, headerTxt, &amp;#034;\n&amp;#034;];&#xD;
  Map[WriteString[stream, ##, &amp;#034;\n&amp;#034;] &amp;amp; @@ &#xD;
     Riffle[ScientificForm[#, {3, 4}, &#xD;
         NumberFormat -&amp;gt; (Row[{#1, &amp;#034;E&amp;#034;, If[#3 == &amp;#034;&amp;#034;, &amp;#034;+00&amp;#034;, #3], &#xD;
              &amp;#034;\t&amp;#034;}] &amp;amp;), NumberPadding -&amp;gt; {&amp;#034;&amp;#034;, &amp;#034;0&amp;#034;}, &#xD;
         NumberSigns -&amp;gt; {&amp;#034;-&amp;#034;, &amp;#034; &amp;#034;}] &amp;amp; /@ #, &amp;#034;\n&amp;#034;, {7, -1, 7}] &amp;amp;, &#xD;
   cubeData, {2}];&#xD;
  Close[stream];][/mcode]Next we need the function to plot the orbital,&#xD;
[mcode]CubePlot[{cub_, xg_, yg_, zg_, xyz_}, plotopts : OptionsPattern[]] := &#xD;
   Module[{xyzplot, bohr2picometer, datarange3D, pr},&#xD;
    bohr2picometer = 52.9177249;&#xD;
    datarange3D = &#xD;
      bohr2picometer {{xg[[1]], xg[[-1]]}, {yg[[1]], &#xD;
         yg[[-1]]}, {zg[[1]], zg[[-1]]}};&#xD;
    xyzplot = ImportString[xyz, &amp;#034;XYZ&amp;#034;];&#xD;
    Show[xyzplot, &#xD;
     ListContourPlot3D[Transpose[cub, {3, 2, 1}], &#xD;
       Evaluate[FilterRules[{plotopts}, Options[ListContourPlot3D]]], &#xD;
       Contours -&amp;gt; {-.02, .02}, ContourStyle -&amp;gt; {Blue, Red}, &#xD;
       DataRange -&amp;gt; datarange3D, MeshStyle -&amp;gt; Gray, &#xD;
       Lighting -&amp;gt; {{&amp;#034;Ambient&amp;#034;, White}}], &#xD;
       Evaluate[&#xD;
        FilterRules[{plotopts}, {ViewPoint, ViewVertical, ImageSize}]]]&#xD;
    ];    [/mcode]Lets look at an example.  First we need to read in a cube file, download this cube file and place it in your base directory:  [url=https://dl.dropboxusercontent.com/s/rdsxcnqudn1s76n/cys-MO35.cube]cys-MO35cube[/url]&#xD;
[mcode]{cubedata,xg,yg,zg,xyz,header}= ReadCube[&amp;#034;cys-MO35.cube&amp;#034;];[/mcode]Then plot it via[mcode]CubePlot[{cubedata, xg, yg, zg, xyz}][/mcode][img=width: 300px; height: 291px;]http://mathematica.blogoverflow.com/files/2013/09/pizCq-300x291.jpg[/img]&#xD;
When I want to create a movie file, I want all the images to have exactly the same [b]ViewAngle[/b], [b]ViewPoint[/b], and [b]ViewCenter[/b].  When you give these options to [b]CubePlot[/b], it feeds them directly to the [b]Show[/b] function&#xD;
[mcode]vp = {ViewCenter -&amp;gt; {0.5, 0.5, 0.5}, &#xD;
   ViewPoint -&amp;gt; {1.072, 0.665, -3.13}, &#xD;
   ViewVertical -&amp;gt; {0.443, 0.2477, 1.527}};&#xD;
&#xD;
&#xD;
CubePlot[{cubedata, xg, yg, zg, xyz}, vp][/mcode][img=width: 280px; height: 300px;]http://mathematica.blogoverflow.com/files/2013/09/Q1mjs-280x300.jpg[/img]&#xD;
Finally, you can also give any options that normally go to [b]ListContourPlot3D[/b][mcode]CubePlot[{cubedata, xg, yg, zg, xyz}, vp, &#xD;
 ContourStyle -&amp;gt; {Texture[ExampleData[{&amp;#034;ColorTexture&amp;#034;, &amp;#034;Vavona&amp;#034;}]], &#xD;
   Texture[ExampleData[{&amp;#034;ColorTexture&amp;#034;, &amp;#034;Amboyna&amp;#034;}]]}, &#xD;
 Contours -&amp;gt; {-.015, .015}][/mcode][img=width: 288px; height: 300px;]http://mathematica.blogoverflow.com/files/2013/09/fLyJ7-288x300.jpg[/img]&#xD;
&#xD;
Many thanks to Daniel Healion for the [b]ReadCube[/b] and [b]WriteCube[/b] functions.</description>
    <dc:creator>Jason Biggs</dc:creator>
    <dc:date>2013-09-27T18:35:45Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1860769">
    <title>Calculate a Sum with fractional iterators (chemistry problem)</title>
    <link>https://community.wolfram.com/groups/-/m/t/1860769</link>
    <description>Hello and happy New year to the Wolfram Team.&#xD;
&#xD;
I recently tried to compute a Sum, used to derive an adsorbtion isotherm (see reference at the end).  The basic equation is a sum of binomials:&#xD;
&#xD;
    Z[N]=Binomial[L/m,Nt]*Product[Binomial[m,n],{n,1,Nt}]*q^Nt &#xD;
    S[N, mu]=Sum[Z[Nt]*a^Nt, {Nt,0,L}]&#xD;
The result is terrible, with lenghty and complicated functions. &#xD;
Somehow the authors of the paper replaced the parameter Nt with a new variable, called &amp;#034;s&amp;#034; and defined as:&#xD;
&#xD;
    s=Sum[n,{n,1,Nt}]/Nt&#xD;
&#xD;
And ended up with this:&#xD;
&#xD;
![this is an extract of the paper, showing the result from the authors][1]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=result.png&amp;amp;userId=1020580&#xD;
&#xD;
The problem is that as Nt is replaced with a function, the program doesn&amp;#039;t recognize the parameter Nt= s/n as an iterator, and sends an error message. In the Wolfram documentation is suggested (see attached printscreen) that there is a way to resolve this obstacle, but I could not find a relevant example.&#xD;
&#xD;
Thank you in advance for your help,&#xD;
&#xD;
Regards,&#xD;
&#xD;
Alberto&#xD;
&#xD;
REFERENCE:&#xD;
&#xD;
F. Kano et al. / Surface Science 467 (2000) 131138&#xD;
&#xD;
&amp;#034;***Fractal model for adsorption on activated carbon surfaces: Langmuir and Freundlich adsorption***&amp;#034;</description>
    <dc:creator>Alberto Silva Ariano</dc:creator>
    <dc:date>2020-01-15T21:42:21Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2546972">
    <title>Converting DNA strands to amino acid chains</title>
    <link>https://community.wolfram.com/groups/-/m/t/2546972</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/9f15876a-0afc-428f-809c-2859aec6189e</description>
    <dc:creator>Samikshaa Natarajan</dc:creator>
    <dc:date>2022-06-08T21:48:48Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1190717">
    <title>The MoleculeViewer package</title>
    <link>https://community.wolfram.com/groups/-/m/t/1190717</link>
    <description>I have just released a package entitled [&amp;#034;MoleculeViewer&amp;#034;][1], whose functionality is exactly what it says on the tin.&#xD;
&#xD;
This package was inspired in part by previous efforts by [@BoB LeSuer][at0] and [@Bianca Eifert][at1]. I took the best parts of [their][2] [packages][3], along with some of the good parts of the built-in molecule renderer, and added a few of my own tweaks. One noticeable tweak would be the depiction of multiple bonds (just like what is done in some physical models), as in the following image:&#xD;
&#xD;
    MoleculeViewer[&amp;#034;thiacloprid&amp;#034;]&#xD;
![thiacloprid][4]&#xD;
&#xD;
The package has a number of other nifty features and auxiliary functions, like highlighting:&#xD;
&#xD;
    MoleculeViewer[&amp;#034;caffeine&amp;#034;, Highlighted -&amp;gt; {&amp;#034;O&amp;#034;, &amp;#034;N&amp;#034; -&amp;gt; Orange}]&#xD;
![caffeine][5]&#xD;
&#xD;
and legends:&#xD;
&#xD;
    MoleculeViewer[RunOpenBabel[GetChemSpider[&amp;#034;calicheamicin&amp;#034;, &amp;#034;InChI&amp;#034;]], PlotLegends -&amp;gt; True]&#xD;
![calicheamicin][6]&#xD;
&#xD;
Before using the package, you will need to install [Open Babel][7] for some of its conversion functionality. Additionally, to use the [ChemSpider][8] search functionality, you will need to [register][9] to obtain an API key.&#xD;
&#xD;
Download the paclet from GitHub and [install in the usual manner][10]. Alternatively, using the technique featured [here][11], evaluate&#xD;
&#xD;
    PacletInstall[&amp;#034;MoleculeViewer&amp;#034;, &amp;#034;Site&amp;#034; -&amp;gt; &amp;#034;http://raw.githubusercontent.com/tpfto/MoleculeViewer/master&amp;#034;]&#xD;
&#xD;
Documentation and a gallery are given as separate notebooks.&#xD;
&#xD;
 [at0]: http://community.wolfram.com/web/bobthechemist&#xD;
 [at1]: http://community.wolfram.com/web/biancaeifert&#xD;
&#xD;
&#xD;
  [1]: https://github.com/tpfto/MoleculeViewer/releases&#xD;
  [2]: https://github.com/biancaeifert/multi-bond-plot&#xD;
  [3]: https://github.com/bobthechemist/molviewer&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=zotu8.png&amp;amp;userId=520181&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=eTaCP.png&amp;amp;userId=520181&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=nlZ63.png&amp;amp;userId=520181&#xD;
  [7]: http://openbabel.org/&#xD;
  [8]: http://www.chemspider.com/&#xD;
  [9]: http://www.chemspider.com/Register.aspx&#xD;
  [10]: https://mathematica.stackexchange.com/a/141888&#xD;
  [11]: https://mathematica.stackexchange.com/questions/155123</description>
    <dc:creator>J. M.</dc:creator>
    <dc:date>2017-09-23T15:31:37Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1551098">
    <title>Modeling jump conditions in interphase mass transfer</title>
    <link>https://community.wolfram.com/groups/-/m/t/1551098</link>
    <description>***NOTE: Download Full Article as a Notebook from the Attachment Below***&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
Interphase mass transfer operations such as gas absorption or liquid-liquid extraction pose a modeling challenge because the molar species concentration can jump between 2 states at the interface as shown below (from [here][2]).&#xD;
![enter image description here][3]&#xD;
I wanted to see if I could create a Finite Element Method (FEM) model of jump conditions in the Wolfram Language. I found the results to be reasonable, aesthetically pleasing, and somewhat mesmerizing. The remainder of this post documents my workflow for those that might be interested.  I have attached a notebook to reproduce the results.&#xD;
## Preamble on analytical solutions to PDE&amp;#039;s&#xD;
&#xD;
There seems to be quite a few posts where people are trying to find the analytical solution to a system of PDE&amp;#039;s. Generally, closed formed analytical solutions only exist in rare-highly symmetric cases.  Let us consider the heat equation below.&#xD;
&#xD;
$$\frac{\partial T}{\partial t}=\alpha \frac{\partial^2 T}{\partial x^2}$$&#xD;
&#xD;
For the case of a semi-infinite bar subjected to a unit step change in temperature at $x=0$, Mathematica&amp;#039;s DSolve\[\] handles this readily.&#xD;
&#xD;
    u[x, t] /. &#xD;
     First@DSolve[{ D[u[x, t], t] == alpha D[u[x, t], {x, 2}], &#xD;
        u[x, 0] == 0, u[0, t] == UnitStep[t]}, u[x, t], {x, t}, &#xD;
       Assumptions -&amp;gt; alpha &amp;gt; 0 &amp;amp;&amp;amp; 0 &amp;lt; x]&#xD;
    (*Erfc[x/(2*Sqrt[alpha]*Sqrt[t])]*)&#xD;
&#xD;
So far so good. Now, let us break symmetry by making it a finite bar of length $l$ (See [Documentation][4]).&#xD;
&#xD;
    heqn = D[u[x, t], t] == alpha D[u[x, t], {x, 2}];&#xD;
    bc = {u[0, t] == 1, u[l, t] == 0};&#xD;
    ic = u[x, 0] == 0;&#xD;
    sol = DSolve[{heqn, bc, ic}, u[x, t], {x, t}]&#xD;
    (*{{u[x, t] -&amp;gt; 1 - x/l - (2*Inactive[Sum][Sin[(Pi*x*K[1])/l]/(E^((alpha*Pi^2*t*K[1]^2)/l^2)*&#xD;
             K[1]), {K[1], 1, Infinity}])/Pi}}*)&#xD;
&#xD;
This little change going from a semi-infinite to finite domain has turned the solution into an unwieldy infinite sum. We should expect that it will only go down hill from here if we add additional complexity to the equation or system of equations. My advice is to abandon the search for an analytical solution quickly because it will likely take great effort and will be unlikely to yield a result. Instead, focus efforts on more productive avenues such as dimensional analysis and numerical solutions.&#xD;
&#xD;
# Introduction&#xD;
&#xD;
&amp;gt;&amp;#034;All models are wrong, some are useful.&amp;#034; -- George E. P. Box&#xD;
&amp;gt;&amp;#034;However, many systems are highly complex, so that valid&#xD;
mathematical models of them are themselves complex, precluding any&#xD;
possibility of an analytical solution. In this case, the model must be studied&#xD;
by means of simulation, i.e. , numerically exercising the model for the inputs&#xD;
in question to see how they affect the output measures of performance.&amp;#034; -- Dr. Averill Law, Simulation Modeling and Analysis&#xD;
&#xD;
I find the quotes above help me overcome inertia when starting a modeling and simulation project.  Create your wrong model.  Calibrate how wrong it is versus a known standard. If it is not too bad, put the model through its paces.&#xD;
&#xD;
One thing that I appreciate about the Wolfram Language is that I can document a modeling workflow development process from beginning to end in a single notebook.  The typical model workflow development process includes:&#xD;
&#xD;
* A sketch of the system of interest.&#xD;
* Equations.&#xD;
    * Initial development.&#xD;
    * Simplification.&#xD;
    * Non-dimensionalization for better scaling and reducing parameter space.&#xD;
* Mathematica implementation.&#xD;
    * Mesh&#xD;
        * Boundaries&#xD;
        * Refinement&#xD;
    * NDSolve set-up&#xD;
    * Post-process results&#xD;
* Verification/Validation&#xD;
&#xD;
Mathematica notebooks tend to age well. I routinely resurrect notebooks that are over a decade old and they generally still work. &#xD;
&#xD;
## Absorption&#xD;
I did a quick Google search on absorption and came across this figure describing gas absorption in an open access article by [Danish _et al_][5].&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
This image looked very similar to an image that I produced in a [related post](http://community.wolfram.com/groups/-/m/t/1470252) to the Wolfram community regarding porous media energy transport.&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
The systems look so similar, that we ought to be able to reuse much of the modeling. An area of concern would be for gas absorption where the ratio of the gas diffusion coefficient to liquid diffusion coefficient can exceed 4 orders of magnitude.  Such differences often can cause instability in numerical approaches.&#xD;
# Modeling&#xD;
## System description&#xD;
For clarity, I always like to begin with a system description. Typically, absorption processes utilize gravity to create a thin liquid film to contact the gas. To reuse the modeling that we did for porous media, we will assume that gravity is in the positive $x$ direction leading us to the image below.&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
We will assume that the liquid film is a uniform thickness and is laminar (note that for gas liquid contact the liquid velocity is fastest at the interface leading to the parabolic profile shown).  We will assume that the gas has a uniform velocity. Further, we will assume that the incoming concentrations of the absorbing species are zero and we will impose a concentration of $C=C_0$ at the lower boundary.&#xD;
&#xD;
The basic dimensions of the box are shown below. For simplicity, we will make the height and length unit dimensions and set $R$ to be $\frac{1}{2}$.&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
## Balance equations&#xD;
### Dilute species balance&#xD;
For the purposes of this exercise, we will consider the system to be dilute such that diffusion does not affect the overall flow velocities. Within a single phase, the molar balance of concentration is given by equation (1). We will assume steady-state operation with no reactions so that we can eliminate the red terms. &#xD;
&#xD;
$${\color{Red}{\frac{{\partial {C}}}{{\partial t}}}} + &#xD;
\mathbf{v} \cdot \nabla C -&#xD;
 \nabla \cdot \mathcal{D} \nabla C - {\color{Red}{r^{&amp;#039;&amp;#039;&amp;#039;}}}&#xD;
 = 0 \qquad (1)$$&#xD;
 &#xD;
### Species balance in each phase&#xD;
For convenience, I will denote the phases by a subscript G and L for gas and liquid with the understanding that these equations could also apply to a liquid-liquid extraction problem.  This leads to the following concentration balance equations for the liquid and gas phases.&#xD;
 &#xD;
$$\begin{gathered} &#xD;
\begin{matrix}&#xD;
\mathbf{v}_L \cdot \nabla C_L +&#xD;
 \nabla \cdot \left(-\mathcal{D}_L \nabla C_L\right)  = 0 &amp;amp; x,y\in \Omega_L  &amp;amp; (2*) \\ &#xD;
\mathbf{v}_G \cdot \nabla C_G +&#xD;
 \nabla \cdot \left(-\mathcal{D}_G \nabla C_G\right)  = 0 &amp;amp; x,y\in \Omega_G  &amp;amp; (3*) \\&#xD;
\end{matrix}&#xD;
\end{gathered}$$&#xD;
&#xD;
Or in Laplacian form&#xD;
&#xD;
$$\begin{gathered} &#xD;
\begin{matrix}&#xD;
\mathbf{v}_L \cdot \nabla C_L -\mathcal{D}_L&#xD;
 \nabla^2 C_L  = 0 &amp;amp; x,y\in \Omega_L  &amp;amp; (2*) \\ &#xD;
\mathbf{v}_G \cdot \nabla C_G -\mathcal{D}_G&#xD;
 \nabla^2 C_G  = 0 &amp;amp; x,y\in \Omega_G  &amp;amp; (3*)  \\&#xD;
\end{matrix}&#xD;
\end{gathered}$$&#xD;
&#xD;
#### Creating a No-Flux Boundary Condition at the Interface&#xD;
To prevent the gas species diffusing into the liquid layer and _vice versa_, I will set the velocities to zero and the diffusion coefficients to a very small value in the other phase.  From a visualization standpoint, it will appear that the gas species has diffused into the liquid layer and _vice versa_, but the flux is effectively zero.  To clean up the visualization, we will define plot ranges by gas, interphase, and liquid regions.&#xD;
&#xD;
### Species balance including a thin interphase region&#xD;
&#xD;
We will define a thin Interphase region between the 2 phases that will allow us to couple the phases in the interphase region via a source term creating the jump discontinuity in concentration as shown in the figure below.&#xD;
&#xD;
![enter image description here][10]&#xD;
&#xD;
We will modify (2\*) and (3\*) with the coupling source term as shown below.&#xD;
&#xD;
$$\begin{gathered} &#xD;
\begin{matrix}&#xD;
\mathbf{v}_L \cdot \nabla C_L -\mathcal{D}_L&#xD;
 \nabla^2 C_L -&#xD;
\sigma\left(\Omega \right )k\left(K C_G-C_L \right ) = 0 &amp;amp; x,y\in \Omega  &amp;amp; (2) \\ &#xD;
\mathbf{v}_G \cdot \nabla C_G -\mathcal{D}_G&#xD;
 \nabla^2 C_G + \sigma\left(\Omega \right )k\left(K C_G-C_L \right ) = 0 &amp;amp; x,y\in \Omega  &amp;amp; (3)  \\&#xD;
\end{matrix}&#xD;
\end{gathered}$$&#xD;
&#xD;
Where $K$ is a vapor-liquid equilibrium constant, $k$ is in interphase mass transfer coefficient (we will make this large because we want a fast approach to equilibrium), and $\sigma$ is a switch that turns on (=1) in the interface region and 0 otherwise.&#xD;
&#xD;
## Dimensional analysis&#xD;
&#xD;
We will multiply equations (2) and (3) by $\frac{{R^2}}{C_0 \mathcal{D}_G}$ to obtain their non-dimensionalized forms (4) and (5).&#xD;
&#xD;
$$\begin{gathered} &#xD;
\begin{matrix}&#xD;
 C_0\left (\frac{\mathbf{v}_L}{R} \cdot \nabla^* C_{L}^{*} -\frac{\mathcal{D}_L}{R^2}&#xD;
 \nabla^{*2} C_{L}^{*} -&#xD;
\sigma\left(\Omega \right )k\left(K C_{G}^{*}-C_{L}^{*} \right )  \right ) =  0\left\| {\frac{{R^2}}{C_0 \mathcal{D}_G}} \right.  \\ &#xD;
C_0\left (\frac{\mathbf{v}_G}{R} \cdot \nabla^* C_{G}^{*} -\frac{\mathcal{D}_G}{R^2}&#xD;
 \nabla^{*2} C_{G}^{*} + \sigma\left(\Omega \right )k\left(K C_{G}^{*}-C_{L}^{*} \right )  \right ) = 0\left\| {\frac{{R^2}}{C_0 \mathcal{D}_G}} \right. \\&#xD;
\end{matrix}&#xD;
\end{gathered}$$&#xD;
&#xD;
$$\begin{gathered} &#xD;
\begin{matrix}&#xD;
\frac{\mathcal{D}_L}{\mathcal{D}_G} \frac{R\mathbf{v}_L}{\mathcal{D}_L} \cdot \nabla^* C_{L}^{*} -\delta &#xD;
 \nabla^{*2} C_{L}^{*} -&#xD;
\sigma\left(\Omega \right )\kappa\left(K C_{G}^{*}-C_{L}^{*} \right )  = 0  \\ &#xD;
\frac{R\mathbf{v}_G}{\mathcal{D}_G} \cdot \nabla^* C_{G}^{*} -&#xD;
 \nabla^{*2} C_{G}^{*} + \sigma\left(\Omega \right )\kappa\left(K C_{G}^{*}-C_{L}^{*} \right ) = 0\\&#xD;
\end{matrix}&#xD;
\end{gathered}$$&#xD;
&#xD;
$$\begin{gathered} &#xD;
\begin{matrix}&#xD;
 \delta{Pe}_L\mathbf{v}_{L}^* \cdot \nabla^* C_{L}^{*} -\delta &#xD;
 \nabla^{*2} C_{L}^{*} -&#xD;
\sigma\left(\Omega \right )\kappa\left(K C_{G}^{*}-C_{L}^{*} \right )  = 0 &amp;amp; (4)  \\ &#xD;
{Pe}_G\mathbf{v}_{G}^* \cdot \nabla^* C_{G}^{*} -&#xD;
 \nabla^{*2} C_{G}^{*} + \sigma\left(\Omega \right )\kappa\left(K C_{G}^{*}-C_{L}^{*} \right ) = 0 &amp;amp;(5)\\&#xD;
\end{matrix}&#xD;
\end{gathered}$$&#xD;
&#xD;
Where&#xD;
&#xD;
$$\delta=\frac{\mathcal{D}_L}{\mathcal{D}_G}$$&#xD;
$$Pe_L=\frac{R\mathbf{v}_L}{\mathcal{D}_L}$$&#xD;
$$Pe_G=\frac{R\mathbf{v}_G}{\mathcal{D}_G}$$&#xD;
&#xD;
With a good dimensionless model in place, we can start with our Wolfram Language implementation.&#xD;
&#xD;
# Wolfram Language Implementation&#xD;
&#xD;
## Mesh creation&#xD;
We start by loading the FEM package.&#xD;
&#xD;
    Needs[&amp;#034;NDSolve`FEM`&amp;#034;]&#xD;
&#xD;
When I started this effort, I considered co-current flow only. I realized that converting the model to counter-current flow was a simple matter of changing boundary markers.  I wrapped the process up in a module that returns an association whose parameters can be used to set up an NDSolve solution.  In the counter-current case, I changed the bottom boundary to a wall and the gas inlet concentration to 1.&#xD;
&#xD;
    makeMesh[h_, l_, rat_, gf_, cf_] := &#xD;
     Module[{bR, tp, bt, lf, rt, th, interfacel, interfaceg, buf, bnds, &#xD;
       rgs, crds, lelms, boundaryMarker, bcEle, bmsh, liquidCenter, &#xD;
       liquidReg, interfaceCenter, interfaceReg, gasCenter, gasReg, &#xD;
       meshRegs, msh, mDic},&#xD;
      (* Domain Dimensions *)&#xD;
      bR = rat h;&#xD;
      tp = bR;&#xD;
      bt = bR - h;&#xD;
      lf = 0;&#xD;
      rt = l;&#xD;
      th = h/gf;&#xD;
      interfacel = 0;&#xD;
      interfaceg = interfacel - th;&#xD;
      buf = 2.5 th;&#xD;
      &#xD;
      (* Use associations for clearer assignment later *)&#xD;
      bnds = &amp;lt;|liquidinlet -&amp;gt; 1, gasinlet -&amp;gt; 2, bottom -&amp;gt; 3|&amp;gt;;&#xD;
      rgs = &amp;lt;|gas -&amp;gt; 10, liquid -&amp;gt; 20, interface -&amp;gt; 15|&amp;gt;;&#xD;
      &#xD;
      (* Meshing Definitions *)&#xD;
      (* Coordinates *)&#xD;
      crds = {{lf, bt}(*1*), {rt, bt}(*2*), {rt, tp}(*3*), {lf, &#xD;
         tp}(*4*), {lf, interfacel}(*5*), {rt, interfacel}(*6*), {lf, &#xD;
         interfaceg}(*7*), {rt, interfaceg}(*8*)};&#xD;
      &#xD;
      (* Edges *)&#xD;
      lelms = {{1, 7}, {7, 5}, {5, 4}, {1, 2},&#xD;
               {2, 8}, {8, 6}, {6, 3}, {3, 4}, &#xD;
               {5, 6}, {7, 8}};&#xD;
      &#xD;
      (* Conditional Boundary Markers depending on configuration *)&#xD;
      boundaryMarker := {bnds[gasinlet], bnds[liquidinlet], &#xD;
         bnds[liquidinlet], bnds[bottom], 4, 4, 4, 4, 4, 4} /; cf == &amp;#034;Co&amp;#034;;&#xD;
      boundaryMarker := {4, 4, bnds[liquidinlet], bnds[bottom], &#xD;
         bnds[gasinlet], 4, 4, 4, 4, 4} /; cf == &amp;#034;Counter&amp;#034;;&#xD;
      &#xD;
      (* Create Boundary Mesh *)&#xD;
      bcEle = {LineElement[lelms, boundaryMarker]};&#xD;
      bmsh = ToBoundaryMesh[&amp;#034;Coordinates&amp;#034; -&amp;gt; crds, &#xD;
        &amp;#034;BoundaryElements&amp;#034; -&amp;gt; bcEle];&#xD;
      &#xD;
      (* 2D Regions *)&#xD;
      (* Identify Center Points of Different Material Regions *)&#xD;
      liquidCenter = {(lf + rt)/2, (tp + interfacel)/2};&#xD;
      liquidReg = {liquidCenter, rgs[liquid], 0.0005};&#xD;
      interfaceCenter = {(lf + rt)/2, (interfacel + interfaceg)/2};&#xD;
      interfaceReg = {interfaceCenter, rgs[interface], 0.5*0.000005};&#xD;
      gasCenter = {(lf + rt)/2, (bt + interfaceg)/2};&#xD;
      gasReg = {gasCenter, rgs[gas], 0.0005};&#xD;
      meshRegs = {liquidReg, interfaceReg, gasReg};&#xD;
      &#xD;
      msh = ToElementMesh[bmsh, &amp;#034;RegionMarker&amp;#034; -&amp;gt; meshRegs,&#xD;
        MeshRefinementFunction -&amp;gt; Function[{vertices, area},&#xD;
          Block[{x, y},&#xD;
           {x, y} = Mean[vertices];&#xD;
           If[&#xD;
            (y &amp;gt; interfaceCenter[[2]] - buf &amp;amp;&amp;amp;&#xD;
                y &amp;lt; interfaceCenter[[2]] + buf)  ||&#xD;
             (y &amp;lt; bt + 1.5 buf &amp;amp;&amp;amp;&#xD;
                x &amp;lt; lf + 1.5 buf)&#xD;
            , area &amp;gt; 0.0000125, area &amp;gt; 0.01&#xD;
            ]&#xD;
           ]&#xD;
          ]&#xD;
        ];&#xD;
      &#xD;
      mDic = &amp;lt;|&#xD;
        height -&amp;gt; h,&#xD;
        length -&amp;gt; l,&#xD;
        ratio -&amp;gt; rat,&#xD;
        gapfactor -&amp;gt; gf,&#xD;
        r -&amp;gt; bR,&#xD;
        top -&amp;gt; tp,&#xD;
        bot -&amp;gt; bt,&#xD;
        left -&amp;gt; lf,&#xD;
        right -&amp;gt; rt,&#xD;
        intl -&amp;gt; interfacel,&#xD;
        intg -&amp;gt; interfaceg,&#xD;
        intcx -&amp;gt; interfaceCenter[[1]],&#xD;
        intcy -&amp;gt; interfaceCenter[[2]],&#xD;
        buffer -&amp;gt; buf,&#xD;
        mesh -&amp;gt; msh,&#xD;
        bmesh -&amp;gt; bmsh,&#xD;
        bounds -&amp;gt; bnds,&#xD;
        regs -&amp;gt; rgs,&#xD;
        cfg -&amp;gt; cf&#xD;
        |&amp;gt;;&#xD;
      mDic]&#xD;
    &#xD;
    Options[meshfn] = {height -&amp;gt; 1, length -&amp;gt; 1, ratio -&amp;gt; 0.5, &#xD;
       gapfactor -&amp;gt; 100, config -&amp;gt; &amp;#034;Co&amp;#034;};&#xD;
    meshfn[OptionsPattern[]] := &#xD;
     makeMesh[OptionValue[height], OptionValue[length],&#xD;
      OptionValue[ratio], OptionValue[gapfactor], OptionValue[config]]&#xD;
&#xD;
We can create a mesh instance of a co-current flow case by invoking the meshfn\[\]. I will color the liquid inlet $\color{Green}{Green}$, the gas inlet $\color{Red}{Red}$ and the bottom boundary $\color{Orange}{Orange}$ (the rest of the boundaries are default).&#xD;
&#xD;
    mDicCo = meshfn[config -&amp;gt; &amp;#034;Co&amp;#034;];&#xD;
    mDicCo[bmesh][&#xD;
     &amp;#034;Wireframe&amp;#034;[&amp;#034;MeshElementMarkerStyle&amp;#034; -&amp;gt; Blue, &#xD;
      &amp;#034;MeshElementStyle&amp;#034; -&amp;gt; {Green, Red, Orange, Black}, &#xD;
      ImageSize -&amp;gt; Large]]&#xD;
&#xD;
![enter image description here][11]&#xD;
&#xD;
By setting the optional config parameter to &amp;#034;Counter&amp;#034;, we can easily generate a counter-current case as shown below (note how the gas inlet shifted to the right side.&#xD;
&#xD;
    mDic = meshfn[config -&amp;gt; &amp;#034;Counter&amp;#034;];&#xD;
    mDic[bmesh][&#xD;
     &amp;#034;Wireframe&amp;#034;[&amp;#034;MeshElementMarkerStyle&amp;#034; -&amp;gt; Blue, &#xD;
      &amp;#034;MeshElementStyle&amp;#034; -&amp;gt; {Green, Red, Orange, Black}, &#xD;
      ImageSize -&amp;gt; Large]]&#xD;
&#xD;
![enter image description here][12]&#xD;
&#xD;
For the co-current case, the bottom wall and the gas inlet have inconsistent Dirichlet conditions.  To reduce the effect, I refined the mesh in the lower left corner as shown below.&#xD;
&#xD;
![enter image description here][13]&#xD;
&#xD;
I also meshed the interface region finely.&#xD;
&#xD;
![enter image description here][14]&#xD;
&#xD;
Sometimes it can get confusing to setup alternative boundaries.  To visualize the coordinate IDs, you could use something like:&#xD;
&#xD;
    With[{pts = mDic[bmesh][&amp;#034;Coordinates&amp;#034;]}, &#xD;
     Graphics[{Opacity[1], Black, &#xD;
       GraphicsComplex[pts, &#xD;
        Text[Style[ToString[#], Background -&amp;gt; White, 12], #] &amp;amp; /@ &#xD;
         Range[Length[pts]]]}]]&#xD;
&#xD;
![enter image description here][15]&#xD;
&#xD;
## Solving and Visualization&#xD;
&#xD;
I have created a module that will solve and visualize depending on the mesh type (co-flow or counter-flow).  Hopefully, it is well enough commented that further discussion is not needed.&#xD;
&#xD;
    model[md_, kequil_, d_, pel_, peg_, title_] := &#xD;
      Module[{n, pecletgas, por, vl, vg, fac, facg, coefl, coefg, &#xD;
        dcliquidinletliquid, dcliquidinletgas, dcinletgas, &#xD;
        dcgasinletliquid, dcgasinletgas, dcbottomliquid, dcbottomgas, &#xD;
        eqnliquid, eqngas, eqns, ifun, pltl, pltint, pltg, pltarr, sz, &#xD;
        grid, lf, rt, tp, bt, interfaceg, interfacel, interfaceCenterY, &#xD;
        plrng, arrequil, arrdiff, arrgas, &#xD;
        arrliq},&#xD;
       (*localize Mesh Dict Values*)lf = md[left];&#xD;
       rt = md[right];&#xD;
       tp = md[top];&#xD;
       bt = md[bot];&#xD;
       interfaceg = md[intg];&#xD;
       interfacel = md[intl];&#xD;
       interfaceCenterY = md[intcy];&#xD;
       (*Must swtich gas flow direction for counter-flow*)&#xD;
       pecletgas = If[md[cfg] == &amp;#034;Co&amp;#034;, peg, -peg];&#xD;
       (*Dimensionless Mass Transfer Coefficient in Interphase Region*)&#xD;
       n = 10000;&#xD;
       (*&amp;#034;Porosity&amp;#034; to weight concentration in interphase*)&#xD;
       por[y_, intg_, intl_] := (y - intg)/(intl - intg);&#xD;
       (*Region Dependent Properties with Piecewise \&#xD;
    Functions*)(*velocity*)(*Liquid parabolic profile*)&#xD;
       vl = Evaluate[&#xD;
         Piecewise[{{{pel d (1 - (y/md[r])^2), 0}, &#xD;
            ElementMarker == md[regs][liquid]}, {{pecletgas, 0}, &#xD;
            ElementMarker == md[regs][gas]}, {{0, 0}, True}}]];&#xD;
       (*Gas Uniform Velocity*)&#xD;
       vg = Evaluate[&#xD;
         Piecewise[{{{pecletgas, 0}, &#xD;
            ElementMarker == md[regs][gas]}, {{pel d (1 - (y/md[r])^2), &#xD;
             0}, ElementMarker == md[regs][liquid]}, {{0, 0}, True}}]];&#xD;
       (*fac switches on mass transfer coefficient in interphase*)&#xD;
       fac = Evaluate[If[ElementMarker == md[regs][interface], n, 0]];&#xD;
       (*diffusion coefficients*)(*Liquid*)&#xD;
       coefl = Evaluate[&#xD;
         Piecewise[{{d, ElementMarker == md[regs][liquid]}, {1, &#xD;
            ElementMarker == md[regs][interface]}, {d/1000000, &#xD;
            True} (*Effectively No Flux at Interface*)}]];&#xD;
       (*Gas*)coefg = &#xD;
        Evaluate[&#xD;
         Piecewise[{{1, ElementMarker == md[regs][gas]}, {1, &#xD;
            ElementMarker == md[regs][interface]}, {d/1000000, &#xD;
            True} (*Effectively No Flux at Interface*)}]];&#xD;
       (*Dirichlet Conditions for Liquid at Inlets*)&#xD;
       dcliquidinletliquid = &#xD;
        DirichletCondition[cl[x, y] == 0, &#xD;
         ElementMarker == md[bounds][liquidinlet]];&#xD;
       dcliquidinletgas = &#xD;
        DirichletCondition[cg[x, y] == 0, &#xD;
         ElementMarker == md[bounds][liquidinlet]];&#xD;
       dcgasinletliquid = &#xD;
        DirichletCondition[cl[x, y] == 0, &#xD;
         ElementMarker == md[bounds][gasinlet]];&#xD;
       (*Conditional BCs for gas dependent on configuration*)&#xD;
       dcgasinletgas := &#xD;
        DirichletCondition[cg[x, y] == 0, &#xD;
          ElementMarker == md[bounds][gasinlet]] /; md[cfg] == &amp;#034;Co&amp;#034;;&#xD;
       dcgasinletgas := &#xD;
        DirichletCondition[cg[x, y] == 1, &#xD;
          ElementMarker == md[bounds][gasinlet]] /; md[cfg] == &amp;#034;Counter&amp;#034;;&#xD;
       (*Dirichlet Conditions for the Bottom Wall*)&#xD;
       dcbottomliquid = &#xD;
        DirichletCondition[cl[x, y] == 0, &#xD;
         ElementMarker == md[bounds][bottom]];&#xD;
       dcbottomgas = &#xD;
        DirichletCondition[cg[x, y] == 1, &#xD;
         ElementMarker == md[bounds][bottom]];&#xD;
       (*Balance Equations for Gas and Liquid Concentrations*)&#xD;
       eqnliquid = &#xD;
        vl.Inactive[Grad][cl[x, y], {x, y}] - &#xD;
          coefl Inactive[Laplacian][cl[x, y], {x, y}] - &#xD;
          fac (kequil cg[x, y] - cl[x, y]) == 0;&#xD;
       eqngas = &#xD;
        vg.Inactive[Grad][cg[x, y], {x, y}] - &#xD;
          coefg Inactive[Laplacian][cg[x, y], {x, y}] + &#xD;
          fac (kequil cg[x, y] - cl[x, y]) == 0;&#xD;
       (*Equations to be solved depending on configuration*)&#xD;
       eqns := {eqnliquid, eqngas, dcliquidinletliquid, dcliquidinletgas, &#xD;
          dcgasinletliquid, dcgasinletgas, dcbottomliquid, dcbottomgas} /;&#xD;
          md[cfg] == &amp;#034;Co&amp;#034;;&#xD;
       eqns := {eqnliquid, eqngas, dcliquidinletliquid, dcliquidinletgas, &#xD;
          dcgasinletliquid, dcgasinletgas} /; md[cfg] == &amp;#034;Counter&amp;#034;;&#xD;
       (*Solve the PDE*)&#xD;
       ifun = NDSolveValue[eqns, {cl, cg}, {x, y} \[Element] md[mesh]];&#xD;
       (*Visualizations*)(*Create Arrows to represent magnitude of \&#xD;
    dimensionless groups*)(*Equilibrium Arrow*)&#xD;
       arrequil = {CapForm[&amp;#034;Square&amp;#034;], Red, Arrowheads[0.03], &#xD;
         Arrow[Tube[{{1 - 0.0125, 0.025, 1}, {1 - 0.0125, 0.025, kequil}},&#xD;
            0.005], -0.03]};&#xD;
       (*Diffusion Arrow*)&#xD;
       arrdiff = {Darker[Green, 1/2], &#xD;
         Arrowheads[0.03, Appearance -&amp;gt; &amp;#034;Flat&amp;#034;], &#xD;
         Arrow[Tube[{{-0.025, 0.0, 0.0 .025}, {-0.025, &#xD;
             0.5 (1 + Log10[d]/4), 0.025}}, 0.005], -0.03]};&#xD;
       (*Liquid Peclet Arrow*)&#xD;
       arrliq = {Blue, Dashed, Arrowheads[1.5 0.03], &#xD;
         Arrow[Tube[{{0.0, mDic[top] + 0.025, 0.035}, {pel/50, &#xD;
             mDic[top] + 0.025, 0.035}}, 1.5 0.005], -0.03 1.5]};&#xD;
       (*Conditional Gas Peclet Arrow*)&#xD;
       arrgas := {Black, Dashed, Arrowheads[1.5 0.03], &#xD;
          Arrow[Tube[{{0.0, mDic[bot], 1.035}, {peg/50, mDic[bot], &#xD;
              1.035}}, 1.5 0.005], -0.03 1.5]} /; md[cfg] == &amp;#034;Co&amp;#034;;&#xD;
       arrgas := {Black, Dashed, Arrowheads[1.5 0.03], &#xD;
          Arrow[Tube[{{mDic[right], mDic[bot], &#xD;
              1.035}, {mDic[right] - peg/50, mDic[bot], 1.035}}, &#xD;
            1.5 0.005], -0.03 1.5]} /; md[cfg] == &amp;#034;Counter&amp;#034;;&#xD;
       (*Set up plots*)(*Common plot options*)&#xD;
       plrng = {{lf, rt}, {bt, tp}, {0, 1}};&#xD;
       SetOptions[Plot3D, PlotRange -&amp;gt; plrng, PlotPoints -&amp;gt; {200, 200}, &#xD;
        ColorFunction -&amp;gt; &#xD;
         Function[{x, y, z}, Directive[ColorData[&amp;#034;DarkBands&amp;#034;][z]]], &#xD;
        ColorFunctionScaling -&amp;gt; False, MeshFunctions -&amp;gt; {#3 &amp;amp;}, &#xD;
        Mesh -&amp;gt; 18, AxesLabel -&amp;gt; Automatic, ImageSize -&amp;gt; Large];&#xD;
       (*Liquid Plot*)&#xD;
       pltl = Plot3D[ifun[[1]][x, y], {x, lf, rt}, {y, interfacel, tp}, &#xD;
         MeshStyle -&amp;gt; {Black, Thick}];&#xD;
       (*Interface region Plot*)&#xD;
       pltint = &#xD;
        Plot3D[ifun[[2]][x, y] (1 - por[y, interfaceg, interfacel]) + &#xD;
          por[y, interfaceg, interfacel] ifun[[1]][x, y], {x, lf, rt}, {y,&#xD;
           interfaceg, interfacel}, &#xD;
         MeshStyle -&amp;gt; {DotDashed, Black, Thick}];&#xD;
       (*Gas Plot*)&#xD;
       pltg = Plot3D[ifun[[2]][x, y], {x, lf, rt}, {y, bt, interfaceg}, &#xD;
         MeshStyle -&amp;gt; {Dashed, Black, Thick}];&#xD;
       (*Grid Plot*)sz = 300;&#xD;
       grid = &#xD;
        Grid[{{Show[{pltl, pltint, pltg}, &#xD;
            ViewProjection -&amp;gt; &amp;#034;Orthographic&amp;#034;, ViewPoint -&amp;gt; Front, &#xD;
            ImageSize -&amp;gt; sz, Background -&amp;gt; RGBColor[0.84`, 0.92`, 1.`], &#xD;
            Boxed -&amp;gt; False], &#xD;
           Show[{pltl, pltint, pltg}, ViewProjection -&amp;gt; &amp;#034;Orthographic&amp;#034;, &#xD;
            ViewPoint -&amp;gt; Left, ImageSize -&amp;gt; sz, &#xD;
            Background -&amp;gt; RGBColor[0.84`, 0.92`, 1.`], &#xD;
            Boxed -&amp;gt; False]}, {Show[{pltl, pltint, pltg}, &#xD;
            ViewProjection -&amp;gt; &amp;#034;Orthographic&amp;#034;, ViewPoint -&amp;gt; Top, &#xD;
            ImageSize -&amp;gt; sz, Background -&amp;gt; RGBColor[0.84`, 0.92`, 1.`], &#xD;
            Boxed -&amp;gt; False], &#xD;
           Show[{pltl, pltint, pltg}, ViewProjection -&amp;gt; &amp;#034;Perspective&amp;#034;, &#xD;
            ViewPoint -&amp;gt; {Above, Left, Back}, ImageSize -&amp;gt; sz, &#xD;
            Background -&amp;gt; RGBColor[0.84`, 0.92`, 1.`], Boxed -&amp;gt; False]}}, &#xD;
         Dividers -&amp;gt; Center];&#xD;
       (*Reset Plot Options to Default*)&#xD;
       SetOptions[Plot3D, PlotStyle -&amp;gt; Automatic];&#xD;
       pltarr = &#xD;
        Grid[{{Text[Style[title, Blue, Italic, 24]]}, {Style[&#xD;
            StringForm[&#xD;
             &amp;#034;\!\(\*SubscriptBox[\(K\), \(C\)]\)=``, \[Delta]=``, \&#xD;
    \!\(\*SubscriptBox[\(Pe\), \(L\)]\)=``, and \&#xD;
    \!\(\*SubscriptBox[\(Pe\), \(G\)]\)=``&amp;#034;, &#xD;
             NumberForm[kequil, {3, 2}, NumberPadding -&amp;gt; {&amp;#034; &amp;#034;, &amp;#034;0&amp;#034;}], &#xD;
             NumberForm[d, {5, 4}, NumberPadding -&amp;gt; {&amp;#034; &amp;#034;, &amp;#034;0&amp;#034;}], &#xD;
             NumberForm[pel, {2, 1}, NumberPadding -&amp;gt; {&amp;#034; &amp;#034;, &amp;#034;0&amp;#034;}], &#xD;
             NumberForm[peg, {2, 1}, NumberPadding -&amp;gt; {&amp;#034; &amp;#034;, &amp;#034;0&amp;#034;}]], &#xD;
            18]}, {Show[{pltl, pltint, pltg, &#xD;
             Graphics3D[{arrequil, arrdiff, arrliq, arrgas}](*,arrequil,&#xD;
             arrdiff,arrliq,arrgas*)}, ViewProjection -&amp;gt; &amp;#034;Perspective&amp;#034;, &#xD;
            ViewPoint -&amp;gt; {Above, Left, Back}, ImageSize -&amp;gt; 640, &#xD;
            Background -&amp;gt; RGBColor[0.84`, 0.92`, 1.`], Boxed -&amp;gt; False, &#xD;
            PlotRange -&amp;gt; {{md[left] - 0.05, md[right]}, {md[bot], &#xD;
               md[top] + 0.05}, {0, 1 + 0.1}}]}}];&#xD;
       (*Return values*){ifun, {pltl, pltint, pltg}, pltarr, grid}];&#xD;
    &#xD;
    Options[modelfn] = {md -&amp;gt; mDic, k -&amp;gt; 0.5, dratio -&amp;gt; 1, pel -&amp;gt; 50, &#xD;
       peg -&amp;gt; 50, title -&amp;gt; &amp;#034;Test&amp;#034;};&#xD;
    modelfn[OptionsPattern[]] := &#xD;
     model[OptionValue[md], OptionValue[k], OptionValue[dratio], &#xD;
      OptionValue[pel], OptionValue[peg], OptionValue[title]]&#xD;
&#xD;
## Testing of Meshing and Solving Modules&#xD;
Now, that we wrapped our meshing and solving work flow into modules, I will demonstrate how to create an instance of a simulation.&#xD;
&#xD;
    (* Create a Co-Flow Mesh *)&#xD;
    mDic = meshfn[config -&amp;gt; &amp;#034;Co&amp;#034;];&#xD;
    (* Simulate and return results *)&#xD;
    res = modelfn[md -&amp;gt; mDic, k -&amp;gt; 0.5, dratio -&amp;gt; 0.1, pel -&amp;gt; 10, &#xD;
       peg -&amp;gt; 5, title -&amp;gt; &amp;#034;Co-Flow&amp;#034;];&#xD;
&#xD;
To visualize a 3D plot with arrows representing the magnitude of dimensionless parameters, we access the third part of the results list.&#xD;
&#xD;
    res[[3]]&#xD;
&#xD;
![enter image description here][16]&#xD;
&#xD;
The solid lines, dashed lines, and dashed-dotted lines represent contours of species concentration in the liquid, gas, and interphase regions, respectively.  The $\color{Red}{Red}$ arrow is proportional to (1-K), the $\color{Green}{Green}$ arrow is proportional to the log of the diffusion ratio $\delta$, the $\color{Blue}{Blue}$ arrow is proportional to $Pe_L$, and the $\color{Black}{Black}$ arrow is proportional to $Pe_G$.  Multiple views are contained in part 4 of the results list.&#xD;
&#xD;
    res[[4]]&#xD;
&#xD;
![enter image description here][17]&#xD;
&#xD;
## Validation (Comparison to another code)&#xD;
&#xD;
Before continuing, it is always good practice to validate your model versus experiment or at least another code.  The other code supports a partition conditions for the concentration jump so that I do not need to create an interface layer.  The results are shown below:&#xD;
&#xD;
![enter image description here][18]&#xD;
&#xD;
The contour plots look very similar to the image in the lower left corner of the grid plot.  To be more quantitative, I have highlighted contours at approximately y=-0.15 and y=0.05 in the gas and liquid layers at x=1 corresponding to concentrations of 0.68 and 0.28, respectively.  The first part of the results list returns an interpolation function of the liquid and gas species.  We can see that we are within a percent of the other code, which is reasonable given that the interface layer is about 1% of the domain.  This check gives me good confidence that my model is not too wrong and that I can start to make it useful (i.e., exercising the model by changing parameters). &#xD;
&#xD;
    res[[1]][[2]][1, -0.15] (*0.6769985984321076`*)&#xD;
    res[[1]][[1]][1, 0.05] (* 0.27374616012596314`*)&#xD;
&#xD;
# Generating Animations&#xD;
&#xD;
I like to animate.  For me, animations are the best way to demonstrate how a system evolves as a function of time or parameter changes. We can export an animated gif file to study the effects of dimensionless parameter changes for both flow configurations as shown in the following code. It will take about 30 minutes per animation and about 5 GB of RAM. Undoubtedly, this code could be optimized for speed and memory usage, but you still can create a dozen animations while you sleep.&#xD;
&#xD;
    SetDirectory[NotebookDirectory[]];&#xD;
    &#xD;
    f = ((#1 - #2)/(#3 - #2)) &amp;amp;; (* Scale for progress bar *)&#xD;
    &#xD;
    mDic = meshfn[config -&amp;gt; &amp;#034;Counter&amp;#034;]; (* Create Mesh Instance *)&#xD;
        &#xD;
    Export[&amp;#034;CounterFlow.gif&amp;#034;,&#xD;
     Monitor[&#xD;
      Table[&#xD;
       modelfn[md -&amp;gt; mDic, k -&amp;gt; kc, dratio -&amp;gt; 1, pel -&amp;gt; 0, peg -&amp;gt; 0, &#xD;
         title -&amp;gt; &amp;#034;Counter-Flow&amp;#034;][[3]], {kc, 1, 0.01, -0.01}&#xD;
       	],&#xD;
      Grid[&#xD;
       	{{&amp;#034;Total progress:&amp;#034;, &#xD;
         ProgressIndicator[&#xD;
          Dynamic[f[kc, 1, &#xD;
            0.01, -0.01]]]}, {&amp;#034;\!\(\*SubscriptBox[\(K\), \(C\)]\)=&amp;#034;, \&#xD;
    {Dynamic@kc}}}]&#xD;
      	],&#xD;
     &amp;#034;AnimationRepetitions&amp;#034; -&amp;gt; \[Infinity]]&#xD;
&#xD;
# Examples&#xD;
&#xD;
I combined the co- (left) and counter-current (right) gif animations for several cases below. Péclet numbers approaching 100 start to look uninteresting visually (all the action is very close to the interface).  This should inform the user that perhaps another model is in order with new assumptions to study the small-scale behavior near the interface.&#xD;
&#xD;
## Changing the Equilibrium Constant @ No Flow&#xD;
&#xD;
![enter image description here][19]&#xD;
&#xD;
As the equilibrium constant, $K$, reduces, the jump condition increases.&#xD;
&#xD;
## Changing the Diffusion Ratio $\delta$ @ No Flow&#xD;
&#xD;
![enter image description here][20]&#xD;
&#xD;
As the liquid-gas diffusion ratio, $\delta$, decreases, the concentration in the gas layer increases.  We also see that the solution does not change much for $\delta&amp;lt;0.01$.&#xD;
## Changing  $Pe_L$  @ No Gas Flow&#xD;
&#xD;
![enter image description here][21]&#xD;
&#xD;
As $Pe_L$ increases, the concentration gradient increases at the interface.&#xD;
## Changing  $Pe_G$  @ No Liquid Flow&#xD;
&#xD;
![enter image description here][22]&#xD;
&#xD;
As $Pe_G$ increases, we see the concentration in the liquid layer decrease for co-flow and increase for counter-current flow. This should make sense since the inlet concentration for co-flow is 0 and 1 for counter-current flow. &#xD;
&#xD;
## Changing the Diffusion Ratio $\delta$ @ Middle Conditions&#xD;
&#xD;
![enter image description here][23]&#xD;
&#xD;
Again, we do not see much change for $\delta&amp;lt;0.01$.  One may have noticed that the concentration in the liquid layer goes up as the diffusion coefficient ratio goes down, which may, at first, seem counterintuitive.  The reason for this behavior is that the dimensionless velocity in the liquid layer depends on both $Pe_L$ and $\delta$ so it decreases with decreasing $\delta$. &#xD;
&#xD;
# Summary&#xD;
&#xD;
- Constructed an FEM model in the Wolfram Language to study concentration jump conditions in interphase mass transfer.&#xD;
- Results compare favorably to another code designed to handle jump conditions.&#xD;
- Showed several examples of the effect of dimensionless parameter changes on two model flow configurations.&#xD;
- Notebook provided.&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=varyKlv0gv0.gif&amp;amp;userId=1402928&#xD;
  [2]: http://appliedchem.unideb.hu/Muvtan/Transport%20Processes%20and%20Unit%20Operations,%20Third%20Edition.pdf&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ConcJumps.png&amp;amp;userId=1402928&#xD;
  [4]: https://reference.wolfram.com/language/ref/DSolve.html&#xD;
  [5]: https://ac.els-cdn.com/S0307904X07000601/1-s2.0-S0307904X07000601-main.pdf?_tid=adb2e542-50f1-44ce-ad9f-54ffaaa83bcb&amp;amp;acdnat=1539987146_3e6ce710d8016d91587f466be8e4ada7&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=AbsorptionModel.png&amp;amp;userId=1402928&#xD;
  [7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=PMSystemDescription.png&amp;amp;userId=1402928&#xD;
  [8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=AbsorptionSystem.png&amp;amp;userId=1402928&#xD;
  [9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Dimensions.png&amp;amp;userId=1402928&#xD;
  [10]: https://community.wolfram.com//c/portal/getImageAttachment?filename=AbsorptionSystem2.png&amp;amp;userId=1402928&#xD;
  [11]: https://community.wolfram.com//c/portal/getImageAttachment?filename=CoCurrentBoundaryMesh.png&amp;amp;userId=1402928&#xD;
  [12]: https://community.wolfram.com//c/portal/getImageAttachment?filename=CounterCurrentBoundaryMesh.png&amp;amp;userId=1402928&#xD;
  [13]: https://community.wolfram.com//c/portal/getImageAttachment?filename=CornerRefinement.png&amp;amp;userId=1402928&#xD;
  [14]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Interface.png&amp;amp;userId=1402928&#xD;
  [15]: https://community.wolfram.com//c/portal/getImageAttachment?filename=CoordIDs.png&amp;amp;userId=1402928&#xD;
  [16]: https://community.wolfram.com//c/portal/getImageAttachment?filename=testresult3.png&amp;amp;userId=1402928&#xD;
  [17]: https://community.wolfram.com//c/portal/getImageAttachment?filename=TestGrid.png&amp;amp;userId=1402928&#xD;
  [18]: https://community.wolfram.com//c/portal/getImageAttachment?filename=comsolresults.png&amp;amp;userId=1402928&#xD;
  [19]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Cmb_varyKld1v0gv0.gif&amp;amp;userId=1402928&#xD;
  [20]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Cmb_varydelta.gif&amp;amp;userId=1402928&#xD;
  [21]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Cmb_varyliqvelocity.gif&amp;amp;userId=1402928&#xD;
  [22]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Cmb_varygasvelocity.gif&amp;amp;userId=1402928&#xD;
  [23]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Cmb_varydeltalv5gv5.gif&amp;amp;userId=1402928</description>
    <dc:creator>Tim Laska</dc:creator>
    <dc:date>2018-11-15T19:31:17Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2927764">
    <title>Introducing the Wolfram ProteinVisualization paclet!</title>
    <link>https://community.wolfram.com/groups/-/m/t/2927764</link>
    <description>![Introducing the Wolfram ProteinVisualization paclet!][1]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Main2.bmp&amp;amp;userId=20103&#xD;
  [2]: https://www.wolframcloud.com/obj/353c8f22-23af-4a49-b43c-b0b0f1645249</description>
    <dc:creator>Soutick Saha</dc:creator>
    <dc:date>2023-05-31T14:38:54Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1799757">
    <title>See all halomethanes</title>
    <link>https://community.wolfram.com/groups/-/m/t/1799757</link>
    <description># Introduction:&#xD;
&#xD;
*One problem in chemistry is finding all possible molecules, as there are rotations and reflections. All the possibilities of existence of halomethanes (even unstable ones) are addressed here. This is a question similar to the sequence: Doubly triangular numbers (A002817OEIS, N. J. A. Sloane, Apr 18, 2017):* *Number of inequivalent ways to color vertices of a square using &amp;lt;= n colors, allowing rotations and reflections* ... , a(n)=n*(n+1)*(n^ 2+n+2)/8.&#xD;
&#xD;
*However as described in the sequence A002817OEIS, only the total result of the possibilities is addressed, while here in this post I visually demonstrate all possibilities, both in list, 2D and 3D graphs and mass list.*&#xD;
&#xD;
# Function Code:&#xD;
&#xD;
With this function below it is possible to find and visualize **all possibilities of halomethanes**, taking into account all rotations and reflections of the molecules. I developed this function with some options (Mode) besides the list of terms. Examples of options: &amp;#034;Color&amp;#034;, &amp;#034;Visual&amp;#034;, &amp;#034;Visual3D&amp;#034;, &amp;#034;Mass&amp;#034;.&#xD;
&#xD;
Here the function demonstration is done with all halogens (except radioactive halogens, by choice), but any of the  possible elements can be used as an argument in the function. Example: {&amp;#034;H&amp;#034;}, {&amp;#034;F&amp;#034;, &amp;#034;Br&amp;#034;, &amp;#034;I&amp;#034;}, {...} ... {&amp;#034;H&amp;#034;, &amp;#034;F&amp;#034;, &amp;#034;Cl&amp;#034;, &amp;#034;Br&amp;#034;, &amp;#034;I&amp;#034; }.&#xD;
&#xD;
    Halomethanes[elem_, OptionsPattern[]] := &#xD;
     Module[{eleu, z, cc, a, a1, f, rP, ap, n, b}, z = Length@elem; &#xD;
      Options[Halomethanes] = {&amp;#034;Mode&amp;#034; -&amp;gt; &amp;#034;Table&amp;#034;}; eleu = elem[[1]]; &#xD;
      a = Tuples[elem, 4] /. {&amp;#034;Cl&amp;#034; -&amp;gt; &amp;#034;D&amp;#034;, &amp;#034;Br&amp;#034; -&amp;gt; &amp;#034;B&amp;#034;}; n[x_] := {x}; &#xD;
      cc = {&amp;#034;C&amp;#034; -&amp;gt; GrayLevel[0.5], &amp;#034;F&amp;#034; -&amp;gt; RGBColor[1, 0.5, 0.5], &#xD;
        &amp;#034;Cl&amp;#034; -&amp;gt; RGBColor[0, 0.56, 0], &amp;#034;Br&amp;#034; -&amp;gt; RGBColor[0.6, 0.4, 0.2], &#xD;
        &amp;#034;I&amp;#034; -&amp;gt; RGBColor[1, 0, 0], &amp;#034;H&amp;#034; -&amp;gt; RGBColor[0, 1, 1]}; a1 = a[[1]]; &#xD;
      f[a_] := Module[{bt, ct, dt, e1, e2, ft, gt, r1}, &#xD;
        bt = Table[StringJoin[a[[b]]], {b, 1, Length@a}]; &#xD;
        ct = Table[StringJoin@Table[a[[c]], 2], {c, 1, Length@a}]; &#xD;
        dt = Table[&#xD;
          StringJoin[a[[d]][[4]], a[[d]][[3]], a[[d]][[2]], &#xD;
           a[[d]][[1]]], {d, 1, Length@a}]; &#xD;
        e1 = Table[&#xD;
          StringCases[ct[[i]], RegularExpression[bt[[1]]]], {i, 1, &#xD;
           Length@ct}]; &#xD;
        e2 = Table[&#xD;
          StringCases[ct[[i]], RegularExpression[dt[[1]]]], {i, 1, &#xD;
           Length@ct}]; &#xD;
        ft = Table[{Length@(e1[[j]]), &#xD;
            Length@(e2[[j]])} /. {{2, 2} -&amp;gt; bt[[j]], {2, 0} -&amp;gt; &#xD;
             bt[[j]], {0, 2} -&amp;gt; {&amp;#034;copy&amp;#034;}, {0, 0} -&amp;gt; bt[[j]], {2, 1} -&amp;gt; &#xD;
             bt[[j]], {1, 2} -&amp;gt; {&amp;#034;copy&amp;#034;}, {1, 0} -&amp;gt; {&amp;#034;copy&amp;#034;}, {0, &#xD;
              1} -&amp;gt; {&amp;#034;copy&amp;#034;}, {1, 1} -&amp;gt; {&amp;#034;copy&amp;#034;}}, {j, 1, Length@ct}]; &#xD;
        gt = Table[&#xD;
          StringPartition[DeleteCases[ft, {&amp;#034;copy&amp;#034;}][[o]], 1], {o, 1, &#xD;
           Length@DeleteCases[ft, {&amp;#034;copy&amp;#034;}]}]; &#xD;
        r1 = If[gt != {}, If[gt[[1]] == a[[1]], gt[[1]], {}], {}]; {rP = &#xD;
          DeleteCases[r1, {}], &#xD;
         ap = If[r1 != {}, DeleteCases[gt, r1], gt]}]; &#xD;
      Do[b = AppendTo[n[a1], {a = f[a][[2]], f[a][[1]]}[[2]]], &#xD;
       z*(z + 1)*(z^2 + z + 2)/8 - 1]; &#xD;
      OptionValue[&#xD;
        &amp;#034;Mode&amp;#034;] /. {&amp;#034;Table&amp;#034; -&amp;gt; &#xD;
         If[z == 1, {{eleu, eleu, eleu, eleu}}, &#xD;
          b /. {&amp;#034;D&amp;#034; -&amp;gt; &amp;#034;Cl&amp;#034;, &amp;#034;B&amp;#034; -&amp;gt; &amp;#034;Br&amp;#034;}], &#xD;
        &amp;#034;Color&amp;#034; -&amp;gt; {TableForm[{{&amp;#034;H&amp;#034;, &#xD;
             Text[Style[&amp;#034;Cyan&amp;#034;, RGBColor[0, 1, 1], Medium]]}, {&amp;#034;F&amp;#034;, &#xD;
             Text[Style[&amp;#034;Pink&amp;#034;, RGBColor[1, 0.5, 0.5], Medium]]}, {&amp;#034;Cl&amp;#034;, &#xD;
             Text[Style[&amp;#034;Green&amp;#034;, RGBColor[0, 0.56, 0], Medium]]}, {&amp;#034;Br&amp;#034;, &#xD;
             Text[Style[&amp;#034;Brown&amp;#034;, RGBColor[0.6, 0.4, 0.2], Medium]]}, {&amp;#034;I&amp;#034;,&#xD;
              Text[Style[&amp;#034;Red&amp;#034;, RGBColor[1, 0, 0], Medium]]}}, &#xD;
           TableHeadings -&amp;gt; {None, {&amp;#034;Atom&amp;#034;, &amp;#034;Color&amp;#034;}}], &#xD;
          If[z == 1, {Flatten@Table[elem, 4]}, &#xD;
            b /. {&amp;#034;D&amp;#034; -&amp;gt; &amp;#034;Cl&amp;#034;, &amp;#034;B&amp;#034; -&amp;gt; &amp;#034;Br&amp;#034;}] /. cc}, &#xD;
        &amp;#034;Visual&amp;#034; -&amp;gt; &#xD;
         If[z == 1, &#xD;
          MoleculePlot[&#xD;
           Molecule[{&amp;#034;C&amp;#034;, eleu, eleu, eleu, eleu}, {Bond[{1, 2}], &#xD;
             Bond[{1, 3}], Bond[{1, 4}], Bond[{1, 5}]}], ColorRules -&amp;gt; cc,&#xD;
            ImageSize -&amp;gt; 100], &#xD;
          Table[MoleculePlot[&#xD;
            Molecule[&#xD;
             Join[{&amp;#034;C&amp;#034;}, (b /. {&amp;#034;D&amp;#034; -&amp;gt; &amp;#034;Cl&amp;#034;, &amp;#034;B&amp;#034; -&amp;gt; &amp;#034;Br&amp;#034;})[[&#xD;
               h]]], {Bond[{1, 2}], Bond[{1, 3}], Bond[{1, 4}], &#xD;
              Bond[{1, 5}]}], ColorRules -&amp;gt; cc, ImageSize -&amp;gt; 100], {h, 1, &#xD;
            Length@b}]], &#xD;
        &amp;#034;Visual3D&amp;#034; -&amp;gt; &#xD;
         If[z == 1, &#xD;
          MoleculePlot3D[&#xD;
           Molecule[{&amp;#034;C&amp;#034;, eleu, eleu, eleu, eleu}, {Bond[{1, 2}], &#xD;
             Bond[{1, 3}], Bond[{1, 4}], Bond[{1, 5}]}], ColorRules -&amp;gt; cc,&#xD;
            ImageSize -&amp;gt; 100], &#xD;
          Table[MoleculePlot3D[&#xD;
            Molecule[&#xD;
             Join[{&amp;#034;C&amp;#034;}, (b /. {&amp;#034;D&amp;#034; -&amp;gt; &amp;#034;Cl&amp;#034;, &amp;#034;B&amp;#034; -&amp;gt; &amp;#034;Br&amp;#034;})[[&#xD;
               h]]], {Bond[{1, 2}], Bond[{1, 3}], Bond[{1, 4}], &#xD;
              Bond[{1, 5}]}], ColorRules -&amp;gt; cc, ImageSize -&amp;gt; 80], {h, 1, &#xD;
            Length@b}]], &#xD;
        &amp;#034;Mass&amp;#034; -&amp;gt; &#xD;
         If[z == 1, &#xD;
          MoleculeValue[&#xD;
           Molecule[{&amp;#034;C&amp;#034;, eleu, eleu, eleu, eleu}, {Bond[{1, 2}], &#xD;
             Bond[{1, 3}], Bond[{1, 4}], Bond[{1, 5}]}], &amp;#034;MolecularMass&amp;#034;],&#xD;
           Table[MoleculeValue[&#xD;
            Molecule[&#xD;
             Join[{&amp;#034;C&amp;#034;}, (b /. {&amp;#034;D&amp;#034; -&amp;gt; &amp;#034;Cl&amp;#034;, &amp;#034;B&amp;#034; -&amp;gt; &amp;#034;Br&amp;#034;})[[&#xD;
               h]]], {Bond[{1, 2}], Bond[{1, 3}], Bond[{1, 4}], &#xD;
              Bond[{1, 5}]}], &amp;#034;MolecularMass&amp;#034;], {h, 1, Length@b}]]}]&#xD;
&#xD;
# Visualization:&#xD;
&#xD;
- **TERMS TABLE**:&#xD;
&#xD;
In the simplest form, with only one argument, a list of all halomethane molecules is generated.&#xD;
&#xD;
    rp = Halomethanes[{&amp;#034;H&amp;#034;, &amp;#034;F&amp;#034;, &amp;#034;Cl&amp;#034;, &amp;#034;Br&amp;#034;, &amp;#034;I&amp;#034;}]&#xD;
    &#xD;
    Length@rp&#xD;
&#xD;
![im1][1]&#xD;
&#xD;
- **COLOR TABLE**:&#xD;
&#xD;
Optionally, a list of molecules with their respective illustrative colors is generated with the &amp;#034;Mode&amp;#034; -&amp;gt; &amp;#034;Color&amp;#034; option.&#xD;
&#xD;
    Halomethanes[{&amp;#034;H&amp;#034;, &amp;#034;F&amp;#034;, &amp;#034;Cl&amp;#034;, &amp;#034;Br&amp;#034;, &amp;#034;I&amp;#034;}, &amp;#034;Mode&amp;#034; -&amp;gt; &amp;#034;Color&amp;#034;]&#xD;
&#xD;
![im2][2]&#xD;
&#xD;
- **2D VISUAL TABLE**:&#xD;
&#xD;
Optionally, a list of molecules with 2D structural representations is generated with the &amp;#034;Mode&amp;#034; -&amp;gt; &amp;#034;Visual&amp;#034; option (the 2D model can better represent stereoisomerism than the 3D model).&#xD;
&#xD;
    Halomethanes[{&amp;#034;H&amp;#034;, &amp;#034;F&amp;#034;, &amp;#034;Cl&amp;#034;, &amp;#034;Br&amp;#034;, &amp;#034;I&amp;#034;}, &amp;#034;Mode&amp;#034; -&amp;gt; &amp;#034;Visual&amp;#034;]&#xD;
&#xD;
![im3][3]&#xD;
&#xD;
- **3D VISUAL TABLE** (interactive):&#xD;
&#xD;
Optionally, a list of molecules with 3D structural representations is generated with the &amp;#034;Mode&amp;#034; -&amp;gt; &amp;#034;Visual3D&amp;#034; option. This list is interactive, and each molecule can be rotated for better viewing (stereoisomerism is not very well represented in these 3D models as the representations are tetrahedral, for example, the isomers {&amp;#034;H&amp;#034;,&amp;#034;F&amp;#034;,&amp;#034;H&amp;#034;,&amp;#034;F&amp;#034;} and {&amp;#034;F&amp;#034;,&amp;#034;F&amp;#034;,&amp;#034;H,H} are very similar in this view).&#xD;
&#xD;
    Halomethanes[{&amp;#034;H&amp;#034;, &amp;#034;F&amp;#034;, &amp;#034;Cl&amp;#034;, &amp;#034;Br&amp;#034;, &amp;#034;I&amp;#034;}, &amp;#034;Mode&amp;#034; -&amp;gt; &amp;#034;Visual3D&amp;#034;]&#xD;
&#xD;
![im4][4]&#xD;
&#xD;
- **MASS TABLE**:&#xD;
&#xD;
Finally, a list of the masses of all halomethanes can be generated with the argument &amp;#034;Mode&amp;#034; -&amp;gt; &amp;#034;Mass&amp;#034; (some of them, although unstable, are mentioned in the list).&#xD;
&#xD;
    resp2 = Halomethanes[{&amp;#034;H&amp;#034;, &amp;#034;F&amp;#034;, &amp;#034;Cl&amp;#034;, &amp;#034;Br&amp;#034;, &amp;#034;I&amp;#034;}, &amp;#034;Mode&amp;#034; -&amp;gt; &amp;#034;Mass&amp;#034;]&#xD;
&#xD;
![im5][5]&#xD;
&#xD;
Illustrative graph of the mass distributions of all possible halomethanes:&#xD;
&#xD;
    ListPlot[resp2, AxesLabel -&amp;gt; {&amp;#034;n&amp;#034;, &amp;#034;Mass(u)&amp;#034;}, &#xD;
     LabelStyle -&amp;gt; Directive[&amp;#034;Subsubsection&amp;#034;, RGBColor[0.07, 0.5, 0.5]], &#xD;
     PlotLabel -&amp;gt; &amp;#034;Halomethanes Mass&amp;#034;, PlotRange -&amp;gt; {{0, 130}, {0, 550}}, &#xD;
     PlotStyle -&amp;gt; Directive[RGBColor[0.91, 0.08, 0.5], PointSize[Large]], &#xD;
     ImageSize -&amp;gt; Large]&#xD;
&#xD;
![im6][6]&#xD;
&#xD;
**Link**: (Doubly triangular numbers, A002817OEIS, sequence):&#xD;
&#xD;
https://oeis.org/A002817&#xD;
&#xD;
Thanks.&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=table1.png&amp;amp;userId=1316061&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=tableColor.png&amp;amp;userId=1316061&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=graphtest.png&amp;amp;userId=1316061&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=visual3D.png&amp;amp;userId=1316061&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=tablemass.png&amp;amp;userId=1316061&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=graph.png&amp;amp;userId=1316061</description>
    <dc:creator>Claudio Chaib</dc:creator>
    <dc:date>2019-10-03T03:01:17Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1390630">
    <title>Quantum Chemistry Animations</title>
    <link>https://community.wolfram.com/groups/-/m/t/1390630</link>
    <description>A couple of weeks ago I experimented with automating inputs and visualizing results from the [CP2K][1] quantum chemistry software via Mathematica. My goal was to visualize the formation of a water molecule. I knew just enough about computational chemistry to stumble my way to making an animation that sort of looked like I wanted, although I&amp;#039;m sure it&amp;#039;s horribly inaccurate. Are there any other people in the community who have worked on projects like this?&#xD;
&#xD;
[Video][3]&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
&#xD;
  [1]: https://www.cp2k.org/&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=temp.jpg&amp;amp;userId=64737&#xD;
  [3]: https://www.youtube.com/watch?v=foG5LgFYb2o</description>
    <dc:creator>Michael Hale</dc:creator>
    <dc:date>2018-07-23T22:58:36Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/172875">
    <title>Distance between 2 flat molecules</title>
    <link>https://community.wolfram.com/groups/-/m/t/172875</link>
    <description>Hi,&#xD;
 do you have any idea how to measure the distance between the two planes? I am a new user with Mathematica and your help will be greatly appreciated.&#xD;
&#xD;
[mcode]data1 = {{5.086735, -2.640504,&#xD;
    4.650624}, {6.227440, -2.477485, 3.843544}, {6.160519, -1.731605,&#xD;
    2.649288}, {4.941969, -1.164990, 2.267181}, {3.799611, -1.315889,&#xD;
    3.093711}, {3.864651, -2.054553, 4.284675}, {4.609149, -0.320793,&#xD;
    1.036262}, {3.147213, 0.034489, 1.303689}, {2.295200, 0.817536,&#xD;
    0.531891}, {0.950277, 1.010999, 0.934789}, {0.504240, 0.379798,&#xD;
    2.123730}, {1.354565, -0.416580, 2.898054}, {2.686409, -0.582108,&#xD;
    2.489055}, {0.024258, 1.821306, 0.114273}, {-1.353392, 1.513264,&#xD;
    0.069868}, {0.471982, 2.897945, -0.687157}, {-2.233955,&#xD;
    2.208380, -0.751826}, {-0.408676,&#xD;
    3.621409, -1.497147}, {-1.775026,&#xD;
    3.272191, -1.550693}, {-2.675546, 3.957425, -2.411557}};&#xD;
&#xD;
&#xD;
In[9]:= Plane1 = Fit[data1, {1, x, y}, {x, y}]&#xD;
Out[9]= 2.18037 - 0.200355 x - 1.20793 y&#xD;
&#xD;
data2 = {{0.989404, -2.326574, -0.675663}, {0.466929, \&#xD;
-2.898174, 0.507492}, {-0.913869, -2.780568,&#xD;
    0.804534}, {-1.736679, -2.093564, -0.078413}, {-1.209589, \&#xD;
-1.521258, -1.260581}, {0.155306, -1.637212, -1.561214},&#xD;
   {-3.234276, -1.809443,&#xD;
    0.054719}, {-3.478451, -0.951209, -1.195212}, {-4.647861, \&#xD;
-0.326679, -1.645893}, {-4.618728, 0.428750, -2.833379}, {-3.433297,&#xD;
    0.549231, -3.579976}, {-2.261558, -0.087363, -3.148840}, \&#xD;
{-2.289342, -0.827551, -1.957816}, {1.326341, -3.595313,&#xD;
    1.453222}, {3.114413, -4.428375, 2.270776}, {2.668207, -3.758639 ,&#xD;
     1.167271}, {1.006758, -4.128596,&#xD;
    2.609730}, {2.180810, -4.675522, 3.140752}};&#xD;
&#xD;
&#xD;
In[16]= Plane2 = Fit[data2, {1, x, y}, {x, y}]&#xD;
Out[16]= -4.19445 - 0.401548 x - 1.7137 y&#xD;
&#xD;
Show[ListPlot3D[data1, PlotStyle -&amp;gt; Red],&#xD;
 ListPlot3D[data2, PlotStyle -&amp;gt; Green],&#xD;
 Plot3D[{Plane1, Plane2}, {x, -7, 7}, {y, -7, 7}]]&#xD;
[/mcode]</description>
    <dc:creator>A Y</dc:creator>
    <dc:date>2013-12-19T19:47:40Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/824832">
    <title>Atom types created by Mathematica not read by other programs</title>
    <link>https://community.wolfram.com/groups/-/m/t/824832</link>
    <description>This problem has caused me nightmares and I really need to know how to solve it: &#xD;
I am using several DFT programs and other data processing codes to simulate molecules. I create the geometries of these molecules in Mathematica and save them as .xyz files. The thing is, when supplying these .xyz files to the DFT codes, the latter codes cannot read the atom types created by Mathematica! &#xD;
Another problem is that, Mathematica write xyz components in the scientific form which cannot be  processed in many codes.. &#xD;
Any ideas why this happens and how to fix it??</description>
    <dc:creator>Eft Rsd</dc:creator>
    <dc:date>2016-03-17T12:14:35Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/763824">
    <title>Problem with Numerical Integration of Aspirin Synthesis Reaction</title>
    <link>https://community.wolfram.com/groups/-/m/t/763824</link>
    <description>Hello, &#xD;
I am attempting to numerically integrate a set of kinetic equations to describe the reaction for aspirin synthesis. Unfortunately, when I run the below code, the integration appears to take place however the graph is empty with only the axes displayed. As I am new to Mathematica, I was hoping someone with a bit of experience may be kind enough to point out where I&amp;#039;m going wrong. Just for info, I am running the whole piece of code at once.&#xD;
&#xD;
Many thanks,&#xD;
Robin&#xD;
&#xD;
    ClearAll[CSA, CAA, CASA, CHA, CASAA, CH2O, V, t]&#xD;
    &#xD;
    Reaction = NDSolve[{&#xD;
        	CAA&amp;#039;[t] ==  -(k1 * CSA[t] * CAA[t]) - (k2 * CASA[t] * CAA[t]) - 0.5  *(k4 * CAA[t] * CH2O[t]) - CAA[t] ((V&amp;#039;[t])/(V[t])),&#xD;
        	CHA&amp;#039;[t] ==  (k1 * CSA[t] * CAA[t]) + (k2 * CASA[t] * CAA[t]) + (k3 * CASAA[t] * CH2O[t]) + (k4 * CAA[t] * CH2O[t]) - CHA[t] (V&amp;#039;[t]/V[t]),&#xD;
        	CSA&amp;#039;[t] ==  (kd *(CSatSA - CSA[t])^d) - (k1 * CSA[t] * CAA[t]) - CSA[t] ((V&amp;#039;[t])/(V[t])),&#xD;
        	CASAA&amp;#039;[t] ==  (k2 * CASA[t] *  CAA[t]) - (k3 * CASAA[t] * CH2O[t]) - CASAA[t] ((V&amp;#039;[t])/(V[t])),&#xD;
        	CH2O&amp;#039;[t] ==  - (k3 * CASAA[t] * CH2O[t]) - 0.5 (k4 * CAA[t] * CH2O[t]) - CH2O[t] ((V&amp;#039;[t])/(V[t])) + CInH2O (f/V[t]),&#xD;
        	CASA&amp;#039;[t] ==  (k1 * CSA[t] * CAA[t]) - (k2 * CASA[t] *  CAA[t]) + (k3 * CASAA[t] * CH2O[t]) &#xD;
                                  - (kc *(CASA[t] - CSatASA)^c) - CASA[t]((V&amp;#039;[t])/(V[t])),&#xD;
        	V&amp;#039;[t] ==  V[t]*(vASA ((k1 * CSA[t] * CAA[t]) - (k2 * CASA[t] *  CAA[t]) + (k3 * CASAA[t] * CH2O[t]) - (kc *(CASA[t] - CSatASA)^c)) + &#xD;
                             vH2O (-(k3 * CASAA[t] * CH2O[t]) - 0.5 (k4 * CAA[t] * CH2O[t]) + CInH2O (f/V[t])) &#xD;
                          + vASAA ((k2 * CASA[t] *  CAA[t]) - (k3 * CASAA[t] * CH2O[t])) + vSA ((kd *(CSatSA - CSA[t])^d) - (k1 * CSA[t] * CAA[t])) + &#xD;
                             vHA ((k1 * CSA[t] * CAA[t]) + (k2 * CASA[t] * CAA[t]) + (k3 * CASAA[t] * CH2O[t]) + (k4 * CAA[t] * CH2O[t])) &#xD;
                          + vAA (-(k1 * CSA[t] * CAA[t]) - (k2 * CASA[t] *  CAA[t]) - 0.5 *(k4 * CAA[t] * CH2O[t]))),&#xD;
        	CAA[0] == 10.57,&#xD;
            CHA[0] == 0.0,&#xD;
            CSA [0] ==  0.19,&#xD;
        	CASAA [0] ==  0.0,&#xD;
        	CH2O [0] ==  0.0,&#xD;
        	CASA [0] ==  0.0,&#xD;
        	V [0] ==  120}&#xD;
        /. {k1 -&amp;gt; 0.0337, k2 -&amp;gt; 0.43, k3 -&amp;gt; 1525, k4 -&amp;gt; 85, kd -&amp;gt; 4.405, kc -&amp;gt; 1.09, c -&amp;gt; 1.34, d -&amp;gt; 1.90, CSatASA -&amp;gt; 1.52, &#xD;
        CSatSA -&amp;gt; 2.19, vASA -&amp;gt; 0.014, vSA -&amp;gt; 0.014, vASAA -&amp;gt; 0.014, vHA -&amp;gt; 0.014, vAA -&amp;gt; 0.014, vH2O -&amp;gt; 0.014, CInH20 -&amp;gt; 55.5, f -&amp;gt; 0},&#xD;
      	{CSA, CASA, CASAA, CHA, CH2O, CAA, V},&#xD;
      	{t, 0, 200}]&#xD;
    	&#xD;
    myplot = Plot[&#xD;
      	{Evaluate[CSA[t] /. Reaction], Evaluate[CASA[t] /. Reaction], &#xD;
       Evaluate[CASAA[t] /. Reaction], Evaluate[CHA[t] /. Reaction], &#xD;
       Evaluate[CH2O[t] /. Reaction], Evaluate[CAA[t] /. Reaction], &#xD;
       Evaluate[V[t] /. Reaction]},&#xD;
      	{t, 0, 200},&#xD;
      	PlotPoints -&amp;gt; 500,&#xD;
      	PlotRange -&amp;gt; {{0, 200}, {0, 0.2}},&#xD;
      	AxesLabel -&amp;gt; {time, conc},&#xD;
      	LabelStyle -&amp;gt; Directive[Black, Medium, &amp;#034;Palatino&amp;#034;],&#xD;
      	PlotStyle -&amp;gt; {{Red, Thickness[0.008]}, {Green, &#xD;
         Thickness[0.008]}, {Blue, Thickness[0.008]}, {Black, &#xD;
         Thickness[0.008]}, {Yellow, Thickness[0.008]}, {Orange, &#xD;
         Thickness[0.008]}}]</description>
    <dc:creator>Robin Hartley</dc:creator>
    <dc:date>2015-12-24T14:06:11Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/337745">
    <title>Attempting to input a complex equation into W|A, both of us are stumped.</title>
    <link>https://community.wolfram.com/groups/-/m/t/337745</link>
    <description>Hi all,&#xD;
&#xD;
Will someone please get this monstrosity down W|A&amp;#039;s gob in a constructive fashion?&#xD;
&#xD;
    Solve[P = x (-((a x)/V^2) + (R T)/(V - b x)) &#xD;
&#xD;
where &#xD;
&#xD;
    a=0.2420*((atm*dm^6)/(mol^2)), b=((2.65*10^-2)*((dm^3)/mol), &#xD;
    P=(1.0atm), &#xD;
    R=((8.205736*10^-5)*((m^3*atm)/(k*mol))), &#xD;
    T=298.2*K, &#xD;
    V=(113.097m^3)] &#xD;
&#xD;
for x&#xD;
&#xD;
I&amp;#039;ve tried everything I know how to do so far, and I even caved and payed for pro -- and it didn&amp;#039;t help one wit. SOMEONE please get this thing through wolfram&amp;#039;s head -- then pleeeeease tell me how you did it.</description>
    <dc:creator>Joshua Patyten</dc:creator>
    <dc:date>2014-09-08T04:08:13Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2068787">
    <title>Organic Chemistry 2: representing chemical reactions</title>
    <link>https://community.wolfram.com/groups/-/m/t/2068787</link>
    <description>This work is part of series of other posts avaialble here:&#xD;
&#xD;
- 1st post: [Organic Chemistry 1: Modeling Synthesis as Graphs][1]&#xD;
&#xD;
- 3rd post: [Organic Chemistry 3: Progress in Multi-Step Chemical Synthesis][2]&#xD;
&#xD;
----&#xD;
&#xD;
I post this in case anyone is interested in experimenting further along these lines, or in collaborating with me on an organic synthesis related project. This notebook shows my representation of various organic chemical reactions in Wolfram Language.&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][3]&#xD;
&#xD;
  [Original]: https://www.wolframcloud.com/obj/wolfram-community/Published/OrgSynProject.nb&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com/groups/-/m/t/2073460&#xD;
  [2]: https://community.wolfram.com/groups/-/m/t/2071550&#xD;
  [3]: https://www.wolframcloud.com/obj/d25cd622-0699-461b-8652-425dc974e99d</description>
    <dc:creator>Leonardo Cabana</dc:creator>
    <dc:date>2020-09-01T13:44:29Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1589719">
    <title>Solve analytically 1D transport equation?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1589719</link>
    <description>I&amp;#039;m trying to solve for the analytical solution of 1D transport equation to verify the results of the numerical solution.  &#xD;
&#xD;
    eqn = D[u[x, t], t] == D[u[x, t], {x, 2}];&#xD;
    ic = u[x, 0] == 50;&#xD;
    bc1 = u[0, t] == 50;&#xD;
    bc2 = D[u[1, t], x] == 0;&#xD;
    DSolve[{eqn, ic, bc1, bc2}, u[x, t], {x, t}]&#xD;
&#xD;
However, I obtain the following,&#xD;
&#xD;
    DSolve::deqn: Equation or list of equations expected instead of True in the first argument {(u^(0,1))[x,t]==(u^(2,0))[x,t],u[x,0]==50,u[0,t]==50,True}.&#xD;
&#xD;
Have I missed any step?  I&amp;#039;m looking for the symbolic solution of the PDE with Dirichlet boundary condition at the inlet and Neumann boundary condition at the outlet.&#xD;
Could someone help?</description>
    <dc:creator>Natash A</dc:creator>
    <dc:date>2019-01-14T07:51:09Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/828033">
    <title>It&amp;#039;s raining crystal structures: Cloud-based VASP viewer</title>
    <link>https://community.wolfram.com/groups/-/m/t/828033</link>
    <description>You may remember that I&amp;#039;ve already posted [packages for crystal structure plots][1]. I just wanted to dump a piece of code here that&amp;#039;s based on these packages and will let you plot crystal structures from [VASP][2] input/output files on a webpage... in case anyone else is using VASP.&#xD;
&#xD;
For anyone who wants to try the app but doesn&amp;#039;t have a VASP file handy, here&amp;#039;s a sample you can copy and paste into a plain text file:&#xD;
&#xD;
    Rutile&#xD;
       1.00000000000000     &#xD;
         4.5937300000000000    0.0000000000000000    0.0000000000000000&#xD;
         0.0000000000000000    4.5937300000000000    0.0000000000000000&#xD;
         0.0000000000000000    0.0000000000000000    2.9581200000000000&#xD;
       Ti    O&#xD;
         2     4&#xD;
    Direct&#xD;
      0.0000000000000000  0.0000000000000000  0.0000000000000000&#xD;
      0.5000000000000000  0.5000000000000000  0.5000000000000000&#xD;
      0.3053000000000000  0.3053000000000000  0.0000000000000000&#xD;
      0.6947000000000000  0.6947000000000000  0.0000000000000000&#xD;
      0.8053000000000000  0.1947000000000000  0.5000000000000000&#xD;
      0.1947000000000000  0.8053000000000000  0.5000000000000000&#xD;
    &#xD;
The actual code is below the image. Have fun!&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
    CloudDeploy[FormFunction[{&#xD;
       {{&amp;#034;file&amp;#034;, &amp;#034;Upload a VASP POSCAR or CONTCAR file here:&amp;#034;} -&amp;gt; &amp;lt;|&#xD;
          &amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;UploadedFile&amp;#034;|&amp;gt;}, {&#xD;
        {&amp;#034;sysdim&amp;#034;, &amp;#034;Periodic repetitions&amp;#034;} -&amp;gt; &amp;lt;|&#xD;
          &amp;#034;Interpreter&amp;#034; -&amp;gt; &#xD;
           Restricted[&#xD;
            DelimitedSequence[&amp;#034;Integer&amp;#034;, &#xD;
             &amp;#034; &amp;#034; | &amp;#034;,&amp;#034; | &amp;#034;;&amp;#034; | &amp;#034;/&amp;#034; | &amp;#034;x&amp;#034; | &amp;#034;X&amp;#034;], 3], &amp;#034;Input&amp;#034; -&amp;gt; &amp;#034;1x1x1&amp;#034;|&amp;gt;,&#xD;
        {&amp;#034;retractq&amp;#034;, &amp;#034;Retract atoms to cell?&amp;#034;} -&amp;gt; &amp;lt;|&#xD;
          &amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;Boolean&amp;#034;, &amp;#034;Input&amp;#034; -&amp;gt; False|&amp;gt;,&#xD;
        {&amp;#034;addq&amp;#034;, &amp;#034;Add periodic duplicates of atoms?&amp;#034;} -&amp;gt; &amp;lt;|&#xD;
          &amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;Boolean&amp;#034;, &amp;#034;Input&amp;#034; -&amp;gt; False|&amp;gt;,&#xD;
        {&amp;#034;atomrad&amp;#034;, &amp;#034;Atom radius&amp;#034;} -&amp;gt; &amp;lt;|&amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;ComputedReal&amp;#034;, &#xD;
          &amp;#034;Input&amp;#034; -&amp;gt; 0.4|&amp;gt;,&#xD;
        {&amp;#034;bonddist&amp;#034;, &amp;#034;Maximum bond length&amp;#034;} -&amp;gt; &amp;lt;|&#xD;
          &amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;ComputedReal&amp;#034;, &amp;#034;Input&amp;#034; -&amp;gt; 2.1|&amp;gt;,&#xD;
        {&amp;#034;monobond&amp;#034;, &amp;#034;Want to pick your own bond color?&amp;#034;} -&amp;gt; &amp;lt;|&#xD;
          &amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;Boolean&amp;#034;, &amp;#034;Input&amp;#034; -&amp;gt; False|&amp;gt;,&#xD;
        {&amp;#034;bondcol&amp;#034;, &amp;#034;Bond color&amp;#034;} -&amp;gt; &amp;lt;|&amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;ComputedColor&amp;#034;, &#xD;
          &amp;#034;Input&amp;#034; -&amp;gt; GrayLevel[.8]|&amp;gt;,&#xD;
        {&amp;#034;bondrad&amp;#034;, &amp;#034;Bond radius&amp;#034;} -&amp;gt; &amp;lt;|&amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;ComputedReal&amp;#034;, &#xD;
          &amp;#034;Input&amp;#034; -&amp;gt; 0.1|&amp;gt;,&#xD;
        {&amp;#034;linecol&amp;#034;, &amp;#034;Cell outline color&amp;#034;} -&amp;gt; &amp;lt;|&#xD;
          &amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;ComputedColor&amp;#034;, &amp;#034;Input&amp;#034; -&amp;gt; Black|&amp;gt;,&#xD;
        {&amp;#034;linerad&amp;#034;, &amp;#034;Cell outline radius&amp;#034;} -&amp;gt; &amp;lt;|&#xD;
          &amp;#034;Interpreter&amp;#034; -&amp;gt; &amp;#034;ComputedReal&amp;#034;, &amp;#034;Input&amp;#034; -&amp;gt; 0.02|&amp;gt;&#xD;
        }},&#xD;
      &#xD;
      Module[{file, sysdim, retractq, addq, atomrad, bonddist, monobond, &#xD;
         bondcol, bondrad, linecol, linerad,&#xD;
         data, speciesQ, atomcol, chemoffset, chgoffset, lattscale, &#xD;
         lattvec, coord, conf, coordP, confP, new, tubearrow, lines, &#xD;
         atoms, tuples, bonds},&#xD;
        &#xD;
        file = #file;&#xD;
        sysdim = #sysdim;&#xD;
        retractq = #retractq;&#xD;
        addq = #addq;&#xD;
        atomrad = #atomrad;&#xD;
        bonddist = #bonddist;&#xD;
        monobond = #monobond;&#xD;
        bondcol = #bondcol;&#xD;
        bondrad = #bondrad;&#xD;
        linecol = #linecol;&#xD;
        linerad = #linerad;&#xD;
        &#xD;
        (*import: *)&#xD;
        data = Import[file, &amp;#034;Table&amp;#034;];&#xD;
        (*offset if chemical species are given: *)&#xD;
        speciesQ = MatchQ[data[[6]], {_String ..}];&#xD;
        atomcol[type_] := &#xD;
         If[speciesQ, ColorData[&amp;#034;Atoms&amp;#034;, data[[6, type]]], &#xD;
          ColorData[97, type]];&#xD;
        chemoffset = If[speciesQ, 1, 0];&#xD;
        (*offset for missing &amp;#034;Selective Dynamics&amp;#034; line as is common in \&#xD;
    CHG/CHGCAR: *)&#xD;
        chgoffset = &#xD;
         If[TrueQ[Length[data[[chemoffset + 8]]] &amp;gt; 0] &amp;amp;&amp;amp; &#xD;
           MatchQ[data[[chemoffset + 8, 1]], _?NumericQ], -1, 0];&#xD;
        &#xD;
        (*lattice vectors and atoms: *)&#xD;
        lattvec = data[[3 ;; 5]];&#xD;
        lattscale = data[[2]];&#xD;
        If[TrueQ[Length[lattscale] == 1], lattscale = lattscale[[1]]];&#xD;
        If[TrueQ[Sign[lattscale] == -1], &#xD;
         lattscale = (-lattscale/Det[lattvec])^(1/3)];&#xD;
        lattvec = &#xD;
         If[TrueQ[Length[lattscale] == 3], &#xD;
          N[lattscale[[#]]*lattvec[[#]]] &amp;amp; /@ Range[3], &#xD;
          N[lattscale*lattvec]];&#xD;
        conf = &#xD;
         Flatten[Join[&#xD;
           ConstantArray[#, data[[chemoffset + 6, #]]] &amp;amp; /@ &#xD;
            Range[Length[data[[chemoffset + 6]]]]]];&#xD;
        coord = &#xD;
         N[data[[chemoffset + chgoffset + &#xD;
              9 ;; (chemoffset + chgoffset + 8 + &#xD;
               Total[data[[chemoffset + 6]]]), 1 ;; 3]]];&#xD;
        &#xD;
        (*reprojection for cartesian coordinates: *)&#xD;
        If[TrueQ[Length[data[[chemoffset + chgoffset + 8]]] &amp;gt; 0] &amp;amp;&amp;amp; &#xD;
          StringMatchQ[ToString[data[[chemoffset + chgoffset + 8, 1]]], &#xD;
           &amp;#034;c*&amp;#034; | &amp;#034;k*&amp;#034;, IgnoreCase -&amp;gt; True],&#xD;
         If[TrueQ[Length[lattscale] == 3], coord = #*lattscale &amp;amp; /@ coord,&#xD;
           coord = coord*lattscale];&#xD;
         coord = coord.Inverse[lattvec]];&#xD;
        {coordP, confP} = {coord, conf};&#xD;
        &#xD;
        (*retraction, moving all atoms back into the cell: *)&#xD;
        If[retractq, With[{retracttol = 10^-4},&#xD;
          coordP = &#xD;
           Partition[&#xD;
            If[# &amp;gt; (1 - retracttol), # - 1, #] &amp;amp; /@ &#xD;
             Flatten[# - Floor[#] &amp;amp; /@ coordP], 3];&#xD;
          new = DeleteDuplicates[Transpose[{coordP, confP}],&#xD;
            (Norm[&#xD;
                 Round[#1[[1]], retracttol] - Round[#2[[1]], retracttol] -&#xD;
                   Floor[Round[#1[[1]], retracttol]] + &#xD;
                  Floor[Round[#2[[1]], retracttol]]] &amp;lt; &#xD;
                retracttol) &amp;amp;&amp;amp; (#1[[2]] == #2[[2]]) &amp;amp;];&#xD;
          {coordP, confP} = Transpose[new]]];&#xD;
        &#xD;
        (*periodic repetition: *)&#xD;
        coordP = &#xD;
         Flatten[Table[(# + {a, b, c}) &amp;amp; /@ coordP, {a, 0, &#xD;
            sysdim[[1]] - 1}, {b, 0, sysdim[[2]] - 1}, {c, 0, &#xD;
            sysdim[[3]] - 1}], 3];&#xD;
        confP = Flatten[ConstantArray[confP, Times @@ sysdim]];&#xD;
        &#xD;
        (*add peridic duplicates if desired: *)&#xD;
        If[TrueQ[addq],&#xD;
         new = Transpose[{coordP, confP}];&#xD;
         new = &#xD;
          Join[new, # + {{sysdim[[1]], 0, 0}, 0} &amp;amp; /@ &#xD;
            Select[new, &#xD;
             Abs[#[[1, 1]]] &amp;lt; 0.01 &amp;amp;], # + {{-sysdim[[1]], 0, 0}, 0} &amp;amp; /@ &#xD;
            Select[new, Abs[#[[1, 1]]] &amp;gt; 0.99*sysdim[[1]] &amp;amp;]];&#xD;
         new = &#xD;
          Join[new, # + {{0, sysdim[[2]], 0}, 0} &amp;amp; /@ &#xD;
            Select[new, &#xD;
             Abs[#[[1, 2]]] &amp;lt; 0.01 &amp;amp;], # + {{0, -sysdim[[2]], 0}, 0} &amp;amp; /@ &#xD;
            Select[new, Abs[#[[1, 2]]] &amp;gt; 0.99*sysdim[[2]] &amp;amp;]];&#xD;
         new = &#xD;
          Join[new, # + {{0, 0, sysdim[[3]]}, 0} &amp;amp; /@ &#xD;
            Select[new, &#xD;
             Abs[#[[1, 3]]] &amp;lt; 0.01 &amp;amp;], # + {{0, 0, -sysdim[[3]]}, 0} &amp;amp; /@ &#xD;
            Select[new, Abs[#[[1, 3]]] &amp;gt; 0.99*sysdim[[3]] &amp;amp;]];&#xD;
         {coordP, confP} = Transpose[new];&#xD;
         ];&#xD;
        &#xD;
        (*cell lines: *)&#xD;
        tubearrow[{tail_, head_}] := &#xD;
         With[{scale = .5*Sqrt[Mean[Norm /@ lattvec]*linerad]},&#xD;
          Tube[{tail, head - 4*scale*Normalize[head - tail], &#xD;
            head - 4*scale*Normalize[head - tail], head}, {linerad, &#xD;
            linerad, scale, 0}]];&#xD;
        lines = {linecol, Tube[#.lattvec, linerad] &amp;amp; /@ {&#xD;
            {{0, 0, #}, {1, 0, #}, {1, 1, #}, {0, 1, #}, {0, &#xD;
                0, #}} &amp;amp; /@ {0, 1},&#xD;
            {{0, 0, #} &amp;amp; /@ {0, 1}, {1, 0, #} &amp;amp; /@ {0, &#xD;
               1}, {1, 1, #} &amp;amp; /@ {0, 1}, {0, 1, #} &amp;amp; /@ {0, 1}}&#xD;
            }, tubearrow[{{0, 0, 0}, #}] &amp;amp; /@ lattvec};&#xD;
        &#xD;
        (*atoms: *)&#xD;
        atoms = &#xD;
         Tooltip[{atomcol[confP[[#]]], &#xD;
             Sphere[coordP[[#]].lattvec, atomrad]}, #] &amp;amp; /@ &#xD;
          Range[Length[confP]];&#xD;
        &#xD;
        (*bonds: *)&#xD;
        tuples = &#xD;
         Select[Subsets[Range[Length[confP]], {2}], &#xD;
          Norm[(coordP[[#]].lattvec)[[1]] - (coordP[[#]].lattvec)[[2]]] &amp;lt; &#xD;
            bonddist &amp;amp;];&#xD;
        bonds = If[TrueQ[tuples == {}], {},&#xD;
          If[monobond,&#xD;
             {bondcol, Tube[coordP[[#]].lattvec, bondrad]},&#xD;
             Table[{atomcol[confP[[#[[ii]]]]], &#xD;
               Tube[{coordP[[#[[ii]]]].lattvec, &#xD;
                 Total[coordP[[#]].lattvec]*.5}, bondrad]}, {ii, 1, 2}]&#xD;
             ] &amp;amp; /@ tuples];&#xD;
        &#xD;
        (*return the plot: *)&#xD;
        Graphics3D[{lines, bonds, atoms}, ImageSize -&amp;gt; Large, &#xD;
         BaseStyle -&amp;gt; {Specularity[Gray, 100]}, Boxed -&amp;gt; False, &#xD;
         SphericalRegion -&amp;gt; True, Lighting -&amp;gt; &amp;#034;Neutral&amp;#034;]&#xD;
        ]&#xD;
       &amp;amp;, &amp;#034;PNG&amp;#034;, &#xD;
      AppearanceRules -&amp;gt; &amp;lt;|&#xD;
        &amp;#034;Title&amp;#034; -&amp;gt; &amp;#034;Crystal Structure Viewer for VASP&amp;#034;|&amp;gt;], &#xD;
     Permissions -&amp;gt; &amp;#034;Public&amp;#034;]&#xD;
&#xD;
&#xD;
 [at0]: http://community.wolfram.com/web/chrishaydock137&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com/groups/-/m/t/787142&#xD;
  [2]: http://vasp.at/&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=sdf4562y4thrwbdfva.gif&amp;amp;userId=11733</description>
    <dc:creator>Bianca Eifert</dc:creator>
    <dc:date>2016-03-23T08:59:33Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/253270">
    <title>Solving a system of kinetic equations in the steady state</title>
    <link>https://community.wolfram.com/groups/-/m/t/253270</link>
    <description>[mcode]Clear[&amp;#034;Global&amp;#039;*&amp;#034;];
nut = 46; khi = 16; ro2 = 3400; kmrs = 4; kisu = 1.5; kmp = .5; kres \
= 25;
kccc1 = 38; k23 = 16; kvp = .04; kc = 21; nc = 5;
km2 = 15; nm2 = 5; kv1 = 17; nv1 = 6; kv2 = 200; nv2 = 4; k32 = 18; \
n32 = 9; a = .5;
odec = -(a c[t]) - (
   kccc1 c[t] (1 - 1/((c[t]/kv1)^nv1 + 1)))/((f3[t]/kv2)^nv2 + 1) - (
   kmrs c[t])/((fm[t]/km2)^nm2 + 1) + (khi nut)/((c[t]/kc)^nc + 1);
odefm = -(a fm[t]) + (kmrs c[t])/((fm[t]/km2)^nm2 + 1) - kisu fm[t] - 
   kmp fm[t] o2[t];
odefs = kisu fm[t] - a fs[t];
odemp = kmp fm[t] o2[t] - a mp[t];
odeo2 = -(kmp fm[t] o2[t]) - kres fs[t] o2[t] + 
   ro2/((o2[t]/245)^9 + 1);
odef2 = -(a f2[t]) - k23 f2[t] (1 - 1/((c[t]/k32)^n32 + 1)) + (
   kccc1 c[t] (1 - 1/((c[t]/kv1)^nv1 + 1)))/((f3[t]/kv2)^nv2 + 1);
odef3 = -(a f3[t]) + k23 f2[t] (1 - 1/((c[t]/k32)^n32 + 1)) - 
   kvp f3[t];
odevp = kvp f3[t] - a vp[t];
vars = {c[t], f2[t], f3[t], fm[t], fs[t], mp[t], o2[t], vp[t]};
solution = 
  NDSolve[{Derivative[1][c][t] == odec, Derivative[1][f2][t] == odef2,
     Derivative[1][f3][t] == odef3, Derivative[1][fm][t] == odefm, 
    Derivative[1][fs][t] == odefs, Derivative[1][mp][t] == odemp, 
    Derivative[1][o2][t] == odeo2, Derivative[1][vp][t] == odevp, 
    c[0] == 30, f2[0] == 100, f3[0] == 100, fm[0] == 50, fs[0] == 50, 
    mp[0] == 0, o2[0] == 100, vp[0] == 100}, vars, {t, 0, 31}];
vars
vars /. solution /. t -&amp;gt; 31[/mcode]I am trying to solve these equations for the steady state conditions (i.e. c&amp;#039;[t]=odec=0 and so on). When I try to add in these conditions, be it together or separately, I get that 0 is protected or that the system has more equations than dependent variables. I might also be using NDSolve wrong in this case and I might be better off using DSolve or something. Any hints or suggestions would be much appreciated.</description>
    <dc:creator>Josh Wofford</dc:creator>
    <dc:date>2014-05-17T19:08:56Z</dc:date>
  </item>
</rdf:RDF>

