<?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 viewed.</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/787142" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/131302" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2026904" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2068787" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1551098" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2115501" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1098055" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3217184" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/176000" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/126143" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/201504" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1732535" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/534384" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/188575" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/140887" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1190717" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/135497" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2927764" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/172875" />
      </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/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/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/2026904">
    <title>[WSS20]Design &amp;amp; Implementation of Data Structure of Crystalline Atomic Data</title>
    <link>https://community.wolfram.com/groups/-/m/t/2026904</link>
    <description>![frontimage][1]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=imagefront.jpg&amp;amp;userId=1316061&#xD;
  [2]: https://www.wolframcloud.com/obj/88bd85e6-8a15-4fe1-ab85-7da71b0ce10b</description>
    <dc:creator>Claudio Chaib</dc:creator>
    <dc:date>2020-07-14T02:04:22Z</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/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/2115501">
    <title>Wolfram Mineral Database - Composition of Different Atomic Elements</title>
    <link>https://community.wolfram.com/groups/-/m/t/2115501</link>
    <description># Proposal:&#xD;
&#xD;
*Wolfram&amp;#039;s mineral database is an interesting resource. In this work I will explore and account for the different chemical elements that are part of each mineral to perform an analysis as a whole. Here, the quantities of each element in each mineral will not be addressed, but only the different atomic elements in each mineral. Also, here in this work I exclude minerals that are formed by only 1 chemical element, that is, I consider only compound minerals. The analysis is done in two parts, the first part is an analysis without taking into account the water that may or may not be in the mineral, that is, the mineral completely dehydrated (only its composition that is linked by covalent bonds etc), the second part I analyze the minerals together with the water. In addition to having obtained a ranking of chemical elements in relation to all available minerals, in the end I get a percentage of how many minerals have oxygen and how many minerals have associated water in their composition.*&#xD;
&#xD;
# Database:&#xD;
&#xD;
Of course, Wolfram&amp;#039;s minerals database does not have all the minerals that exist, but it has a very decent amount, where we can make a very representative analysis. First we take the list of minerals in the database and calculate the number of entities:&#xD;
&#xD;
    minerals = EntityList[Entity[&amp;#034;Mineral&amp;#034;]];&#xD;
    Length@minerals&#xD;
&#xD;
![im1][1]&#xD;
&#xD;
Now we will associate each mineral with its chemical formula and, also obtain all the atomic symbols. This operation can take 2 to 3 hours to complete the download from Wolfram&amp;#039;s servers:&#xD;
&#xD;
    formulas = Map[#[&amp;#034;Formula&amp;#034;] &amp;amp;, minerals];&#xD;
    symbols = &#xD;
      Map[#[&amp;#034;AtomicSymbol&amp;#034;] &amp;amp;, EntityList[EntityClass[&amp;#034;Element&amp;#034;, All]]];&#xD;
&#xD;
To quickly make this information available for later use, we can save the data as an .mx file with the help of DumpSave:&#xD;
&#xD;
    filepath = FileNameJoin[{NotebookDirectory[], &amp;#034;formulas.mx&amp;#034;}];&#xD;
    filepath2 = FileNameJoin[{NotebookDirectory[], &amp;#034;symbols.mx&amp;#034;}];&#xD;
    DumpSave[filepath, {formulas}];&#xD;
    DumpSave[filepath2, {symbols}];&#xD;
    Quit[]&#xD;
&#xD;
That way we can retrieve the data for fast use whenever we want, using Get:&#xD;
&#xD;
    SetDirectory[NotebookDirectory[]];&#xD;
    Get[&amp;#034;formulas.mx&amp;#034;]&#xD;
    Get[&amp;#034;symbols.mx&amp;#034;]&#xD;
&#xD;
The definition of “symbols” below:&#xD;
&#xD;
    symbols&#xD;
&#xD;
![im2][2]&#xD;
&#xD;
Below is a simple function to have each mineral associated with its chemical formula in an easy way to visualize:&#xD;
&#xD;
    threadFormula[m_, n_] := &#xD;
      Thread[minerals[[m ;; n]] -&amp;gt; formulas[[m ;; n]]] // &#xD;
       Grid[Partition[#, 1], Frame -&amp;gt; All, Alignment -&amp;gt; Left] &amp;amp;;&#xD;
    &#xD;
    threadFormula[1000, 1010]&#xD;
&#xD;
![im3][3]&#xD;
&#xD;
# Data Excluding Water:&#xD;
&#xD;
Unfortunately the mineral formulas in the database are in a very complicated format to manipulate, as part is in String, part in Superscript, etc ... so we need to modify and alter the data in an intelligent way to obtain the formulas in a more computable form, at the same time we exclude water associated with minerals that have it:&#xD;
&#xD;
    a1 = {StringDelete[StringDelete[ToString[#], &amp;#034;{&amp;#034;], &amp;#034;}&amp;#034;]} &amp;amp; /@ &#xD;
       Table[Flatten@Apply[List, i, All], {i, formulas}];&#xD;
    a2 = Table[&#xD;
       StringDelete[&#xD;
        a1[[x]], {&amp;#034;(, H, 2, O, )&amp;#034;, &amp;#034;H, 2, O&amp;#034;, &#xD;
         &amp;#034; ScriptBaselineShifts&amp;#034; ~~ __}], {x, 1, Length@a1}];&#xD;
    &#xD;
    a2[[;; 10]]&#xD;
&#xD;
![im4][4]&#xD;
&#xD;
Now extracting the different chemical elements for each mineral and excluding the minerals formed by just one chemical element. Note that the number of minerals went from 3878 to 3778:&#xD;
&#xD;
    a3 = Union[#] &amp;amp; /@ &#xD;
       Flatten[StringCases[#, ReverseSortBy[symbols, Length]] &amp;amp; /@ a2, 1];&#xD;
    a4 = Table[If[Length@a3[[z]] &amp;gt; 1, a3[[z]], Nothing], {z, 1, Length@a3}]&#xD;
    Length@a4&#xD;
&#xD;
![im5][5]&#xD;
&#xD;
Finally, we can count the composition of different atomic elements that are part of all the minerals in the database. We can see that there are 70 different elements in this list:&#xD;
&#xD;
    a5 = Association[Reverse@SortBy[Normal@Counts@Flatten@a4, Last]]&#xD;
    Length@a5&#xD;
&#xD;
![im6][6]&#xD;
&#xD;
We can set up a Dataset with the elements and their position (ranking) that are part of all minerals for better visualization:&#xD;
&#xD;
    Transpose[&#xD;
      Partition[&#xD;
       Keys@# -&amp;gt; &#xD;
          Quantity[Position[Normal@a5, #][[1, 1]], &#xD;
           IndependentUnit[&amp;#034;position&amp;#034;]] &amp;amp; /@ Normal@a5 , 10]] // Dataset&#xD;
&#xD;
![im7][7]&#xD;
&#xD;
For the next parts of this work we have to define the two rules below:&#xD;
&#xD;
    rule1 = Thread[Flatten[Position[symbols, #] &amp;amp; /@ symbols] -&amp;gt; symbols];&#xD;
    rule2 = Join[{0 -&amp;gt; &amp;#034;Water&amp;#034;}, rule1];&#xD;
&#xD;
With some manipulation of the data, we can for example reorganize the elements in the order they are in the periodic table, that is, in the order of the atomic number, as well as other useful lists to create some graphs and analyzes:&#xD;
&#xD;
    b1 = Table[{Sort[Thread[{Keys@a5, Values@a5}]][[x, &#xD;
         1]], {Sort[Thread[{Keys@a5, Values@a5}]][[x, 2]]}}, {x, 1, &#xD;
        Length@a5}];&#xD;
    b2 = Table[&#xD;
       Entity[&amp;#034;Element&amp;#034;, b1[[x, 1]]][&amp;#034;AtomicNumber&amp;#034;], {x, 1, Length@b1}];&#xD;
    b3 = SortBy[Table[{b2[[x]], b1[[x, 2, 1]]}, {x, 1, Length@b2}], First];&#xD;
    b4 = Association@&#xD;
       Table[(b3[[x, 1]] /. rule1) -&amp;gt; b3[[x, 2]], {x, 1, Length@b3}];&#xD;
    b5 = Table[{b3[[x, 1]] /. rule1, b3[[x, 2]]}, {x, 1, Length@b3}];&#xD;
    b4&#xD;
&#xD;
![im8][8]&#xD;
&#xD;
The first plot we have is the different chemical elements that form all the minerals in decreasing order of quantity in which they appear in the whole:&#xD;
&#xD;
    ListPlot[Tooltip /@ a5, ImageSize -&amp;gt; 1000, PlotRange -&amp;gt; All, &#xD;
     Axes -&amp;gt; {None, Automatic}, GridLines -&amp;gt; {None, Automatic}]&#xD;
&#xD;
![im9][9]&#xD;
&#xD;
The next plot is the different chemical elements that make up all the mineral samples, but in the order of atomic number. This visualization is interesting because it relates to the periodic table:&#xD;
&#xD;
    ListLinePlot[&#xD;
     Callout[#[[2]], Style[{#}, 10, Red, Bold], CalloutStyle -&amp;gt; Red] &amp;amp; /@ &#xD;
      b5, ImageSize -&amp;gt; 1000, PlotRange -&amp;gt; All, &#xD;
     PlotMarkers -&amp;gt; {Automatic, Scaled[0.01]}, &#xD;
     GridLines -&amp;gt; {Table[{x, Dashed}, {x, 1, 70}], None}, &#xD;
     PlotStyle -&amp;gt; Thin]&#xD;
&#xD;
![im10][10]&#xD;
&#xD;
We can view it also in the form of WordCloud:&#xD;
&#xD;
    WordCloud[b5, ImageSize -&amp;gt; Large]&#xD;
&#xD;
![im11][11]&#xD;
&#xD;
# Result of Oxygen:&#xD;
&#xD;
To conclude the initial analysis, we can see in how many percent of the minerals that there is oxygen attached to the molecular structure in relation to all minerals. We see that this value can reach up to 80%:&#xD;
&#xD;
    &amp;#034;OxygenInTotal&amp;#034; -&amp;gt; Quantity[N[100*b4[&amp;#034;O&amp;#034;]/Length@a4], &amp;#034;Percent&amp;#034;]&#xD;
&#xD;
![im12][12]&#xD;
&#xD;
# Data with Water:&#xD;
&#xD;
With some differences in relation to the first part of this work, instead of excluding water, we can define a new water entity to be included in the formula of the minerals that contain it:&#xD;
&#xD;
    a2W = Table[&#xD;
       StringReplace[&#xD;
        a1[[x]], {&amp;#034;(, H, 2, O, )&amp;#034; -&amp;gt; &amp;#034;Water&amp;#034;, &amp;#034;H, 2, O&amp;#034; -&amp;gt; &amp;#034;Water&amp;#034;, &#xD;
         &amp;#034; ScriptBaselineShifts&amp;#034; ~~ __ -&amp;gt; &amp;#034;&amp;#034;}], {x, 1, Length@a1}];&#xD;
    &#xD;
    a2W[[;; 10]]&#xD;
&#xD;
![im13][13]&#xD;
&#xD;
With a similar code, with only a few differences, we do the same extraction of atomic symbols plus water in each mineral. Again, we exclude minerals formed by only 1 chemical element:&#xD;
&#xD;
    a3W = Union[#] &amp;amp; /@ &#xD;
       Flatten[StringCases[#, &#xD;
           ReverseSortBy[Join[symbols, {&amp;#034;Water&amp;#034;}], Length]] &amp;amp; /@ a2W, 1];&#xD;
    a4W = Table[&#xD;
      If[Length@a3W[[z]] &amp;gt; 1, a3W[[z]], Nothing], {z, 1, Length@a3W}]&#xD;
    Length@a4W&#xD;
&#xD;
![im14][14]&#xD;
&#xD;
And, again with some manipulation of the data, we created lists and associations to have the result in quantities (including water). Some of these definitions will also be used below to have some plots:&#xD;
&#xD;
    a5W = Association[Reverse@SortBy[Normal@Counts@Flatten@a4W, Last]];&#xD;
    a5W&#xD;
    Length@a5W&#xD;
    b1W = Table[{Sort[Thread[{Keys@a5W, Values@a5W}]][[x, &#xD;
         1]], {Sort[Thread[{Keys@a5W, Values@a5W}]][[x, 2]]}}, {x, 1, &#xD;
        Length@a5W}];&#xD;
    b2W = Table[&#xD;
        Entity[&amp;#034;Element&amp;#034;, b1W[[x, 1]]][&amp;#034;AtomicNumber&amp;#034;], {x, 1, &#xD;
         Length@b1W}] /. {Missing[&#xD;
          &amp;#034;UnknownEntity&amp;#034;, {&amp;#034;Element&amp;#034;, &amp;#034;Water&amp;#034;}] -&amp;gt; 0};&#xD;
    b3W = SortBy[Table[{b2W[[x]], b1W[[x, 2, 1]]}, {x, 1, Length@b2W}], &#xD;
       First];&#xD;
    b4W = Association@&#xD;
       Table[(b3W[[x, 1]] /. rule2) -&amp;gt; b3W[[x, 2]], {x, 1, Length@b3W}];&#xD;
    b5W = Table[{b3W[[x, 1]] /. rule2, b3W[[x, 2]]}, {x, 1, Length@b3W}];&#xD;
&#xD;
![im15][15]&#xD;
&#xD;
The water being included together with the decreasing order of the amounts of different chemical elements that are part of all minerals:&#xD;
&#xD;
    ListPlot[Tooltip /@ a5W, ImageSize -&amp;gt; 1000, PlotRange -&amp;gt; All, &#xD;
     Axes -&amp;gt; {None, Automatic}, GridLines -&amp;gt; {None, Automatic}]&#xD;
&#xD;
![im16][16]&#xD;
&#xD;
A plot similar to that of the first part of the work, in ascending order of atomic number, but including water and it appears before hydrogen (water defined as position 0) just for viewing:&#xD;
&#xD;
    ListLinePlot[&#xD;
     Callout[#[[2]], Style[{#}, 10, Red, Bold], CalloutStyle -&amp;gt; Red] &amp;amp; /@ &#xD;
      b5W, ImageSize -&amp;gt; 1000, PlotRange -&amp;gt; All, &#xD;
     PlotMarkers -&amp;gt; {Automatic, Scaled[0.01]}, &#xD;
     GridLines -&amp;gt; {Table[{x, Dashed}, {x, 1, 71}], None}, &#xD;
     PlotStyle -&amp;gt; Thin]&#xD;
&#xD;
![im17][17]&#xD;
&#xD;
Visualization using WordCloud including water:&#xD;
&#xD;
    WordCloud[a5W, ImageSize -&amp;gt; Large]&#xD;
&#xD;
![im18][18]&#xD;
&#xD;
# Result of Water:&#xD;
&#xD;
In the way below we calculate how many percent of minerals have water associated with its composition in relation to all available minerals. We can see that an expressive part of them have water (hydrated minerals), more than 1/3 of them:&#xD;
&#xD;
    &amp;#034;WaterInTotal&amp;#034; -&amp;gt; Quantity[N[100*a5W[&amp;#034;Water&amp;#034;]/Length@a4W], &amp;#034;Percent&amp;#034;]&#xD;
&#xD;
![im19][19]&#xD;
&#xD;
# Conclusion and Notes:&#xD;
&#xD;
- A significant amount of minerals have some oxygen in the chemical composition: 80% of them.&#xD;
&#xD;
- A good part of minerals have water associated with its molecule: 35% of them.&#xD;
&#xD;
It is worth mentioning that there may be some flaws in the exclusion and inclusion of water in the calculations, as for example, some organic minerals and some others may be erroneously influenced by the rules stipulated in this work. But it is a minority of these minerals, so although there is some variation in these percentages the value is satisfactorily approximate.&#xD;
&#xD;
In the future it would be interesting to also analyze the amounts of each chemical element in minerals and not only an analysis as presented here that only counts the different chemical elements. It proved difficult to do this type of analysis because the mineral formulas are in a complex format for computability.&#xD;
&#xD;
My personal opinion is: it is very interesting that in most minerals we can extract oxygen and water (more from the first than the second) with some physical-chemical treatment, sometimes this can be done in a simple way, sometimes in a complex way, but it demonstrates how there is enough oxygen and water inside the earth&amp;#039;s crust, and not only coming from the oceans, from the very formation of our planet.&#xD;
&#xD;
Thanks.&#xD;
&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1513im1.png&amp;amp;userId=1316061&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=9107im2.png&amp;amp;userId=1316061&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=7916im3.png&amp;amp;userId=1316061&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4965im4.png&amp;amp;userId=1316061&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=7193im5.png&amp;amp;userId=1316061&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=8332im6.png&amp;amp;userId=1316061&#xD;
  [7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1159im7.png&amp;amp;userId=1316061&#xD;
  [8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=7568im8.png&amp;amp;userId=1316061&#xD;
  [9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2146im9.png&amp;amp;userId=1316061&#xD;
  [10]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1588im10.png&amp;amp;userId=1316061&#xD;
  [11]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2712im11.png&amp;amp;userId=1316061&#xD;
  [12]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2750im12.png&amp;amp;userId=1316061&#xD;
  [13]: https://community.wolfram.com//c/portal/getImageAttachment?filename=7119im13.png&amp;amp;userId=1316061&#xD;
  [14]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3232im14.png&amp;amp;userId=1316061&#xD;
  [15]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4654im15.png&amp;amp;userId=1316061&#xD;
  [16]: https://community.wolfram.com//c/portal/getImageAttachment?filename=im16.png&amp;amp;userId=1316061&#xD;
  [17]: https://community.wolfram.com//c/portal/getImageAttachment?filename=im17.png&amp;amp;userId=1316061&#xD;
  [18]: https://community.wolfram.com//c/portal/getImageAttachment?filename=im18.png&amp;amp;userId=1316061&#xD;
  [19]: https://community.wolfram.com//c/portal/getImageAttachment?filename=im19.png&amp;amp;userId=1316061</description>
    <dc:creator>Claudio Chaib</dc:creator>
    <dc:date>2020-11-15T23:14:04Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1098055">
    <title>The periodic table - powered by Wolfram Language</title>
    <link>https://community.wolfram.com/groups/-/m/t/1098055</link>
    <description>Recently, I&amp;#039;ve been working on a project called Mandy, an interactive periodic table that displays different element trends depending on what the user says to her.  The Raspberry Pi/Mathematica duo has played a very strong role in all aspects of the project design and implementation.&#xD;
&#xD;
I&amp;#039;m not allowed to provide too many details about the project (not because it&amp;#039;s secret, but because I am moving in a month and my wife has ordered that all of my toys and hobbies get packed or I risk them being left behind).  Therefore, I [created a teaser trailer][2] showcasing the design with a promise to provide more details when I get settled in my new location.&#xD;
&#xD;
[![enter image description here][3]][2]&#xD;
&#xD;
[![enter image description here][4]][2]&#xD;
&#xD;
That said, I wanted to highlight a couple of areas where Mathematica played a pivotal role in the the project.  My goal was to create a periodic table display (approximately 24x18&amp;#034;) that has a RGB LED for each element.  The color of the element would then be based on a given periodic trend (atomic radius, weight, ionization energy, etc.).  Controlling 118 3-color LEDs turns out to be very easy when the LEDs are Neopixels and the controller is an Arduino.  Because I envisioned a wall display, I wanted the user to interact with the piece in some fashion other than a mouse or keyboard.  I have started working on a voice recognition system based on pocketsphinx which I call [Simplified Command and Control - SCAC](https://bobthechemist.com/2015/12/prelude-to-simplified-command-and-control/) but since it is a C/Python project, I&amp;#039;ll leave that component for another forum.  In summary, the final project requires that SCAC (a python script) interact with Mathematica (data manipulation) that then speaks to an Arduino via a serial connection.  But Mathematica played a big role prior to the implementation as well:&#xD;
&#xD;
## Design&#xD;
&#xD;
- With access to `ElementData`, I was able to very quickly create an image that could be sent to a laser cutter for carving the birch-wood frame and the acrylic element pieces.&#xD;
&#xD;
        o = Table[&#xD;
           Map[ElementData[i, #] &amp;amp;, {&amp;#034;AtomicNumber&amp;#034;, &amp;#034;Symbol&amp;#034;, &amp;#034;Period&amp;#034;, &#xD;
             &amp;#034;Group&amp;#034;}], {i, 118}];&#xD;
        (* Need to massage the f-block elements,giving them fake groups and \&#xD;
        periods.Making their periods 9 and 10 with their groups 3 through 16 \&#xD;
        works nicely *)&#xD;
        o[[57 ;; 70]] = Module[{i = 1, rep = Range[3, 16], tmp},&#xD;
           tmp = Select[o, 57 &amp;lt;= #[[1]] &amp;lt;= 70 &amp;amp;] /. {6 -&amp;gt; 9};&#xD;
           tmp /. {Missing[&amp;#034;NotApplicable&amp;#034;] :&amp;gt; rep[[i++]]}];&#xD;
        o[[89 ;; 102]] = Module[{i = 1, rep = Range[3, 16], tmp},&#xD;
           tmp = Select[o, 89 &amp;lt;= #[[1]] &amp;lt;= 102 &amp;amp;] /. {7 -&amp;gt; 10};&#xD;
           tmp /. {Missing[&amp;#034;NotApplicable&amp;#034;] :&amp;gt; rep[[i++]]}];&#xD;
        o = o /. {&amp;#034;Uut&amp;#034; -&amp;gt; &amp;#034;Nh&amp;#034;, &amp;#034;Uup&amp;#034; -&amp;gt; &amp;#034;Mc&amp;#034;, &amp;#034;Uus&amp;#034; -&amp;gt; &amp;#034;Ts&amp;#034;, &amp;#034;Uuo&amp;#034; -&amp;gt; &amp;#034;Og&amp;#034;};&#xD;
        piece = Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}, {0, 0}}];&#xD;
        Clear[box]&#xD;
        box[array_] := Module[{x, y, m = 10},&#xD;
          {x, y} = array[[{4, 3}]];&#xD;
          {FaceForm[None], EdgeForm[Thin],&#xD;
           Rectangle[{m x, m (10 - y)}, {m (x + 1), m (11 - y)}]&#xD;
           (*Inset[Style[array[[2]],10,Bold],{m (x+0.5),m(10.7-y)}],&#xD;
           Inset[Style[array[[1]],8],{m(x+0.5),m(10.2-y)}]*)}&#xD;
          ]&#xD;
        makePiece[pt_] := GeometricTransformation[&#xD;
           GeometricTransformation[piece, {pt[[1]], 10 - pt[[2]]}*{1.2, 1.2}],&#xD;
           ScalingTransform[{10, 10}]];&#xD;
        ptpuzzle = &#xD;
          Graphics[{EdgeForm[Thin], FaceForm[None], &#xD;
            makePiece /@ o[[All, {4, 3}]]}];&#xD;
        Clear[letters2]&#xD;
        letters2[array_] := Module[{x, y, m = 10},&#xD;
          {x, y} = array[[{4, 3}]];&#xD;
          {FaceForm[None], EdgeForm[Thin],&#xD;
           (*Rectangle[{m x,m(10-y)},{m(x+1),m(11-y)}]*)&#xD;
           Inset[Style[array[[2]], 8, Bold, &#xD;
             FontFamily -&amp;gt; &amp;#034;Cambria Math&amp;#034;], {m (x + 0.45), &#xD;
              m (10.55 - y)}*{1.2, 1.2}],&#xD;
           Inset[Style[array[[1]], 6, &#xD;
             FontFamily -&amp;gt; &amp;#034;Cambria Math&amp;#034;], {m (x + 0.45), m (10.2 - y)}*{1.2,&#xD;
               1.2}]}&#xD;
          ]&#xD;
        ptpuzzlelt = letters2 /@ o // Graphics;&#xD;
        Show[ptpuzzlelt, ptpuzzle, ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
There are easier ways to create a periodic table, but the above method allowed me to create SVG images suitable for tweaking in vector graphics software and cut with the laser cutter.&#xD;
&#xD;
## Data&#xD;
&#xD;
Naturally, `ElementData` can provide the physical and chemical properties of the elements that I want to display on Mandy.  There&amp;#039;s nothing inspiring about this code (grabbing the data, rescaling it and converting values to a corresponding color scheme).  Mathematica provided a useful platform for sandboxing what the trends would look like:&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
## Implementation&#xD;
&#xD;
Since speech recognition (SCAC) is written in Python, I needed to control a Mathematica Kernel from within Python.  I&amp;#039;ve [played with this idea before](https://github.com/bobthechemist/python-mathlink) which results in a functioning platform that is error-intolerant (READ: not ready for prime time).  Communication with the Arduino is done through a &amp;#034;Serial&amp;#034; device instead of the &amp;#034;Arduino&amp;#034; device because I started this project before the latter was working.  That said, it was pretty straightforward to create a Mathematica Package that (a) opens serial communication with the Arduino, (b) Reads in the element-LED data (c) sends a command to the Arduino to light the LEDs.&#xD;
&#xD;
I plan to post more details about the project, including code and design pictures, in due time.  See [my website](https://bobthechemist.com/2017/05/mandy-the-periodic-table-teaser/) for updates.  RIght now, it sounds like I&amp;#039;ve used up my daily allocation of blogging time and have to go pack some boxes.&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=trends.gif&amp;amp;userId=61884&#xD;
  [2]: https://www.youtube.com/watch?v=eI-IgJ3n_RU&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2017-08-04at7.37.04AM.png&amp;amp;userId=11733&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2017-08-04at7.37.59AM.png&amp;amp;userId=11733&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Capture.JPG&amp;amp;userId=61884&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=trends.gif&amp;amp;userId=61884</description>
    <dc:creator>BoB LeSuer</dc:creator>
    <dc:date>2017-05-18T15:11:29Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3217184">
    <title>[WSRP24] Distributions of shape parameters for randomly generated amino acid sequences</title>
    <link>https://community.wolfram.com/groups/-/m/t/3217184</link>
    <description>![Analyzing Protein Shape Characteristics][1]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2024-07-11at5.58.59%E2%80%AFPM.png&amp;amp;userId=3216761&#xD;
  [2]: https://www.wolframcloud.com/obj/d7874cb2-0b6f-4451-8c73-67bb1a147a12</description>
    <dc:creator>Annie Zhu</dc:creator>
    <dc:date>2024-07-11T22:06:58Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/176000">
    <title>Export as 3D file type STL for 3D printing</title>
    <link>https://community.wolfram.com/groups/-/m/t/176000</link>
    <description>hi all,&#xD;
&#xD;
i have a ContourPlot of an equation and would like to export it as a 3D file type.&#xD;
[mcode]ContourPlot3D[ x^2 + y^2 - x^2*z + y^2*z + z^2 - 1 == 0, {x, -3, 3}, {y, -3,   3}, {z, -3, 3}][/mcode]&#xD;
can anyone tell me what to add to something like this in order to get it out as a 3D file but also /where/ i should expect this file to go?&#xD;
&#xD;
i am searching the help database and must admit that i sometimes have to be shown how to do these things since the pickorder and/or the syntax sometimes is hard for me to figure out.&#xD;
&#xD;
thanks in advance for any help.&#xD;
&#xD;
Jon</description>
    <dc:creator>Jonathan Chertok</dc:creator>
    <dc:date>2013-12-28T19:25:48Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/126143">
    <title>Fitting system of Differential equations to a dataset</title>
    <link>https://community.wolfram.com/groups/-/m/t/126143</link>
    <description>Hello everyone! I am trying to model the kinetics of an experimental system. I am trying to find the values of 3 variables in a system of differential equations by fitting them to an experimental data set. I have values for &amp;#034;g&amp;#034; as a function of time and I would like to find the values of &amp;#034;k1&amp;#034;, &amp;#034;k2&amp;#034;, and &amp;#034;k3&amp;#034; that provide the best fit to my data with minimun and maximum value constraints. The values of the k&amp;#039;s in my example below are the correct values, as I have set this up to learn how so I can apply it to a more complex system. I&amp;#039;ve tried to learn through the online resources of Mathematica but I am having trouble getting it to work for me. [b]So in short, I would like to find the values of k1, k2, and k3 that solve my set of equations to best fit my experimental values of g. [/b]

Notebook below: [mcode]k1 = 20;
k2 = 10;
k3 = 2;
totaltime = 3;[/mcode][mcode]dataset1 = {{0, 0}, {0.15, 0.271161}, {0.3, 0.525314}, {0.45, 
    0.68284}, {0.6, 0.782049}, {0.75, 0.846992}, {0.9, 
    0.890934}, {1.05, 0.921414}, {1.5, 0.969472}};[/mcode][mcode]solution = NDSolve[
   {a&amp;#039;[t] == -k1*a[t]*b[t],
    b&amp;#039;[t] == -k1*a[t]*b[t],
    c&amp;#039;[t] == k1*a[t]*b[t] - k3*c[t]*f[t],
    d&amp;#039;[t] == -k2*d[t]*e[t],
    e&amp;#039;[t] == -k2*d[t]*e[t],
    f&amp;#039;[t] == k2*d[t]*e[t] - k3*c[t]*f[t],
    g&amp;#039;[t] == k3*c[t]*f[t],
    a[0] == 5,
    b[0] == 2,
    c[0] == 0,
    d[0] == 2,
    e[0] == 1,
    f[0] == 0,
    g[0] == 0},
   {a, b, c, d, e, f, g},
   {t, 0, totaltime},
   MaxSteps -&amp;gt; Infinity];
Show[{ListPlot[dataset1, PlotRange -&amp;gt; {{0, 1.6}, {0, 1}}, 
   PlotRangeClipping -&amp;gt; True]}, 
 Plot[Evaluate[{f[t], g[t]} /. solution],
  {t, 0, totaltime}, PlotLegends -&amp;gt; {&amp;#034;f&amp;#034;, &amp;#034;g&amp;#034;}]][/mcode]</description>
    <dc:creator>A Magyar</dc:creator>
    <dc:date>2013-09-18T16:34:21Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/201504">
    <title>Yet another Wolfram/RPi spectrometer - this time with RaspiCam</title>
    <link>https://community.wolfram.com/groups/-/m/t/201504</link>
    <description>Recently, I tried making a visible spectrometer using the Raspberry pi, the camera module and Mathematica.  Details are posted [url=http://www.bobthechemist.com/interactive-chemistry/16-wolfspec-2-0]here[/url], but here&amp;#039;s a brief summary.  The spectrometer is built out of legos and a few components found around my house (and since I&amp;#039;m a Chemistry professor, diffraction gratings and cuvettes are really found around my house).&#xD;
&#xD;
[img=width: 350px; height: 311px;]http://www.bobthechemist.com/images/images/rpi/oldarticles/wolfspec2inst1.png[/img]&#xD;
&#xD;
The light source (in the upper right hand corner) is a white RGB LED.  Immediate to the left is the sample compartment (which unfortunately is just a little too big for a standard sized cuvette).  Next comes a transmission diffraction grating which is a common supply in general physics classes.  I then use a 10x magnifying lens to condense the light onto a business card.  At the bottom right in the picture is the camera module (connected by the white ribbon to my Raspberry Pi and mounted using a hodge-podge of Legos).  The camera is pointed towards the business card.&#xD;
&#xD;
Unlike [url=http://www.bobthechemist.com/interactive-chemistry/15-wolfspec-version-1-0]my first version of a spectrometer[/url], this version doesn&amp;#039;t require any additional GPIO interfacing or MathLink programming; everything can be done within a typical Mathematica notebook without additional packages.  I acquire images using Import and then use ImageTake to grab just the region of interest.  Here are some example images of the empty spectrometer and with three samples: water, green food coloring and red food coloring.&#xD;
[img=width: 500px; height: 61px;]http://www.bobthechemist.com/images/images/rpi/oldarticles/spectrographs.png[/img]&#xD;
 &#xD;
In order to get spectra out of these images, I do 3 things:&#xD;
&#xD;
1. Convert the images into data with ImageData and then average each of the rows&#xD;
2. Convert the y axis into absorbance.&#xD;
3. Calibrate the x axis by assuming that the RGB LED emits red, green and blue light at the expected wavelengths.&#xD;
&#xD;
The code for these steps is fairly straightforward, and demonstrates how easy it is to manipulate Images, process array data rapidly, and perform linear fitting statistics with just a few lines of code.  For the samples above, I ended up with the following spectra:&#xD;
[img=width: 460px; height: 239px;]http://www.bobthechemist.com/images/images/rpi/oldarticles/calibrated.png[/img]&#xD;
The results are decent, given the quick and dirty calibration, the limitations of my source and the lack of any robust alignment of my &amp;#034;optical bench&amp;#034;.  With some modifications, I suspect I can improve the wavelength resolution, although I will probably be limited by the source, which doesn&amp;#039;t have a continuous emission across the visible region of the electromagnetic spectrum.  The system is easy enough to build at home, however, to serve as a spectroscopic tool for science fair experiments or other kitchen chemistry projects.  </description>
    <dc:creator>BoB LeSuer</dc:creator>
    <dc:date>2014-02-17T02:48:24Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1732535">
    <title>[WSC19] A Computational Method to Predict X Ray Diffraction (XRD) Patterns</title>
    <link>https://community.wolfram.com/groups/-/m/t/1732535</link>
    <description>![Predicted vs Experimental Silver XRD Pattern. Experimental plot obtained from: Koohpeima, Fatemeh &amp;amp; Mokhtari, Mohammad &amp;amp; Samaneh, KHALAFI. (2017). The effect of silver nanoparticles on composite shear bond strength to dentin with different adhesion protocols. Journal of Applied Oral Science. 25. 367-373. 10.1590/1678-7757-2016-0391. ][1]&#xD;
&#xD;
## A Computational Method to Predict X Ray Diffraction (XRD) Patterns ##&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
## Background ##&#xD;
&#xD;
Ever wondered how DNA&amp;#039;s double helix structure was discovered? How drugs are investigated? Well, welcome to the world of  X-ray diffraction! 13 Nobel prizes were awarded for developments involving this old but effective technique, in fields ranging from physics to medicine. But, how is it so effective?&#xD;
&#xD;
XRD is a powerful technique employed in various domains of science to determine the chemical makeup and thereby physical properties of various structures. Each lattice structure has its own &amp;#034;XRD fingerprint&amp;#034; which keys scientists in to its chemical makeup. This fingerprint is characterized by peaks with different intensities at different angles. Here is a sample for a face-centered cubic copper lattice structure:&#xD;
&#xD;
![Copper XRD pattern: From X-Ray Diffraction Studies of Copper Nanopowder (arXiv:1003.6068v1 [physics.gen-ph])][2]&#xD;
&#xD;
The first image in this post is a comparison of experimental and predicted results for a Silver crystal structure.&#xD;
&#xD;
However, predicting these fingerprints given little experimental data is a mathematically involved procedure. This summer, as part of the Wolfram High School Summer Camp, I implemented a framework for predicting these fingerprints for various cubic lattice structures.&#xD;
&#xD;
## Creating the Program ##&#xD;
&#xD;
----------&#xD;
## Getting the Bragg Peak Positions ##&#xD;
&#xD;
You might be wondering what the numbers on the top of the peaks mean. These numbers are Miller indices, which are descriptions of the planes in a unit cell that are producing the peaks. The first step is to use these planes to generate the Bragg peak positions:&#xD;
&#xD;
$$d=\frac{a}{\sqrt{h^2+k^2+l^2}}$$&#xD;
$$ \theta =2\arcsin{\left(\frac{\lambda}{2 d}\right)} $$&#xD;
&#xD;
Here, $a$ denotes the lattice constant (length of a side in a cubic unit cell), $(h,k,l)$ denote the Miller indices, and $\lambda$ denotes the wavelength of the X-ray used. This is based on Bragg&amp;#039;s law, see https://demonstrations.wolfram.com/BraggsLaw/ . &#xD;
&#xD;
However, certain $(h,k,l)$ are forbidden in some structures. For example, in a body-centered cubic structure, $ h+k+l$ has to be even. The function `PossiblePlanes` accounts for these and has access to an extensive dataset of compounds and their structures.&#xD;
&#xD;
To make coding easier, a list of associations was made with a certain $\theta$ being the key for a list of $hkl$ values. &#xD;
&#xD;
&#xD;
    grouped[elementlist_, n_] := &#xD;
     GroupBy[ PossiblePlanes[elementlist, n], &#xD;
      1/Sqrt[(#[[1]]^2 + #[[2]]^2 + #[[3]]^2)] &amp;amp;]&#xD;
    &#xD;
    association[elementlist_, n_, wavelength_] := &#xD;
     Sort[MapThread[#1 -&amp;gt; #2 &amp;amp;, {ToTheta[wavelength, elementlist, n], &#xD;
        grouped[elementlist, n] // Values}]]&#xD;
&#xD;
## Atomic Form Factor ##&#xD;
To account for different electron densities, atomic form factors were calculated using a dataset tabulated by the  International Tables for Crystallography: http://it.iucr.org/Cb/ch6o1v0001/.  These form factors vary by angle; shown below is copper:&#xD;
![Copper&amp;#039;s Atomic Form Factor][3]&#xD;
&#xD;
These atomic form factors are then used in the structure factor calculation, which is directly proportional to the square root of intensity. For unary systems, the structure factor calculation is relatively easy. For binary systems, however, the parity of the Miller indices must be taken into account.&#xD;
&#xD;
    evenodd[b_, elementlist_, theta_, w_] := &#xD;
     If[b, Total[atomdata[#, theta, w] &amp;amp; /@ elementlist], &#xD;
      Differences[atomdata[#, theta, w] &amp;amp; /@ elementlist] // First]&#xD;
&#xD;
Here, `atomdata` gives the atomic form factor at a specific point. This function is mapped to a set of True/False (Even or not) values and returns the structure factor. For a face-centered cubic cell, if the parity of $hkl$ is even, then the atomic form factors are summed, but if the parity is odd, the atomic form factors are subtracted.&#xD;
## Multiplicities ##&#xD;
Now, back to the Miller indices. Take a look at the following graphic:&#xD;
&#xD;
![Miller Indices Felix Kling.svg. (n.d.). Retrieved from WikiMedia ][4]&#xD;
&#xD;
You might notice that if we reflect $(100)$ we can get $(010)$ and $(001)$ . We can also get negative indices, usually denoted $\overline{1}$ instead of $-1$. This gives us 6 total planes that are symmetry-equivalent, and correspond to the same peak. Hence, we say that the class of Miller indices $(h00)$ has a multiplicity of 6. These multiplicities range from 6 to 48 for a cubic lattice structure, but can get as low as 2 with less symmetric structures. &#xD;
&#xD;
Therefore, instead of calculating the contributed intensity of each plane, we count them as one plane and multiply the resultant intensity by a specific multiplicity. This multiplicity is then used to calculate peak intensity.&#xD;
## Intensity Calculation ##&#xD;
$$I_{hkl}=\underbrace{\frac{1+\cos^2 (2\theta)}{\sin^2(\theta)}}_{\text{Lorentz Polarization Correction}} \times \ \ \ \ \   \text{Multiplicity}_{hkl}  \ \ \ \times \underbrace{F_{hkl}^2}_{\text{Structure Factor}}$$&#xD;
&#xD;
The Lorentz polarization correction was introduced to improve accuracy and match experimental conditions as X-rays will not be completely polarized at every angle.&#xD;
&#xD;
    intensity[w_, elementlist_, n_] := &#xD;
     Transpose@{(association[Flatten @ elementlist, n, w] // &#xD;
         Keys), (.5 (1 + (Cos[#])^2)/(Sin[#/2]^2 * &#xD;
               Cos[#/2])) &amp;amp; /@ (association[Flatten @ elementlist, n, w] //&#xD;
            Keys) *&#xD;
        (multiplicity /@ (Last /@ (association[Flatten @ elementlist, n, &#xD;
               w] // Values)))*(structurefactor[elementlist, &#xD;
           w, (association[Flatten @ elementlist, n, w])]) ^2 }&#xD;
&#xD;
`intensity` gives a list of Bragg peak positions and their respective intensities using the aforementioned formula. This intensity function is then inputed in a function which finally plots the diffraction pattern.&#xD;
&#xD;
    peak[{theta_, intensity_}] :=  &#xD;
     intensity * Exp[-10000 Pi (t - theta)^2]&#xD;
Where $t$ is the variable to be plotted against.&#xD;
Here is a comparison of the predicted XRD pattern vs the real diffracted pattern for a Copper FCC structure:&#xD;
&#xD;
![Experimental vs. Predicted XRD Pattern][5]&#xD;
&#xD;
The absolute intensities have little use, as relative intensities are primarily used to analyze these patterns. &#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
## Future Research ##&#xD;
&#xD;
For future research, I have many ideas I want to implement. Thanks to Mr. Wolfram, I certainly have a lot to do this summer! Perhaps the most ambitious of my future plans is doing the inverse problem: predicting the lattice structure from a given XRD pattern. &#xD;
## Acknowledgements ##&#xD;
I would like to thank my mentor, Eryn Gillam, for helping me throughout my project. I would also like to thank the other mentors for their help, and Mohammad Bahrami for his lectures. Wolfram Summer Camp truly gave me an outlet to express my creativity in novel ways, and the two weeks I spent here were invaluable. Wolfram Summer Camp gave me a novel perspective on how to approach all aspects of life, and key insight into how computational thinking can change the world. For these reasons and more, I am beyond grateful to have been a part of this camp, and am looking forward to apply my new skills.&#xD;
&#xD;
## Computational Essay ##&#xD;
https://github.com/hamza314/WSS-Template/blob/master/Final%20Project/Final%20Submission/Hamza%20Alsamraee%20WSC19.nb&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=main.PNG&amp;amp;userId=1725111&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=copperrealxrd.png&amp;amp;userId=1725111&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capture.PNG&amp;amp;userId=1725111&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=360px-Miller_Indices_Felix_Kling.svg.png&amp;amp;userId=1725111&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=dual.PNG&amp;amp;userId=1725111</description>
    <dc:creator>Hamza Alsamraee</dc:creator>
    <dc:date>2019-07-12T00:56:45Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/534384">
    <title>Using Findfit</title>
    <link>https://community.wolfram.com/groups/-/m/t/534384</link>
    <description>I am trying to find a,b,c from this equation using an array of x and y,&#xD;
&#xD;
![enter image description here][1]&#xD;
    &#xD;
This is my input in mathematica,&#xD;
&#xD;
    FindFit[{{171.29, 6}, {171.63, 12.1}, {171.86, 24.2}, {172.06, &#xD;
           48.3}}, {x == (((sqrt (a^2 + 8 a y) - a) (b - c))/(4 y)) + c}, {a, &#xD;
          b, c}, {x, y}]&#xD;
    &#xD;
But I get this message, FindFit::fitc: Number of coordinates (1) is not equal to the number of variables (2). &amp;gt;&amp;gt;&#xD;
&#xD;
Please advice how to solve for a,b,c&#xD;
&#xD;
&#xD;
  &#xD;
&#xD;
&#xD;
  [1]: /c/portal/getImageAttachment?filename=5562equation.png&amp;amp;userId=534369</description>
    <dc:creator>Damodaran Achary</dc:creator>
    <dc:date>2015-07-22T22:09:16Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/188575">
    <title>Adding Vernier (analog) sensors to the Raspberry Pi</title>
    <link>https://community.wolfram.com/groups/-/m/t/188575</link>
    <description>***Note: I have updated this thread with newer installation instructions.  I&amp;#039;ve kept the original post untouched just for reference.***&#xD;
&#xD;
My latest experiement has been to read from the vast array of analog sensors that are made available from [url=http://www.vernier.com/]Vernier[/url].  The company distributes an SDK that makes a lot of the device interaction straightforward, although compiling the SDK on a Raspberry Pi required a little bit of work which I described in a bit more detail here [dead link removed].  As with some of the other projects I&amp;#039;ve played around with, I find it easiest to interact with hardware devices through MathLink and a bit of c code, so I made a few functions that grab device information and make a measurement (in this case, an average of up to 25 measurements within 1 second).  &#xD;
&#xD;
What makes this approach interesting, in my opinion, is that it utilizes what Vernier calls the [url=http://www.vernier.com/products/interfaces/go-link/]Go!Link interface[/url] with provides a USB connection from the Vernier probe to the (in this case) Raspberry Pi.  The Go!Link allows one to make hot-swapable devices; with a Dynamic call to the MathLink functions, I get.&#xD;
&#xD;
[img=width: 400px; height: 190px;]/c/portal/getImageAttachment?filename=golink.gif&amp;amp;userId=61884[/img]&#xD;
Here is a simple interface where I&amp;#039;m swapping out a thermometer, barometer and a CO2 sensor.  The SDK knows the identity of the sensor, the units it uses and has calibration information already set up so getting the sensors up and running in Mathematica was easy (the tricky part was the MathLink code).&#xD;
&#xD;
Naturally, we can make dynamic plots of sensor readings as well:&#xD;
&#xD;
[img=width: 400px; height: 281px;]/c/portal/getImageAttachment?filename=luxplot.gif&amp;amp;userId=61884[/img]&#xD;
&#xD;
Here I&amp;#039;m using Clock to poll a light sensor every 2 seconds and then shining a light source on the sensor.  The 0-value readings are not conditions of no light, but rather times when the sensor reading failed.  At the moment, I&amp;#039;m not sure if that&amp;#039;s a Mathematica or c problem.</description>
    <dc:creator>BoB LeSuer</dc:creator>
    <dc:date>2014-01-22T13:30:39Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/140887">
    <title>How to plot {x,y,z,i} data?</title>
    <link>https://community.wolfram.com/groups/-/m/t/140887</link>
    <description>Hello there, I have data (in a .dat file) which consists of four columns. x, y, z are coordinates in 3D and i which is the measured intensity at the point defined by xyz. The data is continuous and should give some form of a 3D peak type shape. Thanks!</description>
    <dc:creator>Anna Regoutz</dc:creator>
    <dc:date>2013-10-18T13:31:09Z</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/135497">
    <title>How can I mirror the values of a matrix about its diagonal?</title>
    <link>https://community.wolfram.com/groups/-/m/t/135497</link>
    <description>So I am generating large matrices (the smallest is 48x48) but only one half of the matrix is viable. Unltimately, what I need is a matrix that is symmetric about the diagonal. At the moment, I am just copying and pasting the values that I need, which is highly impractical as the size of the matrix scales up. The function I am using to generate the values is based off of the difference between the row and column, and so it generates different results when this value is negative verses positive. It also doesnt help to just wrap the difference in an Abs[], for whatever reason (I will post the code at the bottom just in case their is a way to get symmetry without messing with the matrices). I havent really been able to think of a way to do this, but what I would like to be able to do is just redefine all of the values on one half of the diagonal using the &amp;#034;correct&amp;#034; values on the other side of the diagonal. In this particular instance, the &amp;#034;correct&amp;#034; values are those in which m&amp;gt;n in the m x n matrix. 
[mcode]pA[ j_, v_] := -I*(-1)^j*(2*DeA*MA)^(1/2)*K[ j, v ]

K[ j_, v_ ] := ((Gamma[ k - v - j ]*Factorial[ v + j ]*(k - 2*v - 2*j - 1)*(k - 2*v - 1))/(Gamma[ k - v ]*Factorial[ v ]))^(1/2)*(1/ k)

k := (4*DeA)/(\[HBar]*\[Omega]eA)[/mcode]
All of those values are then used to generate the matrix, which I have called matpA:
[mcode]matpA := Table[pA[((m - 1) - (n - 1)), (n - 1)], {m, vmaxA}, {n, vmaxA}][/mcode]
Thanks so much for taking the time to read this and for any help you can provide!</description>
    <dc:creator>Cole Rodman</dc:creator>
    <dc:date>2013-10-07T20:48:05Z</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/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>
</rdf:RDF>

