private Map < String , String > loadHydrogenDefinitions ( InputStream hdefIn ) throws IOException { // maps of symbolic atom types to hydrogen atom types and internal types final Map < String , String > hdefs = new HashMap < String , String > ( 200 ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( hdefIn ) ) ; br . readLine ( ) ; // header String line = null ; while ( ( line = br . readLine ( ) ) != null ) { String [ ] cols = line . split ( "\t" ) ; hdefs . put ( cols [ 0 ] . trim ( ) , cols [ 3 ] . trim ( ) ) ; } // these associations list hydrogens that are not listed in MMFFSYMB.PAR but present in MMFFHDEF.PAR // N=O HNO, NO2 HNO2, F HX, I HX, ONO2 HON, BR HX, ON=O HON, CL HX, SNO HSNO, and OC=S HOCS return hdefs ; }
Hydrogen atom types are assigned based on their parent types . The mmff - symb - mapping file provides this mapping .