private Group getNewGroup ( String recordName , Character aminoCode1 , String aminoCode3 ) { Group g = ChemCompGroupFactory . getGroupFromChemCompDictionary ( aminoCode3 ) ; if ( g != null && ! g . getChemComp ( ) . isEmpty ( ) ) return g ; Group group ; if ( aminoCode1 == null || StructureTools . UNKNOWN_GROUP_LABEL == aminoCode1 ) { group = new HetatomImpl ( ) ; } else if ( StructureTools . isNucleotide ( aminoCode3 ) ) { // it is a nucleotide NucleotideImpl nu = new NucleotideImpl ( ) ; group = nu ; } else { AminoAcidImpl aa = new AminoAcidImpl ( ) ; aa . setAminoType ( aminoCode1 ) ; group = aa ; } // System.out.println("new resNum type: "+ resNum.getType() ); return group ; }
initiate new resNum either Hetatom Nucleotide or AminoAcid