Search in sources :

Example 1 with Bond

use of de.ipbhalle.metfraglib.additionals.Bond in project MetFragRelaunched by ipb-halle.

the class BitArrayPrecursor method getSingleBond.

protected Bond getSingleBond(String symbol1, String symbol2, String type, boolean isAromaticBond) {
    char typeChar = '=';
    if (!isAromaticBond) {
        if (type.equals("SINGLE"))
            typeChar = '-';
        else if (type.equals("DOUBLE"))
            typeChar = '=';
        else if (type.equals("TRIPLE"))
            typeChar = '~';
        else
            typeChar = '-';
    }
    Bond bond = new Bond(symbol1, symbol2, typeChar);
    return bond;
}
Also used : IBond(org.openscience.cdk.interfaces.IBond) Bond(de.ipbhalle.metfraglib.additionals.Bond)

Example 2 with Bond

use of de.ipbhalle.metfraglib.additionals.Bond in project MetFragRelaunched by ipb-halle.

the class NewFragmenterLipidScore method getSingleBondEnergy.

protected double getSingleBondEnergy(String symbol1, String symbol2, String type, boolean isAromaticBond) {
    char typeChar = '=';
    if (!isAromaticBond) {
        if (type.equals("SINGLE"))
            typeChar = '-';
        else if (type.equals("DOUBLE"))
            typeChar = '=';
        else if (type.equals("TRIPLE"))
            typeChar = '~';
        else
            typeChar = '-';
    }
    BondEnergies be = (BondEnergies) this.settings.get(VariableNames.BOND_ENERGY_OBJECT_NAME);
    return be.get(new Bond(symbol1, symbol2, typeChar));
}
Also used : BondEnergies(de.ipbhalle.metfraglib.additionals.BondEnergies) Bond(de.ipbhalle.metfraglib.additionals.Bond)

Example 3 with Bond

use of de.ipbhalle.metfraglib.additionals.Bond in project MetFragRelaunched by ipb-halle.

the class NewFragmenterScore method getSingleBondEnergy.

protected double getSingleBondEnergy(String symbol1, String symbol2, String type, boolean isAromaticBond) {
    char typeChar = '=';
    if (!isAromaticBond) {
        if (type.equals("SINGLE"))
            typeChar = '-';
        else if (type.equals("DOUBLE"))
            typeChar = '=';
        else if (type.equals("TRIPLE"))
            typeChar = '~';
        else
            typeChar = '-';
    }
    BondEnergies be = (BondEnergies) this.settings.get(VariableNames.BOND_ENERGY_OBJECT_NAME);
    return be.get(new Bond(symbol1, symbol2, typeChar));
}
Also used : BondEnergies(de.ipbhalle.metfraglib.additionals.BondEnergies) Bond(de.ipbhalle.metfraglib.additionals.Bond)

Aggregations

Bond (de.ipbhalle.metfraglib.additionals.Bond)3 BondEnergies (de.ipbhalle.metfraglib.additionals.BondEnergies)2 IBond (org.openscience.cdk.interfaces.IBond)1