H-bond in povray

Dear Avogadro Users!

How I can draw H-bonds in POV-Ray exported images. In my display the
H-bond is shown but at the povray image is missing.

Thanks
Attila


Dr. Bende Attila (PhD)
Senior Researcher III


Molecular and Biomolecular Physics Department
National Institute of R&D of Isotopic and Molecular Technologies
Str. Donath nr.65-103, C.P.700
Cluj-Napoca, R-400293, Romania
Phone:+40-264-584037, ext 194, Fax: +40-264-420042
e-mail: bende@itim-cj.ro, attlbende@gmail.com
Web: http://www.itim-cj.ro/~bende
http://www.researcherid.com/rid/A-6539-2008


Unfortunately, I don’t think you can at the moment - the POV Ray file
creator doesn’t seem to have the function to draw the lines using the
method the H-bond display engine uses.

If you don’t have a prohibitively large number of them, and can edit
and rerun the POV files yourself, you could try finding the atoms you
want to put the bonds between and try adding a macro like the one
below to the file to draw the hydrogen bonds in.

#macro dashedLine(_point1,_point2)
#declare dashLength = 0.05;
#declare lineRadius = 0.005;

#declare currentDashEnd = _point1;
#declare currentDashStart = <0,0,0>;
#declare lineDirection = vnormalize(_point2 - _point1);
#while (vlength(currentDashEnd - _point1) < vlength(_point2 - _point1))
#declare currentDashStart = currentDashEnd + (lineDirection * dashLength);
#declare currentDashEnd = currentDashEnd + (lineDirection * (dashLength*2));
cylinder{currentDashStart, currentDashEnd, lineRadius
pigment { rgb <1,1,0.5> }
finish { ambient 0.7 }
}
#end
#end

To be used as:
dashedLine(<1.0,0.5,0.5> , <5.0, 0.8, 1.0>)
with the positions of your two atoms in the POV file.

Sorry for the bad news,
-Ian Kirker

On Sun, Nov 29, 2009 at 9:08 AM, Dr. Attila Bende bende@itim-cj.ro wrote:

Dear Avogadro Users!

How I can draw H-bonds in POV-Ray exported images. In my display the
H-bond is shown but at the povray image is missing.

Thanks
Attila


Dr. Bende Attila (PhD)
Senior Researcher III


Molecular and Biomolecular Physics Department
National Institute of R&D of Isotopic and Molecular Technologies
Str. Donath nr.65-103, C.P.700
Cluj-Napoca, R-400293, Romania
Phone:+40-264-584037, ext 194, Fax: +40-264-420042
e-mail: bende@itim-cj.ro, attlbende@gmail.com
Web: http://www.itim-cj.ro/~bende
http://www.researcherid.com/rid/A-6539-2008



Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what’s new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july


Avogadro-Discuss mailing list
Avogadro-Discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-discuss

Unfortunately, I don’t think you can at the moment - the POV Ray file
creator doesn’t seem to have the function to draw the lines using the
method the H-bond display engine uses.

Well, Ian’s contribution looks pretty good to me. I’ll add it to the POV export for the upcoming Avogadro 1.0.1 release.

Thanks!
-Geoff

Dr. Attila Bende wrote:

Dear Avogadro Users!

How I can draw H-bonds in POV-Ray exported images. In my display the
H-bond is shown but at the povray image is missing.

Thanks
Attila

Right now that feature is not possible to draw in the POV-Ray images. It
is a feature I never found the time to implement, along with drawing
text in the POV-Ray rendering and a few other bits. It would be a great
feature addition though, and I hope to get it in (or see someone else
implement it).

Marcus