public Point3d [ ] get3DCoordinatesForSP2Ligands ( IAtom refAtom , IAtomContainer noCoords , IAtomContainer withCoords , IAtom atomC , double length , double angle ) { //logger.debug(" SP2 Ligands start"); Point3d newPoints [ ] = new Point3d [ 1 ] ; if ( angle < 0 ) { angle = SP2_ANGLE ; } if ( withCoords . getAtomCount ( ) >= 2 ) { //logger.debug("Wanted:1 "+noCoords.getAtomCount()); newPoints [ 0 ] = calculate3DCoordinatesSP2_1 ( refAtom . getPoint3d ( ) , ( withCoords . getAtom ( 0 ) ) . getPoint3d ( ) , ( withCoords . getAtom ( 1 ) ) . getPoint3d ( ) , length , - 1 * angle ) ; } else if ( withCoords . getAtomCount ( ) <= 1 ) { //logger.debug("NoCoords 2:"+noCoords.getAtomCount()); newPoints = calculate3DCoordinatesSP2_2 ( refAtom . getPoint3d ( ) , ( withCoords . getAtom ( 0 ) ) . getPoint3d ( ) , ( atomC != null ) ? atomC . getPoint3d ( ) : null , length , angle ) ; } //logger.debug("Ready SP2"); return newPoints ; }
Main method for the calculation of the ligand coordinates for sp2 atoms . Decides if one or two coordinates should be created