Dear all,
I am new to rosetta and trying to record the information in the process of AbinioRelax followed by analysis. In this case,it's necessary to output plenty of decoys generated after fragment assembly.However,I can't output these decoys to just one file.Using the function "pose.dump_pdb()",I can output them to mutiple .pdb files,which is not convenient and take too much time.
I found there is a way to figure out this problem:using silent file.Could anyone tell me how to output decoys to one silent file with detailed procedures?It is better if anyone can prvide relevant C++ source code or other methods to this problem.I very appreciate any help and advise.
Thank you.
Category:
Post Situation:
Writing to a silent file is a little involved, you can take a look at src/protocols/jd2/SilentFileJobOutputter.cc for an example of how the main silent file output works. It's probably a little hard to follow, as it's written to be part of the IO framework.
It basically boils down to the following (caution, not tested):
The indirection of SilentStruct/SilentFileData is because there's flexibility in different silent struct types, as well as writing multiple silent structs at once. If you're curious, take a look at the SilentFileData/SilentStruct/SilentFileOptions definitions for additional functions/methods that might be useful.
Following your guidance,I have successfully achieve the function of outputting multiple conformations to one silent file with following source codes:
Then,I got a binarry silent file uploaded at the bottom.
Now,I'm tryiing to get this set of conformations' ContactMap matrix in the file through contactMap protocol,with the follwing command:
~$ /home/miss77/rosetta_bin_linux_2016.32.58837_bundle/main/source/bin/contactMap.linuxgccdebug -in:file:silent filename.out
There''re many warnings occured that i can't understand:
core.io.silent: [ WARNING ] Number of atoms in pose and silent file disagree! Attempting to continue ...
core.io.silent: [ WARNING ] (in residue MET:NtermProteinFull at 1 natoms_pose=19atm_seqpos 1 natoms_struct=7)
core.io.silent: [ WARNING ] Number of atoms in pose and silent file disagree! Attempting to continue ...
core.io.silent: [ WARNING ] (in residue ASP at 2 natoms_pose=12atm_seqpos 2 natoms_struct=7)
......
I dont konow whether warnings above effect the final result and how to avoid these warnings.
I found these warnings's relavant source codes in .../rosetta_bin_linux_2016.32.58837_bundle/main/source/src/core/io/silent/BinarySilentStruct.cc:
There probably were some mistake when the silent file was constructed.
Thanks for your reply.
Those warnings - particularly if they're for all the residudes in the structures, indicate a fullatom/centroid mismatch.
Were the structures you saved intended to be fullatom or centroid structures? From the warning message, it looks like you have centroid structures in your silent file. The issue is that it looks like the application is expecting fullatom structures, and is getting slightly confused when it only gets the coordinates for the centroid structures.
If you intended to output centroid structures, you need to tell contactMap that you're providing centroid structures - try using the option `-in:file:centroid` (If you wanted to tell Rosetta to expect fullatom structures in the silent file, it would be `-in:file:fullatom`, but that's normally - but not always - the default assumption.)
If you weren't expecting to produce centroid structures in the silent file, you need to examine your saving proceedure. First check that the pose is indeed a fullatom pose at the point you're saving it. In case it is, you might want to fiddle with the silent file parameters, setting `-out:file:fullatom`, or the equivalent in the SilentFileOptions object.