@Override public String toPDB() { return FileConvert.toPDB(this); }
@Override public String toPDB() { return FileConvert.toPDB(this); }
@Override public void toPDB(StringBuffer buf) { FileConvert.toPDB(this,buf); }
/** Prints the content of an Atom object as a PDB formatted line. * * @param a * @return */ public static String toPDB(Atom a){ StringBuffer w = new StringBuffer(); toPDB(a,w); return w.toString(); }
public static String toPDB(Atom a, String chainId) { StringBuffer w = new StringBuffer(); toPDB(a,w, chainId); return w.toString(); }
/** * Convert a Group object to PDB representation * * @param g * @return */ public static String toPDB(Group g){ StringBuffer w = new StringBuffer(); toPDB(g,w); return w.toString(); }
/** {@inheritDoc} */ @Override public String toPDB() { FileConvert f = new FileConvert(this) ; return f.toPDB(); }
/** * Convert a Chain object to PDB representation * * @param chain * @return */ public static String toPDB(Chain chain){ StringBuffer w = new StringBuffer(); int nrGroups = chain.getAtomLength(); for ( int h=0; h<nrGroups;h++){ Group g= chain.getAtomGroup(h); toPDB(g,w); } return w.toString(); }
private static void toPDB(Group g, StringBuffer str) { // iterate over all atoms ... // format output ... int groupsize = g.size(); for ( int atompos = 0 ; atompos < groupsize; atompos++) { Atom a = null ; a = g.getAtom(atompos); if ( a == null) continue ; toPDB(a, str); //line = record + serial + " " + fullname +altLoc //+ leftResName + " " + chainID + resseq //+ " " + x+y+z //+ occupancy + tempfactor; //str.append(line + newline); //System.out.println(line); } if ( g.hasAltLoc()){ for (Group alt : g.getAltLocs() ) { toPDB(alt,str); } } }
public static void toPDB(Atom a, StringBuffer str) { toPDB(a,str,a.getGroup().getChain().getName()); }