tag:blogger.com,1999:blog-1325673020682446113.post5045417185937393453..comments2023-10-19T16:15:44.325+02:00Comments on Simply P450s: Chemdoodle web components tricks #1: scaling moleculesAnonymoushttp://www.blogger.com/profile/11320127548014060446noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-1325673020682446113.post-60771964340117998122019-12-05T06:47:17.780+01:002019-12-05T06:47:17.780+01:00A blog should be related to the person in want. it...A blog should be related to the person in want. it's far surely important to understand the actual revel in of such necessity and the essence of objective behind it. author need to supply proper time to apprehend each subject matter in advance than writing it. <a href="https://www.kickgadget.com/kahoot-bot/" rel="nofollow">kahoot bot</a>jamesharry521https://www.blogger.com/profile/04746134880004358565noreply@blogger.comtag:blogger.com,1999:blog-1325673020682446113.post-1856122690629781462019-11-18T12:34:25.389+01:002019-11-18T12:34:25.389+01:00not anything to fear about for your writing assign...not anything to fear about for your writing assignments due to the fact Trent affiliation dot net is available to help you on line to your any sort of essay writing help. they may be very expert and i've used their service in component fortuitously. <a href="https://www.kickgadget.com/error-fixed-dns_probe_finished_nxdomain/" rel="nofollow">dns_probe_finished_nxdomain</a>hmeinsonhttps://www.blogger.com/profile/07606387193427839978noreply@blogger.comtag:blogger.com,1999:blog-1325673020682446113.post-17238935121567230392019-11-01T13:17:06.360+01:002019-11-01T13:17:06.360+01:00It is fascinating to join such a forceful and genu...It is fascinating to join such a forceful and genuine talk with perusers of this blog and in addition perusers of different web journals or sites who truly thing that they can express more identified with this theme. <a href="https://www.kickgadget.com/shack-tv/" rel="nofollow">shack tv</a>williamoliver172https://www.blogger.com/profile/10797042066040291453noreply@blogger.comtag:blogger.com,1999:blog-1325673020682446113.post-62956051867202366412012-02-02T13:38:40.384+01:002012-02-02T13:38:40.384+01:00Good to hear Jan. If I run into any problems with ...Good to hear Jan. If I run into any problems with my scaling I'll try the bond length scaling, currently I generate coordinates myself in CDK so I never had any such problems.Anonymoushttps://www.blogger.com/profile/11320127548014060446noreply@blogger.comtag:blogger.com,1999:blog-1325673020682446113.post-87628488640307869812012-02-02T13:16:29.559+01:002012-02-02T13:16:29.559+01:00Hello Patrick!
Thank you very much for this tip! I...Hello Patrick!<br />Thank you very much for this tip! It works very fine (see here http://gmd.mpimp-golm.mpg.de/Analytes/0a2b3536-2245-4c0e-bdbc-495766eeec67.aspx)! Actually, I was looking for something like this since weeks. Do you know that "scaleToAverageBondLength(Number length)" Function of the ChemDoodle molecule which seems to be new since version 4.5.0.<br />For me, the scaling to an average bond length improved your code since I have a lot of mol files from different sources.<br /><br />Thank you very much!<br />Janjahuhttps://www.blogger.com/profile/09134239485606526034noreply@blogger.comtag:blogger.com,1999:blog-1325673020682446113.post-27973664404766144752011-12-30T11:21:01.753+01:002011-12-30T11:21:01.753+01:00Code updated to use the nicer code in Kevin's ...Code updated to use the nicer code in Kevin's comment.Anonymoushttps://www.blogger.com/profile/11320127548014060446noreply@blogger.comtag:blogger.com,1999:blog-1325673020682446113.post-59727040488469685462011-12-23T23:26:07.355+01:002011-12-23T23:26:07.355+01:00Thanks Kevin, I'll try that out.Thanks Kevin, I'll try that out.Anonymoushttps://www.blogger.com/profile/11320127548014060446noreply@blogger.comtag:blogger.com,1999:blog-1325673020682446113.post-82895794903946767512011-12-23T22:29:16.023+01:002011-12-23T22:29:16.023+01:00Hi Patrik, nice post!
Another way to do this is t...Hi Patrik, nice post!<br /><br />Another way to do this is to change the scale parameter in the VisualSpecifications for the Canvas. This will preserve the styling perspective (bond widths to bond lengths for instance).<br /><br /> // get the dimension of the molecule<br /> var size = caffeine.getDimension();<br /> // find the scale by taking the minimum of the canvas/size ratios<br /> var scale = Math.min(testmol2.width/size.x, testmol2.height/size.y);<br /> // load the molecule first (this function automatically sets scale, so we need to change specs after)<br /> testmol2.loadMolecule(caffeine);<br /> // change the specs.scale value to the scale calculated, shrinking it slightly so that text is not cut off<br /> testmol2.specs.scale = scale*.9;<br /> // repaint the canvas<br /> testmol2.repaint();Anonymousnoreply@blogger.com