You are here

Syntax to build a silent file

9 posts / 0 new
Last post
Syntax to build a silent file
#1

Dear friends,
Can I ask the syntax to build a silent file?

1) My purpose is to create a silent file based on all the PDB files in /mnt/hgfs/Downloads/

I am trying:

~/Cheng/rosetta_2014.30.57114_bundle/main/source/bin/score.linuxgccrelease -database ~/Cheng/rosetta_2014.30.57114_bundle/main/database -in:file:s *.pdb /mnt/hgfs/Downloads -out:file:silent /mnt/hgfs/Downloads

After several prompts, I got the error of

ERROR: Could not make /mnt/hgfs/Downloads
ERROR: Exit from: src/core/io/silent/SilentFileData.cc line:386
Error: Must call shutdown() when finished using job distributor!
caught exception
[ERROR] EXCN_utility_exit has been thrown from: src/core/io/silent/SilentFileData.cc line: 386
ERROR: Could not make /mnt/hgfs/Downloads

Can I ask how to solve this?
(I think my PDB file is of full atoms and consecutive numbering)

2) If I want to only include PDB files listed in a text file, I tried:
~/Cheng/rosetta_2014.30.57114_bundle/main/source/bin/score.linuxgccrelease -database ~/Cheng/rosetta_2014.30.57114_bundle/main/database -in:file:l /mnt/hgfs/Downloads/list_of_pdbs.txt -out:file:silent /mnt/hgfs/Downloads/silent.out

This seems to work fine for me. However, what I got is not a binary file (attached). Instead, readable coordinates exist in that file. Did I do correctly? Should I use "silent.out" as the output file?

3) I am trying to follow
https://www.rosettacommons.org/manuals/archive/rosetta3.1_user_guide/app...
I really like that format of explicitly demonstrating the usage of options. However, when it comes to the newest version,

e.g.
https://www.rosettacommons.org/manuals/archive/rosetta_2014.35.57232_use...

I am confused about how to use it properly. Is there an instruction about how to read that? Thank you.

(I also could not find good examples to make a silent file at https://www.rosettacommons.org/docs/latest/score-commands.html)

Yours sincerely
Cheng

AttachmentSize
silent.out_.txt49.26 KB
Post Situation: 
Fri, 2014-09-26 09:13
lanselibai

1) -out:file:silent expects a filename, so if you give it an existing directory name, it will complain it can't make a file named "/mnt/hgfs/Downloads", because there's already a directory of that name.

2) What you've attached is a "protein" silent file. If you want a binary format silent file, simply add "-out:file:silent_struct_type binary" to your commandline. You can use whatever filename you want, although .out is the traditional extension. (Rosetta doesn't care what the extension is, though, for either reading or writing.)

3) In new versions, we've split apart the user documentation and the code documentation. https://www.rosettacommons.org/manuals/archive/rosetta_2014.35.57232_use... is the code documentation, for people who want to program with Rosetta. User documentation is at https://www.rosettacommons.org/docs/latest/

I see your point with the commandline examples. There isn't much change with the new "score_jd2" application:

~/Cheng/rosetta_2014.30.57114_bundle/main/source/bin/score_jd2.linuxgccrelease -database ~/Cheng/rosetta_2014.30.57114_bundle/main/database -in:file:l /mnt/hgfs/Downloads/list_of_pdbs.txt -out:file:silent /mnt/hgfs/Downloads/silent.out -out:file:silent_struct_type binary

should convert the PDBs listed in list_of_pdbs.txt into a binary silent struct file.

Fri, 2014-09-26 10:47
rmoretti

Hi R Moretti,
Thank you for your help.

1) To include all the PDB files in the directory, as you said, I tried:

~/Cheng/rosetta_2014.30.57114_bundle/main/source/bin/score.linuxgccrelease -database ~/Cheng/rosetta_2014.30.57114_bundle/main/database -in:file:s *.pdb /mnt/hgfs/Downloads -out:file:silent /mnt/hgfs/Downloads/silent.out

After several prompts, I got error message:

ERROR: !pdb.empty()
ERROR:: Exit from: src/core/io/pdb/pdb_dynamic_reader.cc line: 110
Error: Must call shutdown() when finished using job distributor!
caught exception

[ERROR] EXCN_utility_exit has been thrown from: src/core/io/pdb/pdb_dynamic_reader.cc line: 110
ERROR: !pdb.empty()

The attachment is the protein PDB file, which is of full atoms and consecutive numbering. Do you know the reason for error?

2) To only include PDB files listed in a text file, as you said, it works fine now as I tried

~/Cheng/rosetta_2014.30.57114_bundle/main/source/bin/score.linuxgccrelease -database ~/Cheng/rosetta_2014.30.57114_bundle/main/database -in:file:l /mnt/hgfs/Downloads/list_of_pdbs.txt -out:file:silent /mnt/hgfs/Downloads/silent.out -out:file:silent_struct_type binary

The reason I want to make it binary is because the Rosetta can access multiple PDB files more efficiently (e.g. for cluster). Am I correct?

3) You used "score_jd2" instead of "score". Is there a brief summary for the score function application scope?

score_aln2.default.linuxgccrelease
score_aln2.linuxgccrelease
score_aln.default.linuxgccrelease
score_aln.linuxgccrelease
score.default.linuxgccrelease
score_jd2.default.linuxgccrelease
score_jd2.linuxgccrelease
score.linuxgccrelease

Thank you very much.

Yours sincerely
Cheng

File attachments: 
Fri, 2014-09-26 12:43
lanselibai

1) You're using a wildcard for your input PDBs - I suspect that there's another file in the directory with the ending .pdb that Rosetta thinks is empty. At the beginning of the run Rosetta prints what it thinks the commandline is - what files are listed after the -s?

2) I don't know if access is more efficient (I actually never seen a benchmark of such things), but storage certainly is. Not only in total size, but it's much easier to work with one file containing 10,000 structures than to work with 10,000 separate PDBs.

3) "JD2" or "Job Distributor 2" is the "new" (4+ years old at this point) unified input/output/running scheme for Rosetta. It allows Rosetta protocols to have a unified interface for specifying how to input files, how to output files, and some of the basic parameters for running. "score_jd2" is the JD2-enabled version of the scoring application. Plain "score" is the older, pre-jd2 method, so some of the options it uses to control input and output are idiosyncratic (e.g. like "-out:output" to get PDB output, rather than "-out:pdb").

score_aln and score_aln2 are not related to score/score_jd2 at all, but are instead used for scoring sequence alignments in the comparative modeling protocol.

The differences in endings (".linuxgccrelease" versus ".default.linuxgccrelease") is how Rosetta keeps track of different compilation methods. ".linuxgccrelease" means that it's the release-optimized mode (as opposed to debugging-mode) compilation of Rosetta, done with the gcc compiler on a linux platform. This allows you to keep both release mode and debug mode (as well as mac, linux, gcc, clang, icc, etc.) compilations in the same directory, assuming you have a workflow that calls for having multiple versions.

The ".default." specifies the "extras" build, which compiles in support for additional things. For example, there's ".mpi." for MPI enabled builds, ".static." for static (single file) compilation, and ".mysql." for MySQL database support. If you don't have need of these extra features, you don't have to worry about them. That's why there's also a name without that middle part, which is the same as the last version compiled. (So in your case both score_jd2.linuxgccrelease and score_jd2.default.linuxgccrelease point to exactly the same application.)

Fri, 2014-09-26 13:38
rmoretti

Hi R Moretti,
Thank you for your help.

1) I tried to create a new folder with a PDB file inside. But it still remained the same problem. But anyway, I think it would be fine as long as I can use the "-in:file:l" flag.

2) I got that.

3) If I understand correctly, I would always use "score_jd2". I would also use "linuxgccrelease" if no special features are required.

Yours sincerely
Cheng

Fri, 2014-09-26 14:34
lanselibai

1) Rosetta will never create a directory if it doesn't exist. You should always make any new directories externally prior to running Rosetta.

3) If you want to use the score_jd2 application (which is what is recommended if you want to do scoring), the "score_jd2" will always be present. On your machine, with your compile, either "score_jd2.linuxgccrelease" or "score_jd2.default.linuxgccrelease" will be the full name. Use whichever you prefer.

Fri, 2014-09-26 15:57
rmoretti

Hi R Moretti,
Thank you.

1) What I mean is, I manually created a new directory and put a PDB file into it before running the Rosetta. During the running of Rosetta, the use of wildcard (i.e. *.pdb) still encountered the same problem. But it is fine for me as I can use "-in:file:l" flag.

3) Thank you. I got that.

Yours sincerely
Cheng

Sat, 2014-09-27 09:15
lanselibai

Looking at it again, I think it might be your syntax:

"-in:file:s *.pdb /mnt/hgfs/Downloads" passes the names of all the files in the current directory named like "*.pdb" and the literal string '/mnt/hgfs/Downloads' to the -in:file:s option. If instead you wanted all the files named like "*.pdb" in the /mnt/hgfs/Downloads directory, use the syntax " /mnt/hgfs/Downloads/*.pdb"

One thing to keep in mind with Unix is that it's the shell which does the wildcard expansion. Rosetta (normally) never sees the asterisk. It's the Unix shell which interprets the "*.pdb" and then automatically replaces it on the commandline with all the filenames which match the pattern. So Rosetta is actually expecting a list of filenames to be passed to the -in:file:s option.

Mon, 2014-09-29 12:42
rmoretti

Hi R Moretti,
Wow, that really works! After using the following:

~/Cheng/rosetta_2014.30.57114_bundle/main/source/bin/score.linuxgccrelease -database ~/Cheng/rosetta_2014.30.57114_bundle/main/database -in:file:s /mnt/hgfs/Downloads/*.pdb -out:file:silent /mnt/hgfs/Downloads/out

it succeeded now.

Now I even do not need a list file to contain the PDB file directories.

Thank you very much.

Yours sincerely
Cheng

Tue, 2014-09-30 03:45
lanselibai