private void parseMolCXSMILES ( String title , IAtomContainer mol ) { CxSmilesState cxstate ; int pos ; if ( title != null && title . startsWith ( "|" ) ) { if ( ( pos = CxSmilesParser . processCx ( title , cxstate = new CxSmilesState ( ) ) ) >= 0 ) { // set the correct title mol . setTitle ( title . substring ( pos ) ) ; final Map < IAtom , IAtomContainer > atomToMol = Maps . newHashMapWithExpectedSize ( mol . getAtomCount ( ) ) ; final List < IAtom > atoms = new ArrayList <> ( mol . getAtomCount ( ) ) ; for ( IAtom atom : mol . atoms ( ) ) { atoms . add ( atom ) ; atomToMol . put ( atom , mol ) ; } assignCxSmilesInfo ( mol . getBuilder ( ) , mol , atoms , atomToMol , cxstate ) ; } } }
Parses CXSMILES layer and set attributes for atoms and bonds on the provided molecule .