public class Mutator
extends java.lang.Object
String filename = "/Users/ap3/WORK/PDB/5pti.pdb" ; String outputfile = "/Users/ap3/WORK/PDB/mutated.pdb" ; PDBFileReader pdbreader = new PDBFileReader(); try{ Structure struc = pdbreader.getStructure(filename); System.out.println(struc); String chainId = " "; String pdbResnum = "3"; String newType = "ARG"; // mutate the original structure and create a new one. Mutator m = new Mutator(); Structure newstruc = m.mutate(struc,chainId,pdbResnum,newType); FileOutputStream out= new FileOutputStream(outputfile); PrintStream p = new PrintStream( out ); p.println (newstruc.toPDB()); p.close(); } catch (Exception e) { e.printStackTrace(); }
Constructor and Description |
---|
Mutator() |
Modifier and Type | Method and Description |
---|---|
Structure |
mutate(Structure struc,
java.lang.String chainId,
java.lang.String pdbResnum,
java.lang.String newType)
creates a new structure which is identical with the original one.
|
AminoAcid |
mutateResidue(AminoAcid oldAmino,
java.lang.String newType)
create a new residue which is of the new type.
|
public Structure mutate(Structure struc, java.lang.String chainId, java.lang.String pdbResnum, java.lang.String newType) throws PDBParseException
struc
- the structure object that is the container for the residue to be mutatedchainId
- the id (name) of the chain to be mutated. @see Chain.getName()pdbResnum
- the PDB residue number of the residuenewType
- the new residue type (3 characters)PDBParseException
public AminoAcid mutateResidue(AminoAcid oldAmino, java.lang.String newType) throws PDBParseException
oldAmino
- newType
- PDBParseException