| 1 |
/** |
| 2 |
* JNA-InChI - Library for calling InChI from Java |
| 3 |
* Copyright © 2018 Daniel Lowe |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public License |
| 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
package io.github.dan2097.jnainchi.inchi; |
| 19 |
|
| 20 |
import com.sun.jna.Pointer; |
| 21 |
import com.sun.jna.PointerType; |
| 22 |
|
| 23 |
public class IxaFunctions { |
| 24 |
|
| 25 |
public static final IXA_ATOMID IXA_ATOMID_IMPLICIT_H = new IXA_ATOMID(Pointer.createConstant(-1L)); |
| 26 |
|
| 27 |
public static class IXA_ATOMID extends PointerType { |
| 28 |
public IXA_ATOMID(Pointer address) { |
| 29 |
super(address); |
| 30 |
} |
| 31 |
public IXA_ATOMID() { |
| 32 |
super(); |
| 33 |
} |
| 34 |
}; |
| 35 |
|
| 36 |
public static class IXA_BONDID extends PointerType { |
| 37 |
public IXA_BONDID(Pointer address) { |
| 38 |
super(address); |
| 39 |
} |
| 40 |
public IXA_BONDID() { |
| 41 |
super(); |
| 42 |
} |
| 43 |
}; |
| 44 |
|
| 45 |
public static class IXA_INCHIBUILDER_HANDLE extends PointerType { |
| 46 |
public IXA_INCHIBUILDER_HANDLE(Pointer address) { |
| 47 |
super(address); |
| 48 |
} |
| 49 |
public IXA_INCHIBUILDER_HANDLE() { |
| 50 |
super(); |
| 51 |
} |
| 52 |
}; |
| 53 |
|
| 54 |
public static class IXA_INCHIKEYBUILDER_HANDLE extends PointerType { |
| 55 |
public IXA_INCHIKEYBUILDER_HANDLE(Pointer address) { |
| 56 |
super(address); |
| 57 |
} |
| 58 |
public IXA_INCHIKEYBUILDER_HANDLE() { |
| 59 |
super(); |
| 60 |
} |
| 61 |
}; |
| 62 |
|
| 63 |
public static class IXA_MOL_HANDLE extends PointerType { |
| 64 |
public IXA_MOL_HANDLE(Pointer address) { |
| 65 |
super(address); |
| 66 |
} |
| 67 |
public IXA_MOL_HANDLE() { |
| 68 |
super(); |
| 69 |
} |
| 70 |
}; |
| 71 |
|
| 72 |
public static class IXA_POLYMERUNITID extends PointerType { |
| 73 |
public IXA_POLYMERUNITID(Pointer address) { |
| 74 |
super(address); |
| 75 |
} |
| 76 |
public IXA_POLYMERUNITID() { |
| 77 |
super(); |
| 78 |
} |
| 79 |
}; |
| 80 |
|
| 81 |
public static class IXA_STATUS_HANDLE extends PointerType { |
| 82 |
public IXA_STATUS_HANDLE(Pointer address) { |
| 83 |
super(address); |
| 84 |
} |
| 85 |
public IXA_STATUS_HANDLE() { |
| 86 |
super(); |
| 87 |
} |
| 88 |
}; |
| 89 |
|
| 90 |
public static class IXA_STEREOID extends PointerType { |
| 91 |
public IXA_STEREOID(Pointer address) { |
| 92 |
super(address); |
| 93 |
} |
| 94 |
public IXA_STEREOID() { |
| 95 |
super(); |
| 96 |
} |
| 97 |
}; |
| 98 |
|
| 99 |
public static IXA_STATUS_HANDLE IXA_STATUS_Create(){ |
| 100 |
return new IXA_STATUS_HANDLE(InchiLibrary.IXA_STATUS_Create()); |
| 101 |
} |
| 102 |
|
| 103 |
public static void IXA_STATUS_Clear(IXA_STATUS_HANDLE hStatus) { |
| 104 |
InchiLibrary.IXA_STATUS_Clear(hStatus.getPointer()); |
| 105 |
} |
| 106 |
|
| 107 |
public static void IXA_STATUS_Destroy(IXA_STATUS_HANDLE hStatus) { |
| 108 |
InchiLibrary.IXA_STATUS_Destroy(hStatus.getPointer()); |
| 109 |
} |
| 110 |
|
| 111 |
public static boolean IXA_STATUS_HasError(IXA_STATUS_HANDLE hStatus) { |
| 112 |
return InchiLibrary.IXA_STATUS_HasError(hStatus.getPointer()); |
| 113 |
} |
| 114 |
|
| 115 |
public static boolean IXA_STATUS_HasWarning(IXA_STATUS_HANDLE hStatus) { |
| 116 |
return InchiLibrary.IXA_STATUS_HasWarning(hStatus.getPointer()); |
| 117 |
} |
| 118 |
|
| 119 |
public static int IXA_STATUS_GetCount(IXA_STATUS_HANDLE hStatus) { |
| 120 |
return InchiLibrary.IXA_STATUS_GetCount(hStatus.getPointer()); |
| 121 |
} |
| 122 |
|
| 123 |
public static int IXA_STATUS_GetSeverity(IXA_STATUS_HANDLE hStatus, int vIndex) { |
| 124 |
return InchiLibrary.IXA_STATUS_GetSeverity(hStatus.getPointer(), vIndex); |
| 125 |
} |
| 126 |
|
| 127 |
public static String IXA_STATUS_GetMessage(IXA_STATUS_HANDLE hStatus, int vIndex) { |
| 128 |
return InchiLibrary.IXA_STATUS_GetMessage(hStatus.getPointer(), vIndex); |
| 129 |
} |
| 130 |
|
| 131 |
public static IXA_MOL_HANDLE IXA_MOL_Create(IXA_STATUS_HANDLE hStatus) { |
| 132 |
return new IXA_MOL_HANDLE(InchiLibrary.IXA_MOL_Create(hStatus.getPointer())); |
| 133 |
} |
| 134 |
|
| 135 |
public static void IXA_MOL_Clear(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule) { |
| 136 |
InchiLibrary.IXA_MOL_Clear(hStatus.getPointer(), hMolecule.getPointer()); |
| 137 |
} |
| 138 |
|
| 139 |
public static void IXA_MOL_Destroy(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule) { |
| 140 |
InchiLibrary.IXA_MOL_Destroy(hStatus.getPointer(), hMolecule.getPointer()); |
| 141 |
} |
| 142 |
|
| 143 |
public static void IXA_MOL_ReadMolfile(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, String pBytes) { |
| 144 |
InchiLibrary.IXA_MOL_ReadMolfile(hStatus.getPointer(), hMolecule.getPointer(), fromString(pBytes)); |
| 145 |
} |
| 146 |
|
| 147 |
public static void IXA_MOL_ReadInChI(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, String pInChI) { |
| 148 |
InchiLibrary.IXA_MOL_ReadInChI(hStatus.getPointer(), hMolecule.getPointer(), fromString(pInChI)); |
| 149 |
} |
| 150 |
|
| 151 |
public static void IXA_MOL_SetChiral(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, boolean vChiral) { |
| 152 |
InchiLibrary.IXA_MOL_SetChiral(hStatus.getPointer(), hMolecule.getPointer(), vChiral); |
| 153 |
} |
| 154 |
|
| 155 |
public static boolean IXA_MOL_GetChiral(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule) { |
| 156 |
return InchiLibrary.IXA_MOL_GetChiral(hStatus.getPointer(), hMolecule.getPointer()); |
| 157 |
} |
| 158 |
|
| 159 |
public static IXA_ATOMID IXA_MOL_CreateAtom(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule) { |
| 160 |
return new IXA_ATOMID(InchiLibrary.IXA_MOL_CreateAtom(hStatus.getPointer(), hMolecule.getPointer())); |
| 161 |
} |
| 162 |
|
| 163 |
public static void IXA_MOL_SetAtomElement(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, String pElement) { |
| 164 |
InchiLibrary.IXA_MOL_SetAtomElement(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), fromString(pElement)); |
| 165 |
} |
| 166 |
|
| 167 |
public static void IXA_MOL_SetAtomAtomicNumber(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, int vAtomicNumber) { |
| 168 |
InchiLibrary.IXA_MOL_SetAtomAtomicNumber(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vAtomicNumber); |
| 169 |
} |
| 170 |
|
| 171 |
public static void IXA_MOL_SetAtomMass(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, int vMassNumber) { |
| 172 |
InchiLibrary.IXA_MOL_SetAtomMass(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vMassNumber); |
| 173 |
} |
| 174 |
|
| 175 |
public static void IXA_MOL_SetAtomCharge(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, int vCharge) { |
| 176 |
InchiLibrary.IXA_MOL_SetAtomCharge(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vCharge); |
| 177 |
} |
| 178 |
|
| 179 |
public static void IXA_MOL_SetAtomRadical(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, int vRadical) { |
| 180 |
InchiLibrary.IXA_MOL_SetAtomRadical(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vRadical); |
| 181 |
} |
| 182 |
|
| 183 |
public static void IXA_MOL_SetAtomHydrogens(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, int vHydrogenMassNumber, int vHydrogenCount) { |
| 184 |
InchiLibrary.IXA_MOL_SetAtomHydrogens(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vHydrogenMassNumber, vHydrogenCount); |
| 185 |
} |
| 186 |
|
| 187 |
public static void IXA_MOL_SetAtomX(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, double vX) { |
| 188 |
InchiLibrary.IXA_MOL_SetAtomX(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vX); |
| 189 |
} |
| 190 |
|
| 191 |
public static void IXA_MOL_SetAtomY(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, double vY) { |
| 192 |
InchiLibrary.IXA_MOL_SetAtomY(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vY); |
| 193 |
} |
| 194 |
|
| 195 |
public static void IXA_MOL_SetAtomZ(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, double vZ) { |
| 196 |
InchiLibrary.IXA_MOL_SetAtomZ(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vZ); |
| 197 |
} |
| 198 |
|
| 199 |
public static IXA_BONDID IXA_MOL_CreateBond(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom1, IXA_ATOMID vAtom2) { |
| 200 |
return new IXA_BONDID(InchiLibrary.IXA_MOL_CreateBond(hStatus.getPointer(), hMolecule.getPointer(), vAtom1.getPointer(), vAtom2.getPointer())); |
| 201 |
} |
| 202 |
|
| 203 |
public static void IXA_MOL_SetBondType(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond, int vType) { |
| 204 |
InchiLibrary.IXA_MOL_SetBondType(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer(), vType); |
| 205 |
} |
| 206 |
|
| 207 |
public static void IXA_MOL_SetBondWedge(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond, IXA_ATOMID vRefAtom, int vDirection) { |
| 208 |
InchiLibrary.IXA_MOL_SetBondWedge(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer(), vRefAtom.getPointer(), vDirection); |
| 209 |
} |
| 210 |
|
| 211 |
public static void IXA_MOL_SetDblBondConfig(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond, int vConfig) { |
| 212 |
InchiLibrary.IXA_MOL_SetDblBondConfig(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer(), vConfig); |
| 213 |
} |
| 214 |
|
| 215 |
public static IXA_STEREOID IXA_MOL_CreateStereoTetrahedron(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vCentralAtom, IXA_ATOMID vVertex1, IXA_ATOMID vVertex2, IXA_ATOMID vVertex3, IXA_ATOMID vVertex4) { |
| 216 |
return new IXA_STEREOID(InchiLibrary.IXA_MOL_CreateStereoTetrahedron(hStatus.getPointer(), hMolecule.getPointer(), vCentralAtom.getPointer(), vVertex1.getPointer(), vVertex2.getPointer(), vVertex3.getPointer(), vVertex4.getPointer())); |
| 217 |
} |
| 218 |
|
| 219 |
public static IXA_STEREOID IXA_MOL_CreateStereoRectangle(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vCentralBond, IXA_ATOMID vVertex1, IXA_ATOMID vVertex2, IXA_ATOMID vVertex3, IXA_ATOMID vVertex4) { |
| 220 |
return new IXA_STEREOID(InchiLibrary.IXA_MOL_CreateStereoRectangle(hStatus.getPointer(), hMolecule.getPointer(), vCentralBond.getPointer(), vVertex1.getPointer(), vVertex2.getPointer(), vVertex3.getPointer(), vVertex4.getPointer())); |
| 221 |
} |
| 222 |
|
| 223 |
public static IXA_STEREOID IXA_MOL_CreateStereoAntiRectangle(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vCentralAtom, IXA_ATOMID vVertex1, IXA_ATOMID vVertex2, IXA_ATOMID vVertex3, IXA_ATOMID vVertex4) { |
| 224 |
return new IXA_STEREOID(InchiLibrary.IXA_MOL_CreateStereoAntiRectangle(hStatus.getPointer(), hMolecule.getPointer(), vCentralAtom.getPointer(), vVertex1.getPointer(), vVertex2.getPointer(), vVertex3.getPointer(), vVertex4.getPointer())); |
| 225 |
} |
| 226 |
|
| 227 |
public static void IXA_MOL_SetStereoParity(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_STEREOID vStereo, int vParity) { |
| 228 |
InchiLibrary.IXA_MOL_SetStereoParity(hStatus.getPointer(), hMolecule.getPointer(), vStereo.getPointer(), vParity); |
| 229 |
} |
| 230 |
|
| 231 |
public static int IXA_MOL_ReserveSpace(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, int num_atoms, int num_bonds, int num_stereos) { |
| 232 |
return InchiLibrary.IXA_MOL_ReserveSpace(hStatus.getPointer(), hMolecule.getPointer(), num_atoms, num_bonds, num_stereos); |
| 233 |
} |
| 234 |
|
| 235 |
//FIXME IXA_MOL_CreatePolymerUnit and IXA_MOL_SetPolymerUnit are missing from Linux build |
| 236 |
// public static IXA_POLYMERUNITID IXA_MOL_CreatePolymerUnit(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule) { |
| 237 |
// return new IXA_POLYMERUNITID(InchiLibrary.IXA_MOL_CreatePolymerUnit(hStatus.getPointer(), hMolecule.getPointer())); |
| 238 |
// } |
| 239 |
// public static void IXA_MOL_SetPolymerUnit(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_POLYMERUNITID vPunit, int vid, int vtype, int vsubtype, int vconn, int vlabel, int vna, int vnb, DoubleBuffer vxbr1, DoubleBuffer vxbr2, ByteBuffer vsmt, IntBuffer valist, IntBuffer vblist) { |
| 240 |
// InchiLibrary.IXA_MOL_SetPolymerUnit(hStatus.getPointer(), hMolecule.getPointer(), vPunit.getPointer(), vid, vtype, vsubtype, vconn, vlabel, vna, vnb, vxbr1, vxbr2, vsmt, valist, vblist); |
| 241 |
// } |
| 242 |
|
| 243 |
public static int IXA_MOL_GetNumAtoms(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule) { |
| 244 |
return InchiLibrary.IXA_MOL_GetNumAtoms(hStatus.getPointer(), hMolecule.getPointer()); |
| 245 |
} |
| 246 |
|
| 247 |
public static int IXA_MOL_GetNumBonds(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule) { |
| 248 |
return InchiLibrary.IXA_MOL_GetNumBonds(hStatus.getPointer(), hMolecule.getPointer()); |
| 249 |
} |
| 250 |
|
| 251 |
public static IXA_ATOMID IXA_MOL_GetAtomId(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, int vAtomIndex) { |
| 252 |
return new IXA_ATOMID(InchiLibrary.IXA_MOL_GetAtomId(hStatus.getPointer(), hMolecule.getPointer(), vAtomIndex)); |
| 253 |
} |
| 254 |
|
| 255 |
public static IXA_BONDID IXA_MOL_GetBondId(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, int vBondIndex) { |
| 256 |
return new IXA_BONDID(InchiLibrary.IXA_MOL_GetBondId(hStatus.getPointer(), hMolecule.getPointer(), vBondIndex)); |
| 257 |
} |
| 258 |
|
| 259 |
public static int IXA_MOL_GetAtomIndex(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 260 |
return InchiLibrary.IXA_MOL_GetAtomIndex(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 261 |
} |
| 262 |
|
| 263 |
public static int IXA_MOL_GetBondIndex(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond) { |
| 264 |
return InchiLibrary.IXA_MOL_GetBondIndex(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer()); |
| 265 |
} |
| 266 |
|
| 267 |
public static int IXA_MOL_GetAtomNumBonds(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 268 |
return InchiLibrary.IXA_MOL_GetAtomNumBonds(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 269 |
} |
| 270 |
//FIXME IXA_MOL_GetPolymerUnitId and IXA_MOL_GetPolymerUnitIndex are missing from Linux build |
| 271 |
// |
| 272 |
// public static IXA_POLYMERUNITID IXA_MOL_GetPolymerUnitId(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, int vPolymerUnitIndex) { |
| 273 |
// return new IXA_POLYMERUNITID(InchiLibrary.IXA_MOL_GetPolymerUnitId(hStatus.getPointer(), hMolecule.getPointer(), vPolymerUnitIndex)); |
| 274 |
// } |
| 275 |
// |
| 276 |
// public static int IXA_MOL_GetPolymerUnitIndex(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_POLYMERUNITID vPolymerUnit) { |
| 277 |
// return InchiLibrary.IXA_MOL_GetPolymerUnitIndex(hStatus.getPointer(), hMolecule.getPointer(), vPolymerUnit.getPointer()); |
| 278 |
// } |
| 279 |
|
| 280 |
public static IXA_BONDID IXA_MOL_GetAtomBond(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, int vBondIndex) { |
| 281 |
return new IXA_BONDID(InchiLibrary.IXA_MOL_GetAtomBond(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vBondIndex)); |
| 282 |
} |
| 283 |
|
| 284 |
public static IXA_BONDID IXA_MOL_GetCommonBond(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom1, IXA_ATOMID vAtom2) { |
| 285 |
return new IXA_BONDID(InchiLibrary.IXA_MOL_GetCommonBond(hStatus.getPointer(), hMolecule.getPointer(), vAtom1.getPointer(), vAtom2.getPointer())); |
| 286 |
} |
| 287 |
|
| 288 |
public static IXA_ATOMID IXA_MOL_GetBondAtom1(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond) { |
| 289 |
return new IXA_ATOMID(InchiLibrary.IXA_MOL_GetBondAtom1(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer())); |
| 290 |
} |
| 291 |
|
| 292 |
public static IXA_ATOMID IXA_MOL_GetBondAtom2(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond) { |
| 293 |
return new IXA_ATOMID(InchiLibrary.IXA_MOL_GetBondAtom2(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer())); |
| 294 |
} |
| 295 |
|
| 296 |
public static IXA_ATOMID IXA_MOL_GetBondOtherAtom(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond, IXA_ATOMID vAtom) { |
| 297 |
return new IXA_ATOMID(InchiLibrary.IXA_MOL_GetBondOtherAtom(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer(), vAtom.getPointer())); |
| 298 |
} |
| 299 |
|
| 300 |
public static String IXA_MOL_GetAtomElement(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 301 |
return InchiLibrary.IXA_MOL_GetAtomElement(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 302 |
} |
| 303 |
|
| 304 |
public static int IXA_MOL_GetAtomAtomicNumber(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 305 |
return InchiLibrary.IXA_MOL_GetAtomAtomicNumber(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 306 |
} |
| 307 |
|
| 308 |
public static int IXA_MOL_GetAtomMass(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 309 |
return InchiLibrary.IXA_MOL_GetAtomMass(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 310 |
} |
| 311 |
|
| 312 |
public static int IXA_MOL_GetAtomCharge(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 313 |
return InchiLibrary.IXA_MOL_GetAtomCharge(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 314 |
} |
| 315 |
|
| 316 |
public static int IXA_MOL_GetAtomRadical(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 317 |
return InchiLibrary.IXA_MOL_GetAtomRadical(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 318 |
} |
| 319 |
|
| 320 |
public static int IXA_MOL_GetAtomHydrogens(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom, int vHydrogenMassNumber) { |
| 321 |
return InchiLibrary.IXA_MOL_GetAtomHydrogens(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer(), vHydrogenMassNumber); |
| 322 |
} |
| 323 |
|
| 324 |
public static double IXA_MOL_GetAtomX(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 325 |
return InchiLibrary.IXA_MOL_GetAtomX(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 326 |
} |
| 327 |
|
| 328 |
public static double IXA_MOL_GetAtomY(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 329 |
return InchiLibrary.IXA_MOL_GetAtomY(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 330 |
} |
| 331 |
|
| 332 |
public static double IXA_MOL_GetAtomZ(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_ATOMID vAtom) { |
| 333 |
return InchiLibrary.IXA_MOL_GetAtomZ(hStatus.getPointer(), hMolecule.getPointer(), vAtom.getPointer()); |
| 334 |
} |
| 335 |
|
| 336 |
public static int IXA_MOL_GetBondType(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond) { |
| 337 |
return InchiLibrary.IXA_MOL_GetBondType(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer()); |
| 338 |
} |
| 339 |
|
| 340 |
public static int IXA_MOL_GetBondWedge(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond, IXA_ATOMID vRefAtom) { |
| 341 |
return InchiLibrary.IXA_MOL_GetBondWedge(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer(), vRefAtom.getPointer()); |
| 342 |
} |
| 343 |
|
| 344 |
public static int IXA_MOL_GetDblBondConfig(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_BONDID vBond) { |
| 345 |
return InchiLibrary.IXA_MOL_GetDblBondConfig(hStatus.getPointer(), hMolecule.getPointer(), vBond.getPointer()); |
| 346 |
} |
| 347 |
|
| 348 |
public static int IXA_MOL_GetNumStereos(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule) { |
| 349 |
return InchiLibrary.IXA_MOL_GetNumStereos(hStatus.getPointer(), hMolecule.getPointer()); |
| 350 |
} |
| 351 |
|
| 352 |
public static IXA_STEREOID IXA_MOL_GetStereoId(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, int vStereoIndex) { |
| 353 |
return new IXA_STEREOID(InchiLibrary.IXA_MOL_GetStereoId(hStatus.getPointer(), hMolecule.getPointer(), vStereoIndex)); |
| 354 |
} |
| 355 |
|
| 356 |
public static int IXA_MOL_GetStereoIndex(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_STEREOID vStereo) { |
| 357 |
return InchiLibrary.IXA_MOL_GetStereoIndex(hStatus.getPointer(), hMolecule.getPointer(), vStereo.getPointer()); |
| 358 |
} |
| 359 |
|
| 360 |
public static int IXA_MOL_GetStereoTopology(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_STEREOID vStereo) { |
| 361 |
return InchiLibrary.IXA_MOL_GetStereoTopology(hStatus.getPointer(), hMolecule.getPointer(), vStereo.getPointer()); |
| 362 |
} |
| 363 |
|
| 364 |
public static IXA_ATOMID IXA_MOL_GetStereoCentralAtom(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_STEREOID vStereo) { |
| 365 |
return new IXA_ATOMID(InchiLibrary.IXA_MOL_GetStereoCentralAtom(hStatus.getPointer(), hMolecule.getPointer(), vStereo.getPointer())); |
| 366 |
} |
| 367 |
|
| 368 |
public static IXA_BONDID IXA_MOL_GetStereoCentralBond(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_STEREOID vStereo) { |
| 369 |
return new IXA_BONDID(InchiLibrary.IXA_MOL_GetStereoCentralBond(hStatus.getPointer(), hMolecule.getPointer(), vStereo.getPointer())); |
| 370 |
} |
| 371 |
|
| 372 |
public static int IXA_MOL_GetStereoNumVertices(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_STEREOID vStereo) { |
| 373 |
return InchiLibrary.IXA_MOL_GetStereoNumVertices(hStatus.getPointer(), hMolecule.getPointer(), vStereo.getPointer()); |
| 374 |
} |
| 375 |
|
| 376 |
public static IXA_ATOMID IXA_MOL_GetStereoVertex(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_STEREOID vStereo, int vVertexIndex) { |
| 377 |
return new IXA_ATOMID(InchiLibrary.IXA_MOL_GetStereoVertex(hStatus.getPointer(), hMolecule.getPointer(), vStereo.getPointer(), vVertexIndex)); |
| 378 |
} |
| 379 |
|
| 380 |
public static int IXA_MOL_GetStereoParity(IXA_STATUS_HANDLE hStatus, IXA_MOL_HANDLE hMolecule, IXA_STEREOID vStereo) { |
| 381 |
return InchiLibrary.IXA_MOL_GetStereoParity(hStatus.getPointer(), hMolecule.getPointer(), vStereo.getPointer()); |
| 382 |
} |
| 383 |
|
| 384 |
public static IXA_INCHIBUILDER_HANDLE IXA_INCHIBUILDER_Create(IXA_STATUS_HANDLE hStatus) { |
| 385 |
return new IXA_INCHIBUILDER_HANDLE(InchiLibrary.IXA_INCHIBUILDER_Create(hStatus.getPointer())); |
| 386 |
} |
| 387 |
|
| 388 |
public static void IXA_INCHIBUILDER_SetMolecule(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder, IXA_MOL_HANDLE hMolecule) { |
| 389 |
InchiLibrary.IXA_INCHIBUILDER_SetMolecule(hStatus.getPointer(), hInChIBuilder.getPointer(), hMolecule.getPointer()); |
| 390 |
} |
| 391 |
|
| 392 |
public static String IXA_INCHIBUILDER_GetInChI(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder) { |
| 393 |
return InchiLibrary.IXA_INCHIBUILDER_GetInChI(hStatus.getPointer(), hInChIBuilder.getPointer()); |
| 394 |
} |
| 395 |
|
| 396 |
public static String IXA_INCHIBUILDER_GetInChIEx(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hBuilder) { |
| 397 |
return InchiLibrary.IXA_INCHIBUILDER_GetInChIEx(hStatus.getPointer(), hBuilder.getPointer()); |
| 398 |
} |
| 399 |
|
| 400 |
public static String IXA_INCHIBUILDER_GetAuxInfo(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder) { |
| 401 |
return InchiLibrary.IXA_INCHIBUILDER_GetAuxInfo(hStatus.getPointer(), hInChIBuilder.getPointer()); |
| 402 |
} |
| 403 |
|
| 404 |
public static String IXA_INCHIBUILDER_GetLog(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder) { |
| 405 |
return InchiLibrary.IXA_INCHIBUILDER_GetLog(hStatus.getPointer(), hInChIBuilder.getPointer()); |
| 406 |
} |
| 407 |
|
| 408 |
public static void IXA_INCHIBUILDER_Destroy(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder) { |
| 409 |
InchiLibrary.IXA_INCHIBUILDER_Destroy(hStatus.getPointer(), hInChIBuilder.getPointer()); |
| 410 |
} |
| 411 |
|
| 412 |
public static void IXA_INCHIBUILDER_SetOption(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder, int vOption, boolean vValue) { |
| 413 |
InchiLibrary.IXA_INCHIBUILDER_SetOption(hStatus.getPointer(), hInChIBuilder.getPointer(), vOption, vValue); |
| 414 |
} |
| 415 |
|
| 416 |
public static void IXA_INCHIBUILDER_SetOption_Stereo(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder, int vValue) { |
| 417 |
InchiLibrary.IXA_INCHIBUILDER_SetOption_Stereo(hStatus.getPointer(), hInChIBuilder.getPointer(), vValue); |
| 418 |
} |
| 419 |
|
| 420 |
public static void IXA_INCHIBUILDER_SetOption_Timeout(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder, int vValue) { |
| 421 |
InchiLibrary.IXA_INCHIBUILDER_SetOption_Timeout(hStatus.getPointer(), hInChIBuilder.getPointer(), vValue); |
| 422 |
} |
| 423 |
|
| 424 |
public static void IXA_INCHIBUILDER_SetOption_Timeout_MilliSeconds(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder, long vValue) { |
| 425 |
InchiLibrary.IXA_INCHIBUILDER_SetOption_Timeout_MilliSeconds(hStatus.getPointer(), hInChIBuilder.getPointer(), vValue); |
| 426 |
} |
| 427 |
|
| 428 |
public static boolean IXA_INCHIBUILDER_CheckOption(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder, int vOption) { |
| 429 |
return InchiLibrary.IXA_INCHIBUILDER_CheckOption(hStatus.getPointer(), hInChIBuilder.getPointer(), vOption); |
| 430 |
} |
| 431 |
|
| 432 |
public static boolean IXA_INCHIBUILDER_CheckOption_Stereo(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder, int vValue) { |
| 433 |
return InchiLibrary.IXA_INCHIBUILDER_CheckOption_Stereo(hStatus.getPointer(), hInChIBuilder.getPointer(), vValue); |
| 434 |
} |
| 435 |
|
| 436 |
//FIXME IXA_INCHIBUILDER_GetOption_Timeout_MilliSeconds is missing from Linux build |
| 437 |
// public static long IXA_INCHIBUILDER_GetOption_Timeout_MilliSeconds(IXA_STATUS_HANDLE hStatus, IXA_INCHIBUILDER_HANDLE hInChIBuilder) { |
| 438 |
// return InchiLibrary.IXA_INCHIBUILDER_GetOption_Timeout_MilliSeconds(hStatus.getPointer(), hInChIBuilder.getPointer()); |
| 439 |
// } |
| 440 |
|
| 441 |
public static IXA_INCHIKEYBUILDER_HANDLE IXA_INCHIKEYBUILDER_Create(IXA_STATUS_HANDLE hStatus) { |
| 442 |
return new IXA_INCHIKEYBUILDER_HANDLE(InchiLibrary.IXA_INCHIKEYBUILDER_Create(hStatus.getPointer())); |
| 443 |
} |
| 444 |
|
| 445 |
public static void IXA_INCHIKEYBUILDER_SetInChI(IXA_STATUS_HANDLE hStatus, IXA_INCHIKEYBUILDER_HANDLE hInChIKeyBuilder, String pInChI) { |
| 446 |
InchiLibrary.IXA_INCHIKEYBUILDER_SetInChI(hStatus.getPointer(), hInChIKeyBuilder.getPointer(), fromString(pInChI)); |
| 447 |
} |
| 448 |
|
| 449 |
public static String IXA_INCHIKEYBUILDER_GetInChIKey(IXA_STATUS_HANDLE hStatus, IXA_INCHIKEYBUILDER_HANDLE hInChIKeyBuilder) { |
| 450 |
return InchiLibrary.IXA_INCHIKEYBUILDER_GetInChIKey(hStatus.getPointer(), hInChIKeyBuilder.getPointer()); |
| 451 |
} |
| 452 |
|
| 453 |
public static void IXA_INCHIKEYBUILDER_Destroy(IXA_STATUS_HANDLE hStatus, IXA_INCHIKEYBUILDER_HANDLE hInChIKeyBuilder) { |
| 454 |
InchiLibrary.IXA_INCHIKEYBUILDER_Destroy(hStatus.getPointer(), hInChIKeyBuilder.getPointer()); |
| 455 |
} |
| 456 |
|
| 457 |
private static byte[] fromString(String jstr) { |
| 458 |
int strLen = jstr.length(); |
| 459 |
byte[] cstr = new byte[strLen + 1]; |
| 460 |
for (int i = 0; i < strLen; i++) { |
| 461 |
cstr[i] = (byte) jstr.charAt(i); |
| 462 |
} |
| 463 |
cstr[strLen] = '\0'; |
| 464 |
return cstr; |
| 465 |
} |
| 466 |
|
| 467 |
} |