bugXMakemol - Bugs: bug #24918, hydrogen bonds get assigned for...

 
 

bug #24918: hydrogen bonds get assigned for internal H-C, H-N etc. bonds

Submitted by:  None
Submitted on:  Mon 24 Nov 2008 06:23:02 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 17 Sep 2014 06:57:11 AM UTC, comment #3:

Turns out yesterday's version had two bugs, fixed in the attached patch. Now it really should be OK :-)

(file #32122)

mpjohans <mpjohans>
Tue 16 Sep 2014 06:20:06 PM UTC, comment #2:

Noted that it now was simple to pimp it a bit further, so with the attached, new patch, H-bonds are only assigned if both X and Y in X-H...Y are [F|O|N]. Also decreased the allowed D-H...A angle from 100 to 90, as that is a nice round number in pi-space.

(file #32115)

mpjohans <mpjohans>
Tue 16 Sep 2014 04:12:01 PM UTC, comment #1:

Yeah, that was the only thin bothering me as well. For years. So today I sat down and made a small modification to the H-bond routines. It is still very simple, but shows some restraint in the assignment :-)

With the attached patch (against 5.16) H-bonds are only assigned between H and F/O/N, and only if the angle A-H..X is over 100 degrees (and less than 260). If one wants other atoms to be able to form H-bonds, the source is easily modified. Also the angle is just a (compile-time) constant.

To apply the patch, copy it to your xmakemol-5.16 directory and type "patch < hbonds.patch" and compile as usual. Note that I haven't thoroughly tested it, and my C is a bit rusty...

XMakemol is still a great little utility!

Cheers,
Mikael J.
http://www.iki.fi/~mpjohans

(file #32113)

mpjohans <mpjohans>
Mon 24 Nov 2008 06:23:02 PM UTC, original submission:

The only annoying problem I have with xmakemol is that it seems to assign hydrogen bonds internally. For example, if a molecule contains a N-C bond, and then there is a hydrogen attached to the C, a hydrogen bond will be drawn from the hydrogen to the N, even though those two are connected by two bonds internally. This makes the hydrogen bond display pretty useless, and moreover, this seems to be on by default and I have to hit 'h' about every time I view a molecule.

Example molecule:

6

C 0.000000 -0.047932 -0.747970
N 0.000000 -0.044830 0.652447
H 0.928928 0.293043 -1.179692
H -0.928928 0.293043 -1.179692
H 0.830835 0.304031 1.102919
H -0.830835 0.304031 1.102919

Screenshot of Xmakemol window after startup attached.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #32122:  hbonds.patch added by mpjohans (11KiB - application/octet-stream - working(!) version of H-bond detection patch)
file #32115:  hbonds.patch added by mpjohans (8KiB - application/octet-stream - new patch file for improving H-bond detection slightly more)
file #32113:  hbonds.patch added by mpjohans (8KiB - application/octet-stream - patch file for slightly improving H-bond detection)
file #16916:  h2cnh2.xyz added by None (184B - application/octet-stream - xyz file of the molecule displayed in xmakemol.png)
file #16915:  xmakemol.png added by None (8KiB - image/png - screenshot of xmakemol window after startup)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mpjohans (Updated the item)
  • -unavailable- added by mbanck (original submitter, forgot to login before filing report)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 17 Sep 2014 06:57:11 AM UTCmpjohansAttached File-=>Added hbonds.patch, #32122
    Tue 16 Sep 2014 06:20:06 PM UTCmpjohansAttached File-=>Added hbonds.patch, #32115
    Tue 16 Sep 2014 04:12:01 PM UTCmpjohansAttached File-=>Added hbonds.patch, #32113
    Mon 24 Nov 2008 06:25:35 PM UTCmbanckCarbon-Copy-=>Added mbanck
    Mon 24 Nov 2008 06:24:02 PM UTCNoneAttached File-=>Added h2cnh2.xyz, #16916
    Mon 24 Nov 2008 06:23:02 PM UTCNoneAttached File-=>Added xmakemol.png, #16915

    Back to the top


    Powered by Savane 3.1-cleanup1