private static double getRadiusForAmino ( AminoAcid amino , Atom atom ) { if ( atom . getElement ( ) . equals ( Element . H ) ) return Element . H . getVDWRadius ( ) ; // some unusual entries (e.g. 1tes) contain Deuterium atoms in standard aminoacids if ( atom . getElement ( ) . equals ( Element . D ) ) return Element . D . getVDWRadius ( ) ; String atomCode = atom . getName ( ) ; char aa = amino . getAminoType ( ) ; // here we use the values that Chothia gives in his paper (as NACCESS does) if ( atom . getElement ( ) == Element . O ) { return OXIGEN_VDW ; } else if ( atom . getElement ( ) == Element . S ) { return SULFUR_VDW ; } else if ( atom . getElement ( ) == Element . N ) { if ( atomCode . equals ( "NZ" ) ) return TETRAHEDRAL_NITROGEN_VDW ; // tetrahedral Nitrogen return TRIGONAL_NITROGEN_VDW ; // trigonal Nitrogen } else if ( atom . getElement ( ) == Element . C ) { // it must be a carbon if ( atomCode . equals ( "C" ) || atomCode . equals ( "CE1" ) || atomCode . equals ( "CE2" ) || atomCode . equals ( "CE3" ) || atomCode . equals ( "CH2" ) || atomCode . equals ( "CZ" ) || atomCode . equals ( "CZ2" ) || atomCode . equals ( "CZ3" ) ) { return TRIGONAL_CARBON_VDW ; // trigonal Carbon } else if ( atomCode . equals ( "CA" ) || atomCode . equals ( "CB" ) || atomCode . equals ( "CE" ) || atomCode . equals ( "CG1" ) || atomCode . equals ( "CG2" ) ) { return TETRAHEDRAL_CARBON_VDW ; // tetrahedral Carbon } // the rest of the cases (CD, CD1, CD2, CG) depend on amino acid else { switch ( aa ) { case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : return TRIGONAL_CARBON_VDW ; case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : return TETRAHEDRAL_CARBON_VDW ; case ' ' : case ' ' : if ( atomCode . equals ( "CD" ) ) return TRIGONAL_CARBON_VDW ; else if ( atomCode . equals ( "CG" ) ) return TETRAHEDRAL_CARBON_VDW ; default : logger . info ( "Unexpected carbon atom " + atomCode + " for aminoacid " + aa + ", assigning its standard vdw radius" ) ; return Element . C . getVDWRadius ( ) ; } } // not any of the expected atoms } else { // non standard aas, (e.g. MSE, LLP) will always have this problem, logger . info ( "Unexpected atom " + atomCode + " for aminoacid " + aa + " (" + amino . getPDBName ( ) + "), assigning its standard vdw radius" ) ; return atom . getElement ( ) . getVDWRadius ( ) ; } }
Gets the radius for given amino acid and atom