User feea1b68c9
07-05-2009 09:04:59
hi,
can any one help me.
how can i display a structure image, in asp .net ?
i have smiles and i want to show its structure on the asp.net page as an image.
is it possible?
User feea1b68c9
07-05-2009 09:04:59
hi,
can any one help me.
how can i display a structure image, in asp .net ?
i have smiles and i want to show its structure on the asp.net page as an image.
is it possible?
ChemAxon 909aee4527
08-05-2009 13:47:42
Dear Raveendar,
the question has been moved to the relevant topic. My colleagues will answer you soon.
Kind regards,
Judit
ChemAxon 6e93227fcc
08-05-2009 14:16:08
Hi,
Of course is possible. I will tell you one method. However there are many ways to achieve this...
1. Firs you have to add references to necessary dll's (check JChem .NET API package from our download page). Within that package there are also some small examples and one of them demonstrates how to render a molecule. You will see 2 methods there : "toBinFormat" this is slower but should draw molecules perfectly, and second is using translated java drawing classes which is faster but for some molecules it might not draw correctly (maybe 1 from 100.000 will have problems).
2. In your page (HTML or ASPX) you put an image having as url an ASPX page with a parameter. So for example you will have "<img src='/ImagePage.aspx?ID=a GUID'/>". On server side you will have the logic in page for creating the image. Once you have the image binary you call:
Response.Clear();
Response.BinaryWrite(your binary image);
Response.End();//do not put this line in a try catch block
3. Server side logic: The ID parameter you pass to page may be an ID from database so in this case you get the molecule representation from DB , you create the image for it and the send as request as I wrote on (2.).
Another situation would be if you have a gridview. In this case you don't want to interrogate again the database since you already have all data for molecules. In this situation on data bind event you generate a GUID, you put in session the molecule string representation (or object) having as key the generated GUID, and for image link you put also that GUID as parameter. In code behind of ImagePage.aspx you get the molecule from session based on ID and you generate the image.Don't forget to remove the molecule from session in order to avoid memory leaks.
Hint: You might want to "cache" images on server side. In this situation you can implement a custom logic in ImagePage.aspx to check whether the image was already created and if it exists on disk. If the image does not exist you create it and save on disk and next time you server that one...
If you have any questions please let me know.
P.S. There are also other methods but I think this is the easiest one. A more professional method would be to use HttpHandlers.
Calin Naghi.
User feea1b68c9
09-05-2009 05:31:37
calinnaghi wrote: |
Hi calinnaghi , thanks for your kind Reply raveendar Reddy Kolan |
User 2cbe95b0ac
05-02-2011 12:54:31
sir
i am trying to develop a application of marvinspace with two canaves using c# .NET., i had downloaded jchem .exe file ., i had installed ,and i added dlls as reference of path chemaxon/jchem .net 5.4.0.1015 and and i just wrote a code , when i debug it it showing an error of javaX.media.opening.GL error so can any one help me in my application development
ChemAxon b62f37c21a
06-02-2011 21:54:28
Hello,
The .NET version of Marvin does not support OpenGL and therefore MarvinSpace. We provide examples to demonstrate some molecule display features included in the installer, you can find them under the installation folder (C:\Program Files\ChemAxon\JChem .NET API <version>\Examples - by default).
Did you find these examples useful or useless in your work? If these examples and Calin's answer are not enough to support your solution, please provide more specific details about your problem.
Best regards,
Gabor Vasko
User 2cbe95b0ac
07-02-2011 08:44:56
hi,
can any one help me
i am trying to devlop a windows applicaltion using C# .net Framework , and here i my application should contains two canvas(where 3d molecule dispalyes ) and both should display a PDB molecule., when a group of particular amino acids selected in a protein of canavas1 and when we drag and drop it in second canvas it should display a possible interaction chain using selected amino acids and should displayed in 2nd canvas .,
i had verified previous examples coded in .net 3.5 added all referance Dlls path chemaxon/jchem .net 5.4.0.1015 to display a frame marvinspace and code was debuged sucessfuly bt the i got error javaX.media.opening.GL so what this error mean waht i have to do to correct this error
ChemAxon b62f37c21a
08-02-2011 14:32:52
Hello,
1. MarvinSpace is not supprted, it is not working yet in the .NET version that is why you get errors.
2. Drag & drop does not work either, but probably it can be replaced with something else.
Both of them are written in the previously referenced page.
I will be back soon with answers to the remaining questions.
Best regards,
Gabor Vasko
User 2cbe95b0ac
08-02-2011 18:34:05
i was very thank full .,that you are replaying my question .i had understood that .net cannot help me in development of MarvinSpace ,, and i asked for any other possibility to develop MarvinSpace other than .net .....if so please guide
thank you
ChemAxon b62f37c21a
08-02-2011 19:57:32
MarvinSpace is available in Java, see this page for a short guide.
MarvinSketch and MarvinView are also capable to display 3D molecules in a simple way if it is enough.
VG