g = new HetatomImpl();
/** initiate new resNum, either Hetatom, Nucleotide, or AminoAcid */ 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 ; }
break; default: group = new HetatomImpl(); break;
/** returns and identical copy of this Group object . * @return and identical copy of this Group object */ @Override public Object clone() { HetatomImpl n = new HetatomImpl(); n.setPDBFlag(has3D()); n.setResidueNumber(residueNumber); n.setPDBName(getPDBName()); //clone atoms and bonds. cloneAtomsAndBonds(n); // copying the alt loc groups if present, otherwise they stay null if (altLocs!=null) { for (Group altLocGroup:this.altLocs) { Group nAltLocGroup = (Group)altLocGroup.clone(); n.addAltLoc(nAltLocGroup); } } if (chemComp!=null) n.setChemComp(chemComp); return n; }
HetatomImpl h = new HetatomImpl(); g = h;
HetatomImpl h = new HetatomImpl(); h.setId(seq_id); group = h; group = aa ; } else { HetatomImpl h = new HetatomImpl(); h.setId(seq_id); group = h;