public List < HELM2Notation > decompose ( HELM2Notation helm2notation ) { List < HELM2Notation > list = new ArrayList < HELM2Notation > ( ) ; List < ConnectionNotation > allselfConnections = getAllSelfCycleConnections ( helm2notation . getListOfConnections ( ) ) ; for ( PolymerNotation polymer : helm2notation . getListOfPolymers ( ) ) { HELM2Notation single = new HELM2Notation ( ) ; single . addPolymer ( polymer ) ; List < ConnectionNotation > selfConnections = getSelfCycleConnections ( polymer . getPolymerID ( ) . getId ( ) , allselfConnections ) ; for ( ConnectionNotation selfConnection : selfConnections ) { single . addConnection ( selfConnection ) ; } list . add ( single ) ; } return list ; }
decompose the HELM2 into smaller HELM2 objects