Search in sources :

Example 1 with Mutation

use of ffx.potential.parsers.PDBFilter.Mutation in project ffx by mjschnie.

the class TitrationUtils method openFullyProtonated.

public static MolecularAssembly openFullyProtonated(File structure) {
    String name = format("%s-prot", FilenameUtils.removeExtension(structure.getName()));
    MolecularAssembly mola = new MolecularAssembly(name);
    mola.setFile(structure);
    List<Mutation> mutations = new ArrayList<>();
    List<Residue> residues = mola.getResidueList();
    for (Residue res : residues) {
        char chain = res.getChainID();
        int resID = res.getResidueNumber();
        Titration titration = Titration.lookup(res);
        if (res.getAminoAcid3() != titration.protForm) {
            String protName = titration.protForm.name();
            mutations.add(new PDBFilter.Mutation(chain, resID, protName));
        }
    }
    PotentialsUtils utils = new PotentialsUtils();
    return utils.openWithMutations(structure, mutations);
}
Also used : ArrayList(java.util.ArrayList) Mutation(ffx.potential.parsers.PDBFilter.Mutation) MolecularAssembly(ffx.potential.MolecularAssembly) MultiResidue(ffx.potential.bonded.MultiResidue) Residue(ffx.potential.bonded.Residue) Mutation(ffx.potential.parsers.PDBFilter.Mutation) PDBFilter(ffx.potential.parsers.PDBFilter) PotentialsUtils(ffx.potential.utils.PotentialsUtils)

Aggregations

MolecularAssembly (ffx.potential.MolecularAssembly)1 MultiResidue (ffx.potential.bonded.MultiResidue)1 Residue (ffx.potential.bonded.Residue)1 PDBFilter (ffx.potential.parsers.PDBFilter)1 Mutation (ffx.potential.parsers.PDBFilter.Mutation)1 PotentialsUtils (ffx.potential.utils.PotentialsUtils)1 ArrayList (java.util.ArrayList)1