<div dir="ltr">Hi Tom,<div><br></div><div>Thanks so much. I have found the Python file of Chimera on linux. I currently do not have ChimeraX yet. </div><div>I think if one version can be worked out, it is not too hard to make the other version working.</div><div>I do not know Python. I would need to ask my collaborator to look into the code. </div><div><br></div><div>I am thinking for the cases k=0, or h=k, It is not too hard to implement a spherical icosahedral cage.</div><div>This is the diagram for a planner icosahedron definition:</div><div><img src="cid:ii_kii9cyla0" alt="Screen Shot 2020-12-09 at 9.02.59 PM.png" width="257" height="179" style="margin-right:0px"></div><div>We just need to think the H axis is an arc between two neighboring 5 fold vertices, and K is another arc connecting the origin and the other nearby 5 fold vertice. So the positions of 1, 2, 3, 4 ... would be defined by angles or length on the arc, rather than the length on the line connecting the two 5-fold points.</div><div><br></div><div>A quick test can be made by modifying the code of this routine (Linux Chimera): Tools => Higher-order Structure => Icosahedron Surfaces. When the sphere factor = 1. The subdivision can be considered to be a subdivision of the arc that connects two 5 folds. I am not sure what is the best method to draw the lattice lines when the sphere factor is >0 and less than 1, some kind of interpolation function has to be developed.</div><div><br></div><div>I do not know how to handle the cases of skewed icosahedron either, ie. h and k are different. It seems very difficult to define the references points and determine how to draw those parallel lines on the spherical surface. I am thinking we have to start with a big spherical triangle. </div><div><div><img src="cid:ii_kiib8c2f1" alt="Screen Shot 2020-12-09 at 9.56.03 PM.png" width="224" height="230" style="margin-right: 0px;"><br></div></div><div>For example, if we want to define h=3, k=2 lattice (red triangle), we need to draw arcs on a sphere according to the purple triangle. The question is if we think the red triangle is the outline of a spherical triangle of three 5-fold vertices, where the vertices of the purple triangle are. The current version of Chimera can draw any icosahedral lattice beautifully. I think this must have been worked out for the planner cases. The python code must have some clues. I have to think about it more.</div><div><br></div><div>Best regards,</div><div><br></div><div>Wei</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 9, 2020 at 5:48 PM Tom Goddard <<a href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi Wei,<div><br></div><div> You are right the Chimera and ChimeraX hkcage command "sphere" option simply moves the cage vertices outward to lie on a sphere. The sphere passes through the 12 vertices of a plain icosahedron so those 12 vertices don't get moved. But the midpoint of one of the triangular faces of the icosahedron is at radius 0.79 (= sqrt( (1+2/sqrt(5))/3 )) if the vertices are at radius 1 (ie the ratio of inner icosahedron radius to outer radius is 0.79) so projecting a shape near the middle of a triangular icosahedron face will expand its size by 21% relative to if it is near an icosahedron vertex.</div><div><br></div><div> It is an interesting problem to try to reduce that distortion. It looks impossible to remove it. For that you would need an isometric map from an icosahedron triangle to a spherical triangle, but no such isometry exists since the triangle is flat and the sphere has curvature 1/R. Let me know what you figure out.</div><div><br></div><div> The code for computing the cages in Chimera is all Python and is in your Chimera distribution, on Linux it is here</div><div><br></div><div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><span style="white-space:pre-wrap"> </span>chimera/share/IcosahedralCage/cages.py</span></div></div><div><br></div><div>You would be better off working on the successor of Chimera, called ChimeraX. If you improve hkcage we won't update Chimera as we no longer add new features to it since all development is on ChimeraX. The ChimeraX hkcage command is in the ChimeraX distribution, on Linux it is here</div><div><br></div><div><span style="white-space:pre-wrap"> </span><span style="font-family:Menlo;font-size:11px">chimerax/lib/python3.8/site-packages/chimerax/hkcage/cage.py</span></div><div><br></div><div> Tom</div><div><br><div><br></div><div><br><div><br><blockquote type="cite"><div>On Dec 8, 2020, at 6:58 PM, Wei Zhang <<a href="mailto:zhangwei@umn.edu" target="_blank">zhangwei@umn.edu</a>> wrote:</div><br><div><div dir="ltr">Hello,<div><br></div><div>I use the command <font color="#0000ff">hkcage</font> to generate an icosahedral lattice on a sphere:</div><div><br></div><div><font color="#0000ff">hkcage 5 7 sphere 1</font></div><div><br></div><div>However, this only expands the strict icosahedral lattice (ie when using sphere=0) radially to match a spherical surface. As a result, the sizes of the hexagons and pentagons are not the same. The effect would be very dramatic if the parameter sphere is larger than 1. </div><div><br></div><div>I am wondering if the code can be modified to generate a truly icosahedral lattice on a spherical surface, or if that piece of code is open to access?</div><div><br></div><div>Thank you and best regards,</div><div><br></div><div>Wei</div><div><br></div></div>
_______________________________________________<br>Chimera-dev mailing list<br><a href="mailto:Chimera-dev@cgl.ucsf.edu" target="_blank">Chimera-dev@cgl.ucsf.edu</a><br><a href="https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev" target="_blank">https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev</a><br></div></blockquote></div><br></div></div></div></blockquote></div>