Molecular Bonding Language

Page 2 of 4 Previous  1, 2, 3, 4  Next

Go down

Re: Molecular Bonding Language

Post by Nevyn on Thu May 10, 2018 7:09 pm

As you may have noticed from the images above, I have the nuclear models loading and being placed reasonably well. It is just putting them right up against each others bounding box (with a little bit of space), not looking at where the hook protons are and joining at those locations, which is where I want to get it. Still, it looks pretty good. I even have the rings working although it doesn't work in all dimensions yet. It is tricky getting things to point where you want them and still be direction independent.

I just used the average length of each atom in the ring to calculate the ring radius and it worked reasonably well. As far as I am aware, rings are only made with small atoms like carbon or oxygen, maybe some nitrogen occasionally. But I'm not an expert on all molecules, so there may be some larger ones. I imagine that any atom with a carousel level is not likely to be in a ring.

It still needs more work before I publish it to the web but I am impressed so far. It really brings the chains to life. What was a boring straight chain yesterday, looks awesome today!
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Thu May 10, 2018 7:13 pm

Airman, I had a look over a few papers about cyclic irregular polygons but they don't seem to have a general equation. They have ones for triangles and rectangles, but not for any number of vertices. I did find some equations for calculating the area, but I need to find the radius. I will spend some more time looking through it all and see if I can find anything more generic. I'm actually pretty happy with the average length solution and that will have to do for now.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Sun May 13, 2018 5:48 am

Visualizer Update


Atomic Models


I have implemented a new visualizer that uses the atomic models from AtomicViewer, complete with charge emission. It supports the full language which means that it does allow you to create illegal structures. When you get to see the full nuclei, most bad configurations will be obvious.

The placement of the atoms needs some thought. I think that the emissions of the hook stacks should be overlapping in a bond. Now that I have everything running, I can look into the finer details like this. Happy to hear anyone's thoughts too.

I'm really happy with the models. Even simple molecules look awesome. I will add some controls to enable/disable the charge emission shaders. They look great, but get in the way when you are thinking about chemistry. They also don't photograph very well. Much like real charge!



Last edited by Nevyn on Sun May 13, 2018 8:36 am; edited 1 time in total (Reason for editing : Added screenshot)
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by LongtimeAirman on Sun May 13, 2018 1:16 pm

.
Hey Nevyn, please don't hate me because Euclid made the problem intractable. cyclops You need an algorithm, here’s the best I've come across, you be the judge.

Constructing a cyclic polygon given the edge lengths.
https://chaosinmotion.blog/2016/10/02/constructing-a-cyclic-polygon-given-the-edge-lengths/

Posted on October 2, 2016
The author wrote. So I have a problem: given the length of the edges L = {l0, l1, … lN} of an N-sided irregular polygon with N > 3, I need to construct the values for the radius R and the angles A = {a0, a1, … aN} such that the points P = { R, ai } form a closed polygon with the lengths given.

I searched through the internet and found all sorts of articles on the subject, https://en.wikipedia.org/wiki/Circumscribed_circle but a day of searching and I was unable to find a way that I could construct the values R and A. I’m sure it’s out there, but I figured it’d be a good exercise to do it myself.

Based on my reading apparently there is no current solution to the problem–so I went ahead and built a simple algorithm to construct the values. The idea is outlined below.
.

LongtimeAirman
Admin

Posts : 1044
Join date : 2014-08-10

View user profile

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Sun May 13, 2018 4:31 pm

OK, you're off the hook, but Euclid is gonna cop it!
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Cr6 on Sun May 13, 2018 5:42 pm

Wow Nevyn very, very Cool!!!

It's fun too after imagining the bonding and then seeing it modeled in the MBL. Nicely done!

I was just thinking of having simple slide-in/out type "molecular label" even as top layer....something that if someone took a screenshot it could show on the image if they needed it.

Nice Work! Imagination realized! sunny

Cr6
Admin

Posts : 1085
Join date : 2014-08-09

View user profile http://milesmathis.forumotion.com

Back to top Go down

Re: Molecular Bonding Language

Post by Cr6 on Sun May 13, 2018 6:17 pm

Nevyn wrote:How's this for Cu3MgO4?

MBL: Cu-O-Cu-O-Mg-O-Cu-O





Looks very similar to this one Zn3MgO4:



MBL: Zn-O-Zn-O-Zn-O-Mg-O

Cr6
Admin

Posts : 1085
Join date : 2014-08-09

View user profile http://milesmathis.forumotion.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Sun May 13, 2018 7:02 pm

That's feasible. I might popup a dialog box when you press the capture button that allows you to enter the text for a label. I might even look into allowing you to choose the position of the text. Just a simple above, below, left, right or diagonals kind of thing. I'll see how it goes.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Sun May 13, 2018 7:07 pm

Yeah, there are a lot of atoms that can be switched with each other in various molecules. Especially straight chains. Of course, the finer details can catch you out if you aren't looking. The hook stacks may change the charge profile but if they are in the middle of the molecule then it doesn't matter as much.

It would be interesting if we start looking at the known super-conductors and seeing what atoms can be swapped with each other and then see if they end up being found as new super-conductors. That would be a great prediction for Miles theories.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Sun May 13, 2018 8:52 pm

Language Update


Cross Bonds in a Ring


While playing around with the ring structures, it became apparent that the cross bonds were not dealing with the last atom bonding back to the first atom. This doesn't apply to straight chains so I didn't need to think about it before. Now, we need to be able to specify the last cross bond, even though it doesn't look like it bonds to anything.

To support this, you can specify a cross bond as the last item in a chain or in a multiplication group. It will only be used in a ring and straight chains will ignore it since it will not have anything to bond to.

e.g. MBL: ring:C{H,H}C{H,H}C{H,H}C{H,H}C{H,H}
or more succinctly: ring:(C{H,H})5

Visualiser Bug


I have found that there is a bug in the way cross bonds are handled for the nuclear models. They are not being positioned correctly. They seemed fine last night when I was working on it, but I checked them on my site this morning and they are not working. They do in some directions but not in all.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Tue May 15, 2018 5:45 am

Bug Fix


I fixed the problem with the cross bonds and in doing so, I have stumbled upon an interesting result that I am going to keep. When you use a ring and define whether it is N/S or E/W then the cross bonds will orient themselves in different directions to the ring. The E/W ring will have the cross bonds pointing into and out of the ring while the N/S ring will point them out to the sides. I think it is a useful feature so it can stay.

East ring with cross bonds:



West ring with cross bonds:



Notice that the atoms in the cross bond have switched between inside and outside of the ring.

North ring with cross bonds:



The south ring does not change the cross bonds from the north ring.

UI Update


Charge Controls


I have added some checkboxes to enable/disable charge particles and the discs. They may seem a bit strange in how they work but it is kind of useful at the same time. If you generate a model while all charge shaders are turned off (everything except the disc is disabled) then the shaders will not even be created. This helps to reduce performance requirements and run better on some devices. However, when any of them are turned on, then you can turn them off instantly. No need to regenerate to apply the changes. It is just making them invisible so it may not reduce computational load but it is handy for quickly showing and hiding the charge particles.

Remember that you have to generate the model (cog icon) to apply most settings, including turning on the charge shaders.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Tue May 15, 2018 5:49 am

What do you think about the charge disc being transparent or opaque? I'm kind of mixed on it. I love the way the transparency looks, but sometimes I think the opaque version is better. The transparency can give it a fuzzy look that the opaque version doesn't. I don't really want to add another control to enable/disable it. I'm trying to keep the control count to a minimum.

Any thoughts?
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Tue May 15, 2018 6:07 am

I've implemented a compromise by increasing the opaqueness of the transparency by 50%. I could still be persuaded either way but this does look better.


avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Thu May 17, 2018 5:49 am

UI Update


Image Capture


I have fixed the image capture feature so that it renders the full scene as seen on screen. Without the white borders around it. I have also implemented an image properties dialog box that allows you to select the resolution of the rendered image: 720, 1080 or 4K. The dialog box will show when you press the capture icon. It will also remember your settings until a page refresh.

I tried to get a label drawn to the image after the 3D engine has rendered the molecule but it turns out I can't draw in 2D after the canvas has been used for 3D. I may be able to find another way around it.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Cr6 on Sat May 19, 2018 1:53 am

Coming along very nicely Nevyn! I've been playing with it at work and after hours.  It is actually "fun" to transcribe a Molecular formula seen in a textbook or online into your MBL viewer!  It grabs "science minded" people a lot differently than "non-science minded" people...from what I've seen. I find more curiosity from people who know Bonding theories but at the same time can't reconcile what they are seeing...in the viewer. I think it is a great opener to further conversations with these types of folks...MBL opens a conversation better than PI=4!!! drunken . Met an engineer at a bar and drifted into talking about Miles and the MBL. Heard the phrase: "What am I looking at, no really what is this?" several times as he typed in his own molecules. Thinking people definitely get a twinge of "hmmmm". The engineer bought me a free scotch after explaining bits of Mathis' site and yours and "ours" (Forumotion)... now if MBL could only be used to flirt with nice ladies...  Cool

Cr6
Admin

Posts : 1085
Join date : 2014-08-09

View user profile http://milesmathis.forumotion.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Sat May 19, 2018 2:56 am

That's brilliant! A free scotch for some free flowing ideas. Isn't that how the world should operate? I'm really glad it helps.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Sat May 19, 2018 3:08 am

Official Release


I have officially released the MBL Language and Renderer, which basically means I added it to my front page. Oh, and I created a formal specification of the language as well as a cheat-sheet type guide for quick reference.

https://www.nevyns-lab.com/mathis/app/mbl/
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Cr6 on Sun May 20, 2018 9:34 pm

BTW, here's a S.C. that I was looking for the best fit:

Gd in the frustrated antiferromagnet Gd3Ga5O12.

https://warwick.ac.uk/fac/sci/physics/research/condensedmatt/supermag/
Hidden order in spin-liquid Gd3Ga5O12
http://science.sciencemag.org/content/350/6257/179


Gd3Ga5O12(?)
https://www.nevyns-lab.com/mathis/app/mbl/mbl.html?mbl=O-Gd-O-Ga-O-Gd-O-Ga-O-Gd-O-Ga-O-O-Ga-O-O-Ga-O-O-Ga
Gd2Sn2O7(?)
https://www.nevyns-lab.com/mathis/app/mbl/mbl.html?mbl=(O-Gd-O-Sn-O)2-O


Just wanted to ask if there is a way to pre-parse current Chem notation into the MBL?
Like a pre-parse field for MBL, that just lays it all out on a long line?

I was thinking of building one in SQL to re-order the notation to a more friendly MBL format. Basically it would parse the elements, then then numbers and then add the elements back using ((element +'-' ) * (#-1)) or Multiplication Groups (or something like this).  I know there are a lot of specific case details but it would be kind of useful to get things laid out to allow easier cut/paste for traditional Chem notation... thoughts? Not looking for the layout to be perfect but just for all elements to be accounted for.

The reason is I have a bunch of molecules in a SQL database but they are in the typical format of Gd2Sn2O7 that would be cool to transform with a click into something like "(O-Gd-O-Sn-O)2-O" or "Gd-Gd-Sn-Sn-(O)7" that if looked good could then be rendered in the MBL viewer?
https://www.nevyns-lab.com/mathis/app/mbl/spec.php#elements

Abstract
Despite the availability of a spin Hamiltonian for the Gd3Ga5O12 garnet (GGG) for over twenty five years, there has so far been little theoretical insight regarding the many unusual low temperature properties of GGG. Here we investigate GGG in zero magnetic field using mean-field theory. We reproduce the spin liquid-like correlations and, most importantly, explain the positions of the sharp peaks seen in powder neutron diffraction experiments. We show that it is crucial to treat accurately the long-range nature of the magnetic dipolar interactions to allow for a determination of the small exchange energy scales involved in the selection of the experimental ordering wave vector. Our results show that the incommensurate order in GGG is classical in nature, intrinsic to the microscopic spin Hamiltonian and not caused by weak disorder.
https://www.researchgate.net/publication/1847995_Spin_Hamiltonian_Competing_Small_Energy_Scales_and_Incommensurate_Long_Range_Order_in_the_Highly_Frustrated_Gd3Ga5O12_Garnet_Antiferromagnet


Low temperature magnetic properties of geometrically frustrated Gd2Sn2O7 and Gd2Ti2O7
http://iopscience.iop.org/article/10.1088/0953-8984/15/45/016/meta
http://iopscience.iop.org/article/10.1088/0953-8984/15/45/016/pdf

Cr6
Admin

Posts : 1085
Join date : 2014-08-09

View user profile http://milesmathis.forumotion.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Mon May 21, 2018 1:18 am

A pre-parser for formula? Feasible, but I'm not too sure how useful it will be. The problem is that current chem notation is pretty useless. It just hands you a bag full of atoms. No structure, no connections. Just a count for each atom in the molecule. So I could easily convert it into MBL, but I doubt the generated molecule would actually resemble the real molecule, except by accident. However, it is a starting point that can be altered a bit more easily. If you only expect a straight chain containing the atoms in the right numbers, then it can be done. Not sure how to add it to the user interface though.

What we really want is a pre-parser followed by a best attempt at arranging the atoms based on the hook proton stack sizes. We might be able to create profiles for various molecule types. One for super-conductors, one for hydrocarbons, one for rings, etc. Maybe some questions like 'Is it a conductor or magnetic?'. You can already see the complexity in that endeavor. I think we need to identify those profiles and the rules that they contain to see how this might work.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Mon May 21, 2018 3:06 am

Cr6, it must be your birthday!

I had a look over the code to see what I could do to support standard chemical notation when it dawned on me that I could possibly handle it in the MBL language itself. I dove into the MBL parser to see how that might work when I realised that it didn't need to go in the parser but could be handled in the tokenizer. All I had to do was look for upper and lower case characters to determine if I was in an element declaration and to watch for numbers immediately following an element. Since MBL also uses ( and ) for multiplication, they fall through without any hassles.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Mon May 21, 2018 3:16 am

Language Update

Standard Chemical Notation


MBL now supports the usage of standard chemical notation such as MeBr, O2, Cu(OC)2.

They will only create straight chains and multipliers are just expanded in-place. The order is the same as you put them in the expression.

Visualizer Update

Nuclear Models


I have made various changes to the nuclear model code to support the bonded atoms such as Uranium. I changed our JSON format to do so. It now supports 2 different kinds of atoms, the standard levels and these multi-nuclei atoms. I have modeled from Uranium up to Cerium.

You can use them in your MBL but they have problems. Mainly around the carousel levels. Since these atoms actually have 2 atoms inside of them, they have 2 carousel levels. The placement code in the Renderer can't support that at the moment but you can always just use the root atoms in your MBL in place of these bonded atoms so that you can place bonds onto the carousel of each part.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Mon May 21, 2018 9:21 am

Language Update

Multiple Carousel Levels


I have added support for an atom with multiple carousel levels. You just add another carousel list after the first and they are applied from bottom to top within the atom.

MBL: U[CC,CC,CO,CO][CC,CC,CO,CO]
URL: https://www.nevyns-lab.com/mathis/app/mbl/mbl.html?mbl=U[CC,CC,CO,CO][CC,CC,CO,CO]&align=Y&atom=nucleus



This is probably a waste of time because you can't really bond to these locations. The main charge flow is down the N/S axis and there is not enough carousel output to support a bond. It does look cool though!
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Cr6 on Fri May 25, 2018 1:49 am

Nevyn wrote:Cr6, it must be your birthday!

I had a look over the code to see what I could do to support standard chemical notation when it dawned on me that I could possibly handle it in the MBL language itself. I dove into the MBL parser to see how that might work when I realised that it didn't need to go in the parser but could be handled in the tokenizer. All I had to do was look for upper and lower case characters to determine if I was in an element declaration and to watch for numbers immediately following an element. Since MBL also uses ( and ) for multiplication, they fall through without any hassles.

Hi Nevyn,

Sorry for the delay on the response.  I must say that earlier this month was my birthday and that your javascript app was the best present I have ever received aside from a few gifts from my mother and father as a wee child (the updated '77 version of Rocke'm Socke'm Robots comes to mind for some reason...) The "tokenizer" was a left hook when I first used it.


https://en.wikipedia.org/wiki/Rock_'Em_Sock_'Em_Robots

God Bless the MBL...and all your work... it is really cool!!!  Wink  cheers


Last edited by Cr6 on Sun May 27, 2018 1:23 am; edited 1 time in total (Reason for editing : Corrected typo-bad grammar in a half-drunken excited post...)

Cr6
Admin

Posts : 1085
Join date : 2014-08-09

View user profile http://milesmathis.forumotion.com

Back to top Go down

Re: Molecular Bonding Language

Post by Nevyn on Sat May 26, 2018 12:12 am

Language Update

Extending a Molecule


I have added 2 more Chain Commands that allow you to extend a chain by copying it and stamping it a given number of times.

The line command can be used to extend a straight chain. You can build sheets by using a multiplication group in the expression.

The line command can accept 2 parameters. The first is the number of times to copy the chain and is a positive integer > 0. The second parameter can be a direction north, south, east or west, or just the first letter. This is used to orient the chain before it is copied.

MBL: line 6:(C{C,C}C)10
URL: https://www.nevyns-lab.com/mathis/app/mbl/mbl.html?mbl=line%206:(C{C,C}C)10&align=X&atom=nucleus


The tube command can be used to extend a ring. It can accept 2 parameters. The first is the number of times to copy the ring and is a positive integer > 0. The second parameter can be a direction. Only east and west make sense for a ring since it is restricted in the dimensions that it can grow into. However, the renderer allows you to use north and south as synonyms for east and west respectively.

MBL: tube 6 n:(C{C,C}C)10
URL: https://www.nevyns-lab.com/mathis/app/mbl/mbl.html?mbl=tube%206%20n:(C{C,C}C)10&align=X&atom=nucleus


Even though it looks like everything is bonded together, it is really just a copy of each chain placed next to each other. It is up to you to ensure that the bond points match and make sense.

You will get a performance hit if you use too many atoms. I have disabled transparency on the proton stacks to help. You can turn on the charge emission shaders and it looks fantastic but you will need decent graphics hardware to render it.
avatar
Nevyn
Admin

Posts : 1360
Join date : 2014-09-11

View user profile http://www.nevyns-lab.com

Back to top Go down

Re: Molecular Bonding Language

Post by Sponsored content


Sponsored content


Back to top Go down

Page 2 of 4 Previous  1, 2, 3, 4  Next

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum