nrbennet / dl_binder_design

MIT License
223 stars 54 forks source link

-checkpoint_path #3

Closed gha2012 closed 1 year ago

gha2012 commented 1 year ago

Hi, I followed the instructions and get the following error: dl_interface_design.py: error: the following arguments are required: -checkpoint_path What should I do? Thank you!

SkwisgaarSkwigelf commented 1 year ago

If I understand correctly, I think -checkpoint_path should point to the ProteinMPNN model weights (/path/to/dl_binder_design/mpnn_fr/ProteinMPNN/vanilla_model_weights/), however it's not specified in the README.

I'm also having a separate issue running dl_interface_design.py. For me it starts to run, but dies at this line:

objs = protocols.rosetta_scripts.XmlObjects.create_from_file( xml )

I get an error saying my XML has failed validation and that the failure occurred before the XML script was examined. It's quite a long error message, but it looks like the XML parser is not finding the file:

/path/to/anaconda3/envs/dl_binder_design/lib/python3.9/site-packages/pyrosetta/database/sampling/vall.jul19.2011.gz

I'm also not seeing the vall.jul19.2011.gz file in my pyrosetta database sampling directory. Within that directory, I have:

filtered.vall.dat.2006-05-05.gz  
small.vall.gz  
vall.dat.2001-02-02.torsions.gz  
vall.jul19.2011.torsions.gz

I'm admittedly not great with rosetta XML files, any ideas on why the RosettaFastRelaxUtil.xml is failing XML validation?

(btw I also changed the <SSPrediction (line 168) in the xml file to point to my local install of runpsipred_single.)

nrbennet commented 1 year ago

Thank you for bringing this to my attention. I have added checkpoint_path to the example command in the README.

I will look into why your XML is failing and see if I can make you a fix.

nrbennet commented 1 year ago

@SkwisgaarSkwigelf can you send me the error message you are getting?

SkwisgaarSkwigelf commented 1 year ago

Command python dl_interface_design.py -silent /path/to/RFdiffusion/my_proteins.silent -checkpoint_path /path/to/RFdiffusion/dl_binder_design/mpnn_fr/ProteinMPNN/vanilla_model_weights/v_48_020.pt

Output

PyRosetta-4 2023 [Rosetta PyRosetta4.conda.linux.cxx11thread.serialization.CentOS.python39.Release 2023.13+release.5e95ffc8e46bc4eb340cba29c1e64afc0d7891ee 2023-03-28T15:22:55] retrieved from: http://www.pyrosetta.org
(C) Copyright Rosetta Commons Member Institutions. Created in JHU by Sergey Lyskov and PyRosetta Team.

[ WARNING ] Parameter /path/to/anaconda3/envs/dl_binder_design/lib/python3.9/site-packages/pyrosetta/database contains non-ASCII values.

core.init: Checking for fconfig files in pwd and ./rosetta/flags
core.init: Rosetta version: PyRosetta4.conda.linux.cxx11thread.serialization.CentOS.python39.Release r344 2023.13+release.5e95ffc 5e95ffc8e46bc4eb340cba29c1e64afc0d7891ee http://www.pyrosetta.org 2023-03-28T15:22:55
core.init: command: PyRosetta -beta_nov16 -in:file:silent_struct_type binary -database /path/to/anaconda3/envs/dl_binder_design/lib/python3.9/site-packages/pyrosetta/database
basic.random.init_random_generator: 'RNG device' seed mode, using '/dev/urandom', seed=1259072232 seed_offset=0 real_seed=1259072232 thread_index=0
basic.random.init_random_generator: RandomGenerator:init: Normal mode, seed=1259072232 RG_type=mt19937
protocols.rosetta_scripts.RosettaScriptsParser: Validating input script...
protocols.rosetta_scripts.RosettaScriptsSchemaValidator: Generating XML Schema for rosetta_scripts...
protocols.rosetta_scripts.RosettaScriptsSchemaValidator: ...done
protocols.rosetta_scripts.RosettaScriptsSchemaValidator: Initializing schema validator...
protocols.rosetta_scripts.RosettaScriptsSchemaValidator: ...done
protocols.rosetta_scripts.XmlObjects:

File: /home/benchmark/rosetta/source/src/protocols/rosetta_scripts/RosettaScriptsParser.cc:1208
Input rosetta scripts XML file "/path/to/RFdiffusion/dl_binder_design/mpnn_fr/RosettaFastRelaxUtil.xml" failed to validate against the rosetta scripts schema. Use the option -parser::output_schema <output filename> to output the schema to a file to see all valid options.
Your XML has failed validation.  The error message below will tell you where in your XML file the error occurred.  Here's how to fix it:

1) If the validation fails on something obvious, like an illegal attribute due to a spelling error (perhaps you used scorefnction instead of scorefunction), then you need to fix your XML file.
2) If you haven't run the XML rewriter script and this might be pre-2017 Rosetta XML, run the rewriter script (tools/xsd_xrw/rewrite_rosetta_script.py) on your input XML first.  The attribute values not being in quotes (scorefunction=talaris2014 instead of scorefunction="talaris2014") is a good indicator that this is your problem.
3) If you are a developer and neither 1 nor 2 worked - email the developer's mailing list or try Slack.
4) If you are an academic or commercial user - try the Rosetta Forums https://www.rosettacommons.org/forum

File: /home/benchmark/rosetta/source/src/protocols/rosetta_scripts/RosettaScriptsSchemaValidator.cc:89
If you are seeing this message, the internally-generated XML Schema for rosetta_scripts could not be properly generated
This failure occurred before your XML script that provided was examined. The error has been compiled into Rosetta and will need to be fixed by a developer.Global schema validation error:  read the error message(s) below and fix your schema in the C++ code.

Errors: Error: invalid character in attribute value

35238:  <xs:attribute name="psipred" type="xs:string">
35239:   <xs:annotation><xs:documentation xml:lang="en">
35240:    Path to runpsipred_single script.
35241:    </xs:documentation></xs:annotation>
35242:  </xs:attribute>
35243:  <xs:attribute name="vall_path" type="xs:string" default="/path/to/anaconda3/envs/dl_binder_design/lib/python3.9/site-packages/pyrosetta/database//sampling/vall.jul19.2011.gz">
35244:   <xs:annotation><xs:documentation xml:lang="en">
35245:    Path to vall database.
35246:    </xs:documentation></xs:annotation>
35247:  </xs:attribute>
35248:  <xs:attribute name="frags_scoring_config" type="xs:string">
Error: attributes construct error

35238:  <xs:attribute name="psipred" type="xs:string">
35239:   <xs:annotation><xs:documentation xml:lang="en">
35240:    Path to runpsipred_single script.
35241:    </xs:documentation></xs:annotation>
35242:  </xs:attribute>
35243:  <xs:attribute name="vall_path" type="xs:string" default="/path/to/anaconda3/envs/dl_binder_design/lib/python3.9/site-packages/pyrosetta/database//sampling/vall.jul19.2011.gz">
35244:   <xs:annotation><xs:documentation xml:lang="en">
35245:    Path to vall database.
35246:    </xs:documentation></xs:annotation>
35247:  </xs:attribute>
35248:  <xs:attribute name="frags_scoring_config" type="xs:string">
Error: Couldn't find end of Start Tag attribute line 35243

35238:  <xs:attribute name="psipred" type="xs:string">
35239:   <xs:annotation><xs:documentation xml:lang="en">
35240:    Path to runpsipred_single script.
35241:    </xs:documentation></xs:annotation>
35242:  </xs:attribute>
35243:  <xs:attribute name="vall_path" type="xs:string" default="/path/to/anaconda3/envs/dl_binder_design/lib/python3.9/site-packages/pyrosetta/database//sampling/vall.jul19.2011.gz">
35244:   <xs:annotation><xs:documentation xml:lang="en">
35245:    Path to vall database.
35246:    </xs:documentation></xs:annotation>
35247:  </xs:attribute>
35248:  <xs:attribute name="frags_scoring_config" type="xs:string">
Error: PCDATA invalid Char value 8

35238:  <xs:attribute name="psipred" type="xs:string">
35239:   <xs:annotation><xs:documentation xml:lang="en">
35240:    Path to runpsipred_single script.
35241:    </xs:documentation></xs:annotation>
35242:  </xs:attribute>
35243:  <xs:attribute name="vall_path" type="xs:string" default="/path/to/anaconda3/envs/dl_binder_design/lib/python3.9/site-packages/pyrosetta/database//sampling/vall.jul19.2011.gz">
35244:   <xs:annotation><xs:documentation xml:lang="en">
35245:    Path to vall database.
35246:    </xs:documentation></xs:annotation>
35247:  </xs:attribute>
35248:  <xs:attribute name="frags_scoring_config" type="xs:string">
Error: Opening and ending tag mismatch: complexType line 35169 and attribute

35242:  </xs:attribute>
35243:  <xs:attribute name="vall_path" type="xs:string" default="/path/to/anaconda3/envs/dl_binder_design/lib/python3.9/site-packages/pyrosetta/database//sampling/vall.jul19.2011.gz">
35244:   <xs:annotation><xs:documentation xml:lang="en">
35245:    Path to vall database.
35246:    </xs:documentation></xs:annotation>
35247:  </xs:attribute>
35248:  <xs:attribute name="frags_scoring_config" type="xs:string">
35249:   <xs:annotation><xs:documentation xml:lang="en">
35250:    Path to scoring config file (required).
35251:    </xs:documentation></xs:annotation>
35252:  </xs:attribute>
Error: Opening and ending tag mismatch: schema line 2 and complexType

35293:  <xs:attribute name="confidence" type="real" default="1.0">
35294:   <xs:annotation><xs:documentation xml:lang="en">
35295:    Probability that the pose will be filtered out if it does not pass this Filter
35296:    </xs:documentation></xs:annotation>
35297:  </xs:attribute>
35298: </xs:complexType>
35299:
35300: <xs:complexType name="filter_Geometry_type" mixed="true">
35301:  <xs:annotation><xs:documentation xml:lang="en">
35302:   Filters poses based upon their geometry (omega angle, for example(
35303:  </xs:documentation></xs:annotation>
Error: Extra content at the end of the document

35295:    Probability that the pose will be filtered out if it does not pass this Filter
35296:    </xs:documentation></xs:annotation>
35297:  </xs:attribute>
35298: </xs:complexType>
35299:
35300: <xs:complexType name="filter_Geometry_type" mixed="true">
35301:  <xs:annotation><xs:documentation xml:lang="en">
35302:   Filters poses based upon their geometry (omega angle, for example(
35303:  </xs:documentation></xs:annotation>
35304:  <xs:attribute name="omega" type="real" default="165.0">
35305:   <xs:annotation><xs:documentation xml:lang="en">
gha2012 commented 1 year ago

Thank you for bringing this to my attention. I have added checkpoint_path to the example command in the README.

I will look into why your XML is failing and see if I can make you a fix.

Thank you!

SkwisgaarSkwigelf commented 1 year ago

Hi sorry I just got it running. Nothing wrong with the xml file, was an issue with my conda env. You can close this issue.