public static void hybridize ( HELM2Notation helm2notation ) throws NotationException , RNAUtilsException , HELM2HandledException , org . helm . notation2 . exception . NotationException , ChemistryException { if ( HELM2NotationUtils . getAllBasePairConnections ( helm2notation . getListOfConnections ( ) ) . isEmpty ( ) && HELM2NotationUtils . getRNAPolymers ( helm2notation . getListOfPolymers ( ) ) . size ( ) == 2 ) { List < ConnectionNotation > connections = RNAUtils . hybridize ( HELM2NotationUtils . getRNAPolymers ( helm2notation . getListOfPolymers ( ) ) . get ( 0 ) , HELM2NotationUtils . getRNAPolymers ( helm2notation . getListOfPolymers ( ) ) . get ( 1 ) ) ; for ( ConnectionNotation connection : connections ) { addConnection ( connection , helm2notation . getListOfConnections ( ) . size ( ) , helm2notation ) ; } } }
this method will automatically add base pair info into notation only if it contains two RNA polymer notations and there is no base pairing info