From: Martin E. <mar...@fa...> - 2005-08-10 04:12:01
|
Hi, > how can I create (no 3D coords, just connectivity) create protein from > scratch, with say two strands? Let's assume that I'm not doing anything other > than connecting a few amino acids... Say, GAGA and VAVA... > > It needs to start with something like: > > # setup AA templates > SetOfMolecules aminoAcids = cdk.templates.AminoAcids.createAAs(); > # create a protein > BioPolymer protein = new BioPolymer(); > # But then? > Strand = new Strand(); # strand 1 > # There does not some a addMonomer(), so a loop over all atoms and bonds? Yup, unfortunately this is the way it has to be done at the moment: // Setup AA templates SetOfMolecules aminoAcids = AminoAcids.createAAs(); // Create protein BioPolymer protein = new BioPolymer(); // Create strand Strand strand = new Strand(); // Strand needs a name strand.setStrandName(String.valueOf("A")); // Loop over the AAs you want to add for(int j = 0; j <= 1; j++) { // Create monomer Monomer monomer = new Monomer(); // Monomer needs a name and a type monomer.setMonomerName((String)aminoAcids.getMolecule(j).getProperty("molecule_name") + j); monomer.setMonomerType((String)aminoAcids.getMolecule(j).getProperty("molecule_name")); // Loop over atoms for(int i = 0; i < aminoAcids.getMolecule(j).getAtomCount(); i++) { protein.addAtom(aminoAcids.getMolecule(j).getAtomAt(i), monomer, strand); } // Loop over bonds for(int i = 0; i < aminoAcids.getMolecule(j).getBondCount(); i++) { protein.addBond(aminoAcids.getMolecule(j).getBondAt(i)); } Then after this comes the problem of connecting the two residues to each other (please see the createBonds method in the PDBReader class for details how that can be done when looping over residues. > Questions: > - would it be easier of AminoAcids would return Monomers? Yeah, I think that's a good idea. > - and to add some helper methods like AminoAcids.getByShortID("G") and > AminoAcids.getByID("Gly")? Yup, that would definitely be good. > - should Strand/BioPolymer get a method addMonomer(Monomer) ? I remember thinking about this when I added the Strand class and made my changes to the PDBReader. However, I decided not to implement such a method for reasons that seem very obscure to me now (I think it had something to do with the way it was designed before I made my changes). > > Suggestions? I think the modifications you suggest seem very reasonable. I can make those changes as soon as possible. Cheers! Martin. -- ======================================== Martin Eklund PhD Student Department of Pharmaceutical Biosciences Uppsala University, Sweden Ph: +46-18-4714281 ======================================== |