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);
}
Aggregations