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

 
 

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

Submitter:  None
Submitted:  Mon 24 Nov 2008 06:23:02 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

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)

-X- <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)

-X- <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)

-X- <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 Files:
   
   
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
  • -email is unavailable- added by mpjohans (Updated the item)
  • -email is unavailable- added by mbanck (original submitter, forgot to login before filing report)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-09-17 mpjohans Attached File- Added hbonds.patch, #32122
    2014-09-16 mpjohans Attached File- Added hbonds.patch, #32115
    2014-09-16 mpjohans Attached File- Added hbonds.patch, #32113
    2008-11-24 mbanck Carbon-Copy- Added mbanck
    2008-11-24 None Attached File- Added h2cnh2.xyz, #16916
    2008-11-24 None Attached File- Added xmakemol.png, #16915

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code