Our goals are:
- Further development of the BioJava modules. For module specific goals see the Modules pages on the BioJava wiki.
- Anything the module leaders deem necessary for their modules.
- Add new modules
- Finalizing BioJava 3.0
- Further development of the BioJava modules. For module specific goals see the Modules pages on the BioJava wiki.
- Anything the module leaders deem necessary for their modules.
- Add new modules
- Finalizing BioJava 3.0
/** calculate HBond energy of two groups in cal/mol ...
* see Creighton page 147 f
*
* Jeffrey, George A., An introduction to hydrogen bonding, Oxford University Press, 1997.
* categorizes hbonds with donor-acceptor distances of
* 2.2-2.5 Å as "strong, mostly covalent",
* 2.5-3.2 Å as "moderate, mostly electrostatic",
* 3.2-4.0 Å as "weak, electrostatic".
* Energies are given as 40-14, 15-4, and <4 kcal/mol respectively.
*
*/
public double calculateHBondEnergy(AminoAcid one, AminoAcid two )
throws StructureException{
//System.out.println("calcHBondEnergy" + one + "|" + two);
Atom N = one.getN();
Atom H = one.getH();
Atom O = two.getO();
Atom C = two.getC();
double dno = Calc.getDistance(O,N);
double dhc = Calc.getDistance(C,H);
double dho = Calc.getDistance(O,H);
double dnc = Calc.getDistance(C,N);
double contact = MINDIST ;
// there seems to be a contact!
if ( (dno < contact) || (dhc < contact) || (dnc < contact) || (dno < contact)) {
//System.out.println("!!! contact " + one + " " + two);
return HBONDLOWENERGY ;
}
double e1 = Q / dho - Q / dhc ;
double e2 = Q / dnc - Q / dno ;
double energy = e1 + e2;
// bond too weak
if ( energy > HBONDHIGHENERGY)
return 0;
// test to avoid bond too strong
if ( energy > HBONDLOWENERGY)
return energy;
return HBONDLOWENERGY ;
}
Group a = groups[i]; Group b = groups[i+1]; // atom will be for group b. Atom H = calcSimpleH(a.getC(),b.getN(),b.getCA()); /** Calculates the H atom for group B (i+1) */ private static Atom calcSimpleH(Atom c,Atom o, Atom n) throws StructureException{ Atom h = Calc.substract(c,o);
double dist = Calc.getDistance(c,o);
//System.out.println(dist);
double x = n.getX() + h.getX() / dist;
double y = n.getY() + h.getY() / dist;
double z = n.getZ() + h.getZ() / dist;
h.setX(x);
h.setY(y);
h.setZ(z);
return h; }
Group a = groups[i]; Group b = groups[i+1]; Atom H = calc_H(a.getC(),b.getN(),b.getCA()); /** *
Calculates the H atom for group B (i+1)
*/ private static Atom calc_H(Atom C, Atom N, Atom CA) throws StructureException {
Atom nc = Calc.substract(N,C);
Atom nca = Calc.substract(N,CA);
Atom u_nc = Calc.unitVector(nc) ;
Atom u_nca = Calc.unitVector(nca);
Atom added = Calc.substract(u_nc,u_nca);
//
(According to Creighton the distance N-H is 1.03 +/- 0.02 Å.)
Atom U = Calc.unitVector(added);
Atom H = Calc.add(N,U);
return H; }