# Error when attempting to relax pdb, "flag_input_relax" not found

5 posts / 0 new
Error when attempting to relax pdb, "flag_input_relax" not found
#1

I am following the rosetta tutorials and run into an error when attempting to relax a pdb for refinement. The "flag_input_relax" file cannot be opened by rosetta, even though I've granted myself full permissions and even changed it into an executable via chmod 755. I made a copy of the file and it could not open the copy either. Below is the command that gives me the error:

rosetta/main/source/bin/relax.default.macosclangrelease -in:file:s ~/rosetta/main/demos/tutorials/input_and_output/input_files/from_rcsb/1qys.pdb flag_input_relax

and the error is

File: src/core/import_pose/import_pose.cc:362

[ ERROR ] UtilityExitException

ERROR: Cannot open file "flag_input_relax"

Please let me know what measures I can take to fix this .

Post Situation:
Mon, 2023-01-23 11:32
Wexter300

If you're using a flags file, you need to use an @ symbol before it, to tell Rosetta to treat it as an option file, rather than some other input file.

In your case, you're listing it after the -in:file:s option, which can take multiple structure input files. As such, Rosetta is probably thinking that file is a structure file (e.g. a PDB file), and is unable to properly open it. If you add an @ before it, then Rosetta will know it's not a parameter for the -in:file:s, but rather an option file instead.

The other thing which might be going on (on top of the issue above) is that the flag_input_relax file is not present in the running directory. Generally speaking, if you don't give an absolute path, Rosetta will look for files relative to the directory it's launched from.

You probably shouldn't need to change the permissions of the file. You certainly don't need execute permissons on an options file. If you can read the contents as your user account, and you're running Rosetta under your user account, then Rosetta should also be able to read the contents. (It's only if you're running Rosetta as a different user account that you may run into permissions issues.)

Mon, 2023-01-23 11:50
rmoretti

Tried adding the '@' symbol befroe flag_input_relax, received the same error. Im thinking it might be that flag_input_relax is not present in the running directory. I haven't messed with any of the files in the directory that it is present in. The tutorial i am running has the "flag_input_relax" file on the "inputs_and_outputs" directory, one above where the 1qys.pdb is located. I'm going to try to move the flag_input_relax to the same directory as the 1qys.pdb to see if that changes anything.

I didn't change permissions on the file, and I am running it from my user account.

EDIT:

Changing the location of flag_input_relax to the same directory as the pdb did not work. same error as usual.

Mon, 2023-01-23 12:18
Wexter300

What directory are you running the command from?

You're specifying the pdb file via an absolute path, so it doesn't matter where it's located, provided the path is correct.

The option file is a relative path (just the filename), which means that Rosetta will look for it based on the current running directory. (Which may or may not be the same directory as the pdb file is in.)

Either move the options file to the same directory you're running things in (such that it shows up if you do a ls just prior to launching Rosetta), or change your command line to refer to the options file with the full path.

~/rosetta/main/source/bin/relax.default.macosclangrelease -in:file:s ~/rosetta/main/demos/tutorials/input_and_output/input_files/from_rcsb/1qys.pdb @ ~/rosetta/main/demos/tutorials/input_and_output/input_files/from_rcsb/flag_input_relax 

(Note there needs to be a space between the @ and the ~ in order for the shell's home directory expansion to work properly.)

Mon, 2023-01-23 13:29
rmoretti

Your solution worked perfectly ! i think one of the issues with my code was the way i formatted it, i used a \ and then pressed return to break up the lines, im still a newbie. I also moved flag_input_relax to the same folder as 1qys.pdb, i don't know if that might've helped out as well.

Thanks !

Wed, 2023-01-25 12:34
Wexter300