What does rosetta do with the p-ser now? Crash out on unrecognized residue, throw out the P and O atoms…?
If you look at rosetta_database/chemical/residue_type_sets/fa_standard/patches.txt, you’ll see the patch is enabled by default (not commented out). This means Rosetta ought to be able to recognize it automatically. Try playing with the atom and residue names in your phosphoserines in the PDB file to make them match what Rosetta expects. It looks like the atom names are ” P “, ” O1P”, etc, as in the patch file, and the expected 3 letter name is still SER. Read the patch and params file to play around with it.
If that fails, the function to add patches is probably
void
remove_variant_type_from_pose_residue(
pose::Pose & pose,
VariantType const & variant_type,
Size const seqpos
);
in src/core/chemical/util.*