code: public static final String getPdbInfo(Atom a, boolean printResName){
  		String aa3 = "";
  
  		String chain1 ="";
  		String res1 = "";
  
  		if ( a != null){
  			Group g1 = a.getGroup();
  			if ( g1 != null){
  				aa3 = g1.getPDBName();
  				res1 = g1.getResidueNumber().toString();
  				Chain ch1 = g1.getChain();
  				if (ch1 != null)
  					chain1 = ch1.getId();
  			}
  		}
  
  		StringBuffer buf = new StringBuffer();
  		if ( printResName) {
  			if ( !aa3.equals("")){
  				buf.append("[");
  				buf.append(aa3);
  				buf.append("]");
  			}
  		}
  		if ( ! res1.equals("")) {
  
  			// let's check if there is an insertion code...
  			Matcher matcher = inscodePatter.matcher(res1);
  
  			boolean found = matcher.find();
  			if ( ! found) {
  				System.err.println("JmolTools: could not parse the residue number string " + res1);
  				buf.append(res1);
  			} else {
  				String residueNumber = matcher.group(1);
  				String insCode = matcher.group(2);
  				buf.append(residueNumber);
  				if ( insCode != null && ! ( insCode.equals(""))) {
  					buf.append("^");
  					buf.append(insCode);
  				}
  			}
  
  		}
  
  
  
  
  		if ( ! chain1.equals("")){
  			buf.append(":");
  			buf.append(chain1);
  		}
  		return buf.toString();
  	}
docs: TODO: move this to AtomInfo class