Closed Hanoriega closed 9 months ago
Also, that token was just generated and used the prompt on the website as to how I should copy and paste the API token.
It looks like the double quote characters are coming out funny in the API call that's being made. Try enclosing your key in single quotes?
I changed the double quote to single quote:
from chroma import api api.register_key('API_key')
from chroma import Protein, Chroma chroma = Chroma()
protein = Protein('TAPGKKRPVEPSPQRSPDSSTGIGKKGQQPARKRLNFGQTGDSESVPDPQPLGEPPAAPSGVGPNTMAAGGGAPMADNNEGADGVGSSSGNWHCDSTWLGDRVITTSTRTWALPTYNNHLYKQISNGTSGGATNDNTYFGYSTPWGYFDFNRFHCHFSPRDWQRLINNNWGFRPKRLSFKLFNIQVKEVTQNEGTKTIANNLTSTIQVFTDSEYQLPYVLGSAHQGCLPPFPADVFMIPQYGYLTLNNGSQAVGRSSFYCLEYFPSQMLRTGNNFQFTYTFEDVPFHSSYAHSQSLDRLMNPLIDQYLYYLSRTQTTGGTANTQTLGFSQGGPNTMANQAKNWLPGPCYRQQRVSTTTGQNNNSNFAWTAGTKYHLNGRNSLANPGIAMATHKDDEERFFPSNGILIFGKQNAARDNADYSDVMLTSEEEIKTTNPVATEEYGIVADNLQQQNTAPQIGTVNSQGALPGMVWQNRDVYLQGPIWAKIPHTDGNFHPSPLMGGFGLKHPPPQILIKNTPVPADPPTTFNQSKLNSFITQYSTGQVSVEIEWELQKENSKRWNPEIQYTSNYYKSTSVDFAVNTEGVYSEPRPIGTRYLTRNL') protein = chroma.design(protein, design_selection="resid 1-65 around 5.0")
protein.to("test.pdb")
Now, it says:
Data saved to C:\Users\myuser\AppData\Local\Temp\chroma_weights\90e339502ae6b372797414167ce5a632\weights.pt
Computing reference stats for 2g3n
Data saved to C:\Users\myuser\AppData\Local\Temp\chroma_weights\03a3a9af343ae74998768a2711c8b7ce\weights.pt
Loaded from cache
Traceback (most recent call last):
File "C:\Users\myuser\chroma\VP2_test.py", line 8, in
Do you think the double quotes should be changed elsewhere also?, and why does it say reference stats for 2g3n? Is there a way to change this to 1LP3? Or is there a length cutoff I need to correct for the sequence? Thank you for your reply
Since you're defining a protein from a sequence directly, there's no structural information. Consequently, the selection fails. Also, note that the normal usage of chroma.design
gets sequences and sidechains given backbone coordinates that are already present. If you don't have them, you should probably use chroma.sample
. Perhaps you could provide more details on what you're trying to do? If you'd like to draw a backbone that's biased towards a particular sequence, you could sample with a conditioner of type chroma.layers.structure.conditioners.SubsequenceConditioner
.
The output concerning reference statistics is because some graph features are standardized relative to a given PDB, which we've chosen to be 2G3N. If you're training your own network, you can certainly standardize these differently or not at all. The documentation of chroma.layers.structure.protein_graph.ProteinFeatureGraph
has more details. To be clear, though, the feature normalization does not affect the applicability of the model to arbitrary structures, including others in the PDB.
Closing this as it hasn't had any activity, @Hanoriega please feel free to reopen if you're still running into trouble!
Hello, I have been trying to re-design an n-terminal, I am fairly still new to coding/commands, so please be gentle and thorough with explanation.
I have created a py file as such: name: VP2_test.py Code inside file:
from chroma import api api.register_key("api-key")
from chroma import Protein, Chroma chroma = Chroma()
protein = Protein('TAPGKKRPVEPSPQRSPDSSTGIGKKGQQPARKRLNFGQTGDSESVPDPQPLGEPPAAPSGVGPNTMAAGGGAPMADNNEGADGVGSSSGNWHCDSTWLGDRVITTSTRTWALPTYNNHLYKQISNGTSGGATNDNTYFGYSTPWGYFDFNRFHCHFSPRDWQRLINNNWGFRPKRLSFKLFNIQVKEVTQNEGTKTIANNLTSTIQVFTDSEYQLPYVLGSAHQGCLPPFPADVFMIPQYGYLTLNNGSQAVGRSSFYCLEYFPSQMLRTGNNFQFTYTFEDVPFHSSYAHSQSLDRLMNPLIDQYLYYLSRTQTTGGTANTQTLGFSQGGPNTMANQAKNWLPGPCYRQQRVSTTTGQNNNSNFAWTAGTKYHLNGRNSLANPGIAMATHKDDEERFFPSNGILIFGKQNAARDNADYSDVMLTSEEEIKTTNPVATEEYGIVADNLQQQNTAPQIGTVNSQGALPGMVWQNRDVYLQGPIWAKIPHTDGNFHPSPLMGGFGLKHPPPQILIKNTPVPADPPTTFNQSKLNSFITQYSTGQVSVEIEWELQKENSKRWNPEIQYTSNYYKSTSVDFAVNTEGVYSEPRPIGTRYLTRNL') protein = chroma.design(protein, design_selection="resid 1-65 around 5.0")
protein.to("test.pdb")
Everytime I try to run in windows prompt:
Python VP2_test.py
It gives me this error and I am unsure why it is giving me the error.
(hw2) C:\Users\myuser\chroma>python VP2_test.py Traceback (most recent call last): File "C:\Users\myuser\chroma\VP2_test.py", line 6, in
chroma = Chroma()
File "C:\Users\myuser\chroma\chroma\models\chroma.py", line 84, in init
self.backbone_network = graph_backbone.load_model(
File "C:\Users\myuser\chroma\chroma\models\graph_backbone.py", line 405, in load_model
return utility_load_model(
File "C:\Users\myuser\chroma\chroma\utility\model.py", line 104, in load_model
weights = api.download_from_generate(
File "C:\Users\myuser\chroma\chroma\utility\api.py", line 118, in download_from_generate
response.raise_for_status() # Raise an error for HTTP errors
File "C:\Users\myuser.conda\envs\hw2\lib\site-packages\requests-2.31.0-py3.9.egg\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://chroma-weights.generatebiomedicines.com/downloads?token=%5Bapi-key%5D&weights=chroma_backbone_v1.0.pt
Can you help me? Thank you
(edited to mask API key)