From: <mig...@us...> - 2006-11-28 10:03:04
|
Revision: 7369 http://svn.sourceforge.net/cdk/?rev=7369&view=rev Author: miguelrojasch Date: 2006-11-28 02:02:55 -0800 (Tue, 28 Nov 2006) Log Message: ----------- Calculation of potential Ionization of triple bonds Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/qsar/descriptors/bond/IPBondDescriptor.java trunk/cdk/src/org/openscience/cdk/reaction/type/BreakingBondReaction.java trunk/cdk/src/org/openscience/cdk/test/qsar/descriptors/bond/IPBondDescriptorTest.java Added Paths: ----------- trunk/cdk/src/data/arff/ActylWithoutHetero.arff Added: trunk/cdk/src/data/arff/ActylWithoutHetero.arff =================================================================== --- trunk/cdk/src/data/arff/ActylWithoutHetero.arff (rev 0) +++ trunk/cdk/src/data/arff/ActylWithoutHetero.arff 2006-11-28 10:02:55 UTC (rev 7369) @@ -0,0 +1,83 @@ +@relation ActylWithoutHetero +@attribute SE_1 numeric +@attribute SCH_1 numeric +@attribute SE_2 numeric +@attribute SCH_2 numeric +@attribute RES_c1 numeric +@attribute RES_c2 numeric +@attribute class {05_0,05_1,05_2,05_3,05_4,05_5,05_6,05_7,05_8,05_9,06_0,06_1,06_2,06_3,06_4,06_5,06_6,06_7,06_8,06_9,07_0,07_1,07_2,07_3,07_4,07_5,07_6,07_7,07_8,07_9,08_0,08_1,08_2,08_3,08_4,08_5,08_6,08_7,08_8,08_9,09_0,09_1,09_2,09_3,09_4,09_5,09_6,09_7,09_8,09_9,10_0,10_1,10_2,10_3,10_4,10_5,10_6,10_7,10_8,10_9,11_0,11_1,11_2,11_3,11_4,11_5,11_6,11_7,11_8,11_9,12_0,12_1,12_2,12_3,12_4,12_5,12_6,12_7,12_8,12_9,13_0,13_1,13_2,13_3,13_4,13_5,13_6,13_7,13_8,13_9,14_0,14_1,14_2,14_3,14_4,14_5,14_6,14_7,14_8,14_9} +@data + 9.494807998403894 , -0.09543284915830591 , 9.486935252109493 , -0.09627846713773697 , 0.0 , 0.0 ,08_7, + 9.392311208122825 , -0.10645089963183557 , 9.2696685512738 , -0.11965967279905781 , 1.4842083863328226 , 0.0 ,10_1, + 9.423769792019508 , -0.10306718352743875 , 9.394860686150572 , -0.1061766083090366 , 1.4842774976883533 , 1.4840736254617448 ,09_3, + 9.426337086673692 , -0.10279112212931105 , 9.423821348462623 , -0.10306163954128922 , 1.4842799667482964 , 1.4842711775204724 ,09_2, + 9.486659468566145 , -0.09630809130185243 , 9.486659468566145 , -0.09630809130185243 , 0.0 , 0.0 ,09_0, + 9.426428118942114 , -0.10278133364189258 , 9.426428118942114 , -0.10278133364189258 , 1.4842802433064235 , 1.4842802433064235 ,09_1, + 9.426335619618941 , -0.10279127987840847 , 9.426335619618941 , -0.10279127987840847 , 1.4842794518493745 , 1.4842794518493745 ,09_2, + 9.42642675137882 , -0.10278148069267178 , 9.42642675137882 , -0.10278148069267178 , 1.4842802165635192 , 1.4842802165635192 ,09_1, + 9.423771151555504 , -0.10306703733325863 , 9.394860694042631 , -0.1061766074599701 , 1.4842775245656659 , 1.4840736256385545 ,09_3, + 9.426428110978604 , -0.10278133449818995 , 9.426426759275412 , -0.10278147984357008 , 1.4842802431884417 , 1.4842802166780846 ,09_0, + 9.426338438076543 , -0.10279097681600548 , 9.423821356343556 , -0.10306163869383428 , 1.484279993050579 , 1.484271177638078 ,09_2, + 9.426425441805513 , -0.10278162150793042 , 9.42633692919027 , -0.1027911390631489 , 1.4842802079900697 , 1.4842794604462708 ,09_1, + 9.450070725326562 , -0.10023960840330355 , 9.397347148822334 , -0.10590910801748572 , 1.484354795187887 , 1.4840768412402776 ,09_3, + 9.400213161348724 , -0.10560078868228678 , 10.212974738025862 , -0.018760018723276494 , 0.0 , 0.0 ,11_6, + 9.39500565034239 , -0.10616101236577494 , 9.269759323795263 , -0.1196498863250783 , 1.4842196566683246 , 0.0 ,10_0, + 9.426336937086853 , -0.10279113821404723 , 9.426426801421238 , -0.10278147531173129 , 1.4842794605611507 , 1.4842802346172543 ,09_1, + 9.394916580285491 , -0.10617059494530891 , 9.269758014581166 , -0.11965002747550309 , 1.4842188082706158 , 0.0 ,09_9, + 9.426428102783722 , -0.10278133537936555 , 9.426426759260107 , -0.10278147984521592 , 1.4842802428418416 , 1.4842802166776154 ,09_1, + 9.423771151571476 , -0.10306703733154135 , 9.394860694042631 , -0.1061766074599701 , 1.4842775245671 , 1.4840736256385545 ,09_3, + 9.42633844627141 , -0.1027909759348299 , 9.42382135635886 , -0.10306163869218844 , 1.4842799933974968 , 1.4842711776385615 ,09_1, + 9.426426793210387 , -0.10278147619462419 , 9.426336937071547 , -0.10279113821569306 , 1.4842802342692225 , 1.48427946056068 ,09_1, + 9.426247264619573 , -0.10280078049995227 , 9.423820038947545 , -0.10306178035647996 , 1.48427920995553 , 1.484271168684614 ,09_2, + 9.394916580285491 , -0.10617059494530891 , 9.269758014581166 , -0.11965002747550309 , 1.4842188082706158 , 0.0 ,09_9, + 9.42377114336102 , -0.10306703821443149 , 9.394860694027335 , -0.10617660746161585 , 1.4842775242157522 , 1.4840736256378289 ,09_3, + 9.394860694042631 , -0.1061766074599701 , 9.423771151571476 , -0.10306703733154135 , 1.4840736256385545 , 1.4842775245671 ,09_2, + 9.36336433285267 , -0.10956604351407395 , 9.267104482643054 , -0.11993611941345131 , 1.4839877781131126 , 0.0 ,08_6, + 9.2696685512738 , -0.11965967279905781 , 9.392311208122825 , -0.10645089963183557 , 0.0 , 1.4842083863328226 ,07_9, + 9.489370823428741 , -0.09601684849347412 , 9.489370823428741 , -0.09601684849347412 , 0.0 , 0.0 ,08_8, + 9.394916580285491 , -0.10617059494530891 , 9.269758014581166 , -0.11965002747550309 , 1.4842188082706158 , 0.0 ,09_9, + 9.426428118875195 , -0.10278133364908826 , 9.426428118875195 , -0.10278133364908826 , 1.4842802433029954 , 1.4842802433029954 ,09_0, + 9.426428110680318 , -0.10278133453026386 , 9.426428118875862 , -0.1027813336490168 , 1.484280242956396 , 1.484280243303947 ,09_0, + 9.426428110680318 , -0.10278133453026386 , 9.42642811885989 , -0.1027813336507341 , 1.484280242956396 , 1.4842802433025262 ,09_0, + 9.481490077125306 , -0.09686340335219511 , 9.428896205082857 , -0.10251595183008165 , 0.0 , 1.484275701327769 ,09_1, + 9.392205101662986 , -0.10646231558992332 , 9.392205101662986 , -0.10646231558992332 , 1.4840695428861184 , 1.4840695428861184 ,09_5, + 9.42643237080116 , -0.10278087644977808 , 9.272422491862747 , -0.11936276842239561 , 1.484317518299283 , 0.0 ,10_0, + 9.489370779589306 , -0.09601685320242202 , 9.489370779589306 , -0.09601685320242202 , 0.0 , 0.0 ,08_9, + 9.42620680361743 , -0.1028051311885307 , 9.394948329263588 , -0.10616717923787963 , 1.4842847689291914 , 1.4840739824463733 ,09_3, + 9.42874479506797 , -0.10253223192572593 , 9.395037924232216 , -0.10615754019106444 , 1.4842924850953227 , 1.4840743534877088 ,09_2, + 9.421204950666688 , -0.10334299306999764 , 9.272242734603012 , -0.11938214776256102 , 1.4843106206806884 , 0.0 ,10_0, + 9.42382135635886 , -0.10306163869218844 , 9.426338446287382 , -0.10279097593311262 , 1.4842711776385615 , 1.484279993398919 ,09_1, + 9.426336937086853 , -0.10279113821404723 , 9.426426801421238 , -0.10278147531173129 , 1.4842794605611507 , 1.4842802346172543 ,09_0, + 9.426426759275412 , -0.10278147984357008 , 9.426428110994575 , -0.10278133449647266 , 1.4842802166780846 , 1.484280243189862 ,09_0, + 9.423771151571476 , -0.10306703733154135 , 9.394860694042631 , -0.1061766074599701 , 1.4842775245671 , 1.4840736256385545 ,09_2, + 9.426338446287382 , -0.10279097593311262 , 9.42382135635886 , -0.10306163869218844 , 1.484279993398919 , 1.4842711776385615 ,09_1, + 9.426426801405267 , -0.10278147531344858 , 9.426336937086853 , -0.10279113821404723 , 1.4842802346158335 , 1.4842794605611507 ,09_1, + 9.426338446287382 , -0.10279097593311262 , 9.42382135635886 , -0.10306163869218844 , 1.484279993398919 , 1.4842711776385615 ,09_1, + 9.426336937086853 , -0.10279113821404723 , 9.426426801421238 , -0.10278147531173129 , 1.4842794605611507 , 1.4842802346172543 ,09_1, + 9.426428110994575 , -0.10278133449647266 , 9.426426759275412 , -0.10278147984357008 , 1.484280243189862 , 1.4842802166780846 ,09_1, + 9.39482545174313 , -0.10618039900140763 , 9.269756700897055 , -0.1196501691078571 , 1.4842178992885544 , 0.0 ,10_1, + 9.421164502459824 , -0.10334734275298108 , 9.394771070641456 , -0.10618624959457211 , 1.4842683810195445 , 1.4840732429699983 ,09_4, + 9.394916572079788 , -0.106170595828118 , 9.269758014565909 , -0.1196500274771479 , 1.4842188078646243 , 0.0 ,10_0, + 9.39491658026953 , -0.10617059494702602 , 9.269758014581166 , -0.11965002747550309 , 1.4842188082689571 , 0.0 ,09_9, + 9.394860694042631 , -0.1061766074599701 , 9.423771151571476 , -0.10306703733154135 , 1.4840736256385545 , 1.4842775245671 ,09_2, + 9.394860694042631 , -0.1061766074599701 , 9.423771151571476 , -0.10306703733154135 , 1.4840736256385545 , 1.4842775245671 ,09_2, + 9.426797430224058 , -0.10274162261575413 , 9.272427816144475 , -0.11936219442107358 , 1.484318722229704 , 0.0 ,09_7, + 9.436609897460588 , -0.10168660566698684 , 9.272781178387703 , -0.11932409918347518 , 1.4843287222059214 , 0.0 ,09_3, + 9.400023491098027 , -0.10562119253009009 , 9.481539578010574 , -0.09685808558432395 , 1.484080705159693 , 0.0 ,09_1, + 9.426443966953183 , -0.10277962954377796 , 9.272422558940725 , -0.11936276119083812 , 1.484318210471875 , 0.0 ,09_5, + 9.426338446287382 , -0.10279097593311262 , 9.42382135635886 , -0.10306163869218844 , 1.484279993398919 , 1.4842711776385615 ,09_1, + 9.269758006709345 , -0.11965002832418847 , 9.394915221501853 , -0.1061707411298145 , 0.0 , 1.4842187772493678 ,10_0, + 9.426428110665011 , -0.1027813345319097 , 9.426428110665011 , -0.1027813345319097 , 1.4842802429559263 , 1.4842802429559263 ,09_0, + 9.39735104887818 , -0.1059086884478954 , 9.269845494745711 , -0.11964059597504041 , 1.4842270898679075 , 0.0 ,09_8, + 9.423679973883715 , -0.10307684189533536 , 9.394859377317255 , -0.1061767491197785 , 1.4842767345671894 , 1.48407361226022 ,09_3, + 9.394916580285491 , -0.10617059494530891 , 9.269758014581166 , -0.11965002747550309 , 1.4842188082706158 , 0.0 ,09_9, + 9.394916580285491 , -0.10617059494530891 , 9.269758014581166 , -0.11965002747550309 , 1.4842188082706158 , 0.0 ,09_9, + 9.269758014581166 , -0.11965002747550309 , 9.394916580285491 , -0.10617059494530891 , 0.0 , 1.4842188082706158 ,09_8, + 9.392205101662986 , -0.10646231558992332 , 9.392205101662986 , -0.10646231558992332 , 1.4840695428861184 , 1.4840695428861184 ,07_9, + 9.45004225930433 , -0.100242668065752 , 9.274826839426987 , -0.11910356527337754 , 0.0 , 0.0 ,09_8, + 9.423725856214167 , -0.10307190805221014 , 9.272331248871442 , -0.11937260517469629 , 1.4843137943632747 , 0.0 ,09_7, + 9.455217640585747 , -0.09968641779857325 , 9.455217640585747 , -0.09968641779857325 , 1.484358070992045 , 1.484358070992045 ,09_1, + 9.423731687658272 , -0.10307128098253947 , 9.423731687658272 , -0.10307128098253947 , 1.4842709201629687 , 1.4842709201629687 ,09_3, + 9.426432300746738 , -0.10278088398256038 , 9.27242249173284 , -0.1193627684364006 , 1.4843174944768562 , 0.0 ,09_9, + 9.483988844885998 , -0.09659497193591672 , 9.400111844473864 , -0.10561168787466928 , 0.0 , 1.4840810480928588 ,09_1, + 9.47892046782722 , -0.09713945674434822 , 9.399933142660815 , -0.10563091181983757 , 0.0 , 1.484080337523396 ,09_2, Modified: trunk/cdk/src/org/openscience/cdk/qsar/descriptors/bond/IPBondDescriptor.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/qsar/descriptors/bond/IPBondDescriptor.java 2006-11-28 08:32:53 UTC (rev 7368) +++ trunk/cdk/src/org/openscience/cdk/qsar/descriptors/bond/IPBondDescriptor.java 2006-11-28 10:02:55 UTC (rev 7369) @@ -44,10 +44,10 @@ import org.openscience.cdk.reaction.type.ElectronImpactPDBReaction; /** - * This class returns the ionization potential of a bond. It is + * This class returns the ionization potential of a bond (double or triple). It is * based in learning machine (in this case J48 see J48WModel) - * from experimental values. Up to now is - * only possible predict for double bonds and they are not belong to + * from experimental values (NIST data). Up to now is + * only possible predict for double- or triple bonds and they are not belong to * conjugated system or not adjacent to an heteroatom. * * <p>This descriptor uses these parameters: @@ -153,7 +153,14 @@ resultsH = calculatePiSystWithoutHeteroDescriptor(bond, container); path = "data/arff/PySystWithoutHetero.arff"; isTarget = true; + }else if(bond.getOrder() == 3 && bond.getAtom(0).getSymbol().equals("C") && + bond.getAtom(1).getSymbol().equals("C")){ + + resultsH = calculatePiSystWithoutHeteroDescriptor(bond, container); + path = "data/arff/ActylWithoutHetero.arff"; + isTarget = true; } + if(isTarget){ J48WModel j48 = new J48WModel(true,path); String[] options = new String[4]; Modified: trunk/cdk/src/org/openscience/cdk/reaction/type/BreakingBondReaction.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/reaction/type/BreakingBondReaction.java 2006-11-28 08:32:53 UTC (rev 7368) +++ trunk/cdk/src/org/openscience/cdk/reaction/type/BreakingBondReaction.java 2006-11-28 10:02:55 UTC (rev 7369) @@ -4,7 +4,7 @@ * $Date: 2006-03-29 10:27:08 +0200 (Wed, 29 Mar 2006) $ * $Revision: 5855 $ * - * Copyright (C) 2006 Miguel Rojas <mig...@un...> + * Copyright (C) 2006 Miguel Rojas <mig...@un...> * * Contact: cdk...@li... * Modified: trunk/cdk/src/org/openscience/cdk/test/qsar/descriptors/bond/IPBondDescriptorTest.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/test/qsar/descriptors/bond/IPBondDescriptorTest.java 2006-11-28 08:32:53 UTC (rev 7368) +++ trunk/cdk/src/org/openscience/cdk/test/qsar/descriptors/bond/IPBondDescriptorTest.java 2006-11-28 10:02:55 UTC (rev 7369) @@ -159,5 +159,50 @@ IReactionSet reactionSet = descriptor.getReactionSet(mol.getBond(0),mol); assertEquals(0, reactionSet.getReactionCount()); } + /** + * A unit test for JUnit with CCCCCC + * + * @throws ClassNotFoundException + * @throws CDKException + * @throws java.lang.Exception + */ + public void testIPTripleDescriptor1() throws ClassNotFoundException, CDKException, java.lang.Exception{ + + SmilesParser sp = new SmilesParser(); + Molecule mol = sp.parseSmiles("C#CCC"); + HydrogenAdder hAdder = new HydrogenAdder(); + hAdder.addExplicitHydrogensToSatisfyValency(mol); + + LonePairElectronChecker lpcheck = new LonePairElectronChecker(); + lpcheck.newSaturate(mol); + + double result= ((DoubleResult)descriptor.calculate(mol.getBond(0),mol).getValue()).doubleValue(); + double resultAccordingNIST = 9.44; + assertEquals(resultAccordingNIST, result, 0.75); + } + /** + * A unit test for JUnit with CCCCCC + * + * @throws ClassNotFoundException + * @throws CDKException + * @throws java.lang.Exception + */ + public void testIPTripleDescriptor2() throws ClassNotFoundException, CDKException, java.lang.Exception{ + + SmilesParser sp = new SmilesParser(); + Molecule mol = sp.parseSmiles("C(#CC(C)(C)C)C(C)(C)C"); + + HydrogenAdder hAdder = new HydrogenAdder(); + hAdder.addExplicitHydrogensToSatisfyValency(mol); + + LonePairElectronChecker lpcheck = new LonePairElectronChecker(); + lpcheck.newSaturate(mol); + + double result= ((DoubleResult)descriptor.calculate(mol.getBond(0),mol).getValue()).doubleValue(); + double resultAccordingNIST = 8.98; + assertEquals(resultAccordingNIST, result, 0.2); + } + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |