You are here

some application troubles when using resfile flag

25 posts / 0 new
Last post
some application troubles when using resfile flag
#1

Hello,

Recently, I took advantage of resfile syntax to refine rosetta docking and backrub results.
But I met three problems, and would be happy to get any comments from others.

First, a nice simulation result pushed me to preserve some Ca ions in the input PDBs, whereas even if I have already supplemented a resfile including 'xx A NC CA', it was still interrupted on the way and shown like that 'aa CA is an unrecongnized aa'. Then I checked PDB file and found that Ca ions were listed in the last lines, so I moved them to related bound amino acids positions in the file and treated them as single atoms. However, nothing seemed to be changed. How could I keep these Ca ions?

Second, if the metal ions were circled in a loop and there was no further information about its specific bound single amino acid, could I define that all those amino acids covering the loop were allowed to obtain Ca, otherwise I must designate only one amino acid?

Third, usually I would have to add a spin label(uncommon organic group) to cystenine in my research, how could I make it go through the reading file checking in backrub application, since such checking always discarded my spin label and inputted it as a cysteine? Do I must write a file similar to those in rosetta_database/chemical/residue_type_sets/fa_standard/patches? If so, how partially distributed charge on each atom was calculated, empirical or what else?

Thank you for all.

Post Situation: 
Tue, 2011-04-05 00:05
chenchaozhao

First, part A) The NC resfile tag is not meant to interact with metal ions. The packer should (?) ignore metal ions, as it knows they have no rotamers. At most you need a NATRO flag for the calcium positions.

First, part B) Is it failing at PDB read-in, or at resfile read-in? Do you have a calcium residue type? It will be at something like rosetta_database/chemical/residue_type_sets/fa_standard/residues/(metals?). There should be several ions in that folder; if there isn't a calcium you can make one by comparison.

Second: I'm not sure what you're asking. Do you mean, how do you specify which residues interact with the calcium? There isn't really a way to do that; Rosetta's energy function doesn't handle that sort of bond. Usually we place the metal ion where we want it and fix the rotamers interacting with it (using NATRO).

Third: If you want your spin-label group to be present in the modeling, you will need to generate a parameters file for it, as you suggest. It will probably be easiest to generate a whole residue (including the cysteine backbone) rather than just the added atoms. You can do this by generating a .mol file (pymol can do it) of just your modified residue and feeding it to the molfile_to_params.py package in Rosetta. Partial charges, etc, are largely irrelevant: score12 (the default scorefunction) ignores them. If you want to use charges, you can tweak the scorefunction to use one of the explicit electronic terms (rather than fa_pair), but I don't know how to do it.

Third, part B): If you want this new cysteine conjugate to be flexible, it is possible, but it is nontrivial. I've done it in the past with help from its author. I don't think the code for generating rotamer libraries for non-canonical residue types has been released yet; I'll ask its author.

Tue, 2011-04-05 06:19
smlewis

Thanks for your detailed and suggestive reply.

I followed your advice and did backrub while associated with resfile file
`USE_INPUT_SC
start
201 A NATRO
202 A NATRO
203 A NATRO
` (positions 201-3 containing Ca ions), but it could not go through packer screening, shown as
`core.pack.task: Packer task: initialize from command line()
core.pack.task.ResfileReader: On line 3, the pose does not have residue (A, 201).
ERROR:: Exit from: src/core/pack/task/ResfileReader.cc line: 1195
`
to make it clear, I attached several last lines of my PDB file
`ATOM 1269 OE2 GLU A 161 11.283 46.998 27.449 1.00 87.43 O1-
ATOM 1270 OXT GLU A 161 14.222 50.834 24.822 1.00 75.91 O1-
TER 1271 GLU A 161
HETATM 1272 CA CA A 201 26.236 25.347 37.700 1.00 68.41 CA
HETATM 1273 CA CA A 202 28.394 67.125 28.137 1.00 67.03 CA
HETATM 1274 CA CA A 203 33.423 57.853 31.644 1.00 95.89 CA
END
`
In addition, I`ve checked that there is a Ca ion file.

Could you give me a bit more ideas? Thanks very much.

Wed, 2011-04-06 06:15
chenchaozhao

Try changing the HETATM lines to start ATOM instead?

Wed, 2011-04-06 08:05
smlewis

I changed HETATM into ATOM, but it couldn`t recognize CA, either. Maybe these Ca ions in my PDB file was too elusive to manage...
In addition, how could I feed constructed mol file into molfile_to_params.py package? I have no any idea about it.
As your suggestion in the first reply, I really would like to enable pertubation of my complete modified residue including spin label group for more accurate dynamic simulation. Could you share the codes to achieve it?

Thanks.

Thu, 2011-04-07 07:14
chenchaozhao

If it does not recognize your CA yet, try playing with the spacing. There are two letters in a four-column field, so there are 3 ways to space it. I've replaced spaces with dashes to illustrate:

CA--
-CA-
--CA

I don't know which one is correct.

I don't know anything more about molfile_to_params than is in its help (molfile_to_params.py -h). It's in src/python/apps/public.

I've emailed the guy who knows about making rotamer libraries to see if it's possible in 3.2.

Thu, 2011-04-07 17:27
smlewis

Thank you very much.
I have fixed the first problem. I would like to share with others. The way to achieve that was, generally like smlewis` suggestion:
Just to keep CA, in the residue type column into __CA format(other normal residue was in the format like _ALA).
Then, in my case, my Ca ions was isolated from other residues by TER and listed in the end, so I deleted TER line and made sure enumeration consistently, (because I omitted TER line just now) otherwise there would be a segmentation error.

Now I am dealing with the second one, and still confused how to see the help information... could it be clicking `python molfile_to_params.py -h` ? But it had syntax error. Could anyone give any hints? How about the commands to see the help?

Thanks a lot.

Fri, 2011-04-08 23:59
chenchaozhao

I don't know where the syntax error is from. Here's the contents of the help (from -h):

molfile_to_params.py -h
Usage: molfile_to_params.py [flags] { INPUT.mol | INPUT.sdf | INPUT.mol2 }

Converts a small molecule in an MDL Molfile with "M SPLT" and "M ROOT"
records into a series of .params residue definition files for Rosetta. Also
writes out the ligand conformation as PDB HETATMs. If an SD file is given as
input instead, the first entry is used for generating topology / parameter
files, and they all are used for generating PDB-style coordinates in separate,
numbered files. Multiple models may also be supplied in MOL2 format, which
does not support M ROOT and M SPLT records but does allow for partial charges.
File type is deduced from the extension. To divide a ligand into fragments by
"breaking" bonds (optional): M SPLT atom_no1 atom_no2 To specify a neighbor
atom for a ligand fragment (optional): M NBR atom_no To specify a root atom
for a ligand fragment (optional): M ROOT atom_no The "M" records (M SPLT, M
NBR, M ROOT) can alternatively be specified in a separate control file, which
can be used with MOL2 format files. Expects that the input ligand has already
had aromaticity "perceived", i.e. that it contains aromatic bonds rather than
alternating single and double bonds (Kekule structure). Optionally writes a
kinemage graphics visualization of the atom tree, neighbor atom selection,
fragments, etc -- very helpful for debugging and for visualizing exactly what
was done to the ligand.

Options:
-h, --help show this help message and exit
-n NM, --name=NM name ligand residues NM1,NM2,... instead of
LG1,LG2,...
-p FILE, --pdb=FILE prefix for PDB file names
-c, --centroid write files for Rosetta centroid mode too
--center=X,Y,Z translate output PDB coords to have given heavy-atom
centroid
-m MAX, --max-confs=MAX
don't expand proton chis if above this many total
confs
-k FILE, --kinemage=FILE
write ligand topology to FILE
-a ALA, --amino-acid=ALA
set up params file for modified amino acid; .mol2
only; edit chis afterward. Implies --keep-names.
--clobber overwrite existing files
--no-param skip writing .params files (for debugging)
--no-pdb skip writing .pdb files (for debugging)
--keep-names leaves atom names untouched except for duplications
--recharge=CHG ignore existing partial charges, setting total charge
to CHG
--m-ctrl=FILE read additional M control lines from FILE

Sat, 2011-04-09 11:29
smlewis

I am "the guy who knows about making rotamer libraries" and unfortunately it is not possible with the 3.2 release to run the rotamer library creation protocol. Also I believe that the molfile2params.py script in the 3.2 release can only make residue type params files for LIGAND residue types and, based on your description of a cysteine with a spin label, you would need a POLYMER residue type.

Sat, 2011-04-09 13:44
renfrew

Thanks very much for smlewis and renfrew's information.

But I still have something about rotamer library to bother renfrew. If I would produced a rotamer library by myself, do you know whether there is any way to integrate it into rosetta framework and make it concerted with backrub?

Second, would you mind telling me the commands to make a POLYMER residue type, if possible?

Thanks very much.

Mon, 2011-04-11 04:03
chenchaozhao

"But I still have something about rotamer library to bother renfrew. If I would produced a rotamer library by myself, do you know whether there is any way to integrate it into rosetta framework and make it concerted with backrub? "

I'm not positive about backrub, but there is a way to do this. If you put all your rotamers into a PDB file, with each rotamer separated by a TER line, then add a line to the params file that says "PDB_ROTAMERS path/to/file.pdb", you can read in arbitrary rotamer libraries.

Mon, 2011-04-11 08:53
smlewis

"Second, would you mind telling me the commands to make a POLYMER residue type, if possible?"

It's not a question of commands - the molfile to params that you have can't do it, you need a newer version than we've released. The author and I are discussing it further.

Mon, 2011-04-11 10:42
smlewis

Thanks for your great help.

No matter it is Ok or not, without your immediately updated information, I could not go so far on rosetta application. Thank you!!

Tue, 2011-04-12 21:13
chenchaozhao

Renfrew has posted the new molfile to params code:

https://files.nyu.edu/pdr2/public/for_ash.tar.gz

This tarball contains more than you need; it has a pretty good README though. You can skip down to step 5 or 6 if you already have a good molfile of your adduct. (There are also a few notes specific to a different project - you should just ignore those).

This link will stay live for a few days, but won't be good forever, so make yourself a local copy of it.

Wed, 2011-04-13 08:05
smlewis

Thanks very much for renfrew and you.

I have finished making a params file for my non-canonical residue. However, backrub could not recognize it. I have updated the produced file to residue_type_sets/fa_standard/residue_type.txt and feeded it to residue_type_sets/fa_standard/residue_type/d-ncaa.

And at PDB reading stage, it was showed
`apps.backrub: Processing xxx.pdb...
core.io.pdb.file_data: [ WARNING ] discarding 5 atoms at position xxx in file xxx.pdb. Best match rsd_type: CYS

`
the suprising thing was the number of atoms that I added to cys was more than 5 atoms, around 12.

Then, it was interruptd at resfile reading stage, and shown

`
core.pack.task.ResfileReader: Unable to add non-canonical amino acid CYSMTSL because it is not in the ResidueTypeSet for residue xx.
ERROR:: Exit from: src/core/pack/task/ResfileReader.cc line: 1195

` I am sure I have decorated the corresponding residue in that position.

So whether there was something important left by me? Could you help me to point it out?

Thanks.

Thu, 2011-04-14 02:03
chenchaozhao

Rosetta isn't reading your new residue type.

"I have updated the produced file to residue_type_sets/fa_standard/residue_type.txt" - this should take care of reading it in. Try adding -out:level 500 to your command line. This will produce a HUGE amount of output, including a line as each residue type is read in, like so:

core.chemical: Read 36 lines from file: /scratch/smlewis/minirosetta_database/chemical/residue_type_sets/fa_standard/residue_types/l-caa/GLY.params
core.chemical.ResidueType: adding act coord atom: GLY CA
core.chemical: Read 102 lines from file: /scratch/smlewis/minirosetta_database/chemical/residue_type_sets/fa_standard/residue_types/l-caa/HIS.params
core.chemical.ResidueType: adding act coord atom: HIS ND1
core.chemical.ResidueType: adding act coord atom: HIS CD2

You should look for your new one in this list.

If it's not there, it isn't being read in residue_types.txt for some reason. (You didn't put a # in front of it, right?)

You can also try the flag -extra_res_fa, which is a command-line addition to residue_types.txt.

Thu, 2011-04-14 07:10
smlewis

Thanks smlewis for your advice, but it looked like that could not solve my problem.

I have confirmed and found my new one in the list, but because it went so fast, I could not copy the line. I saw it showed like ....sucessfully patched cysmtsl.param and like adding mtsl and amino-ethyl to cys..., so the params file I think is OK and feeded.

And the error was still

apps.backrub: Processing xxx.pdb...
core.io.pdb.file_data: [ WARNING ] discarding 5 atoms at position xxx in file xxx.pdb. Best match rsd_type: CYS
.......
core.pack.task.ResfileReader: Unable to add non-canonical amino acid CYSMTSL because it is not in the ResidueTypeSet for residue xx.
ERROR:: Exit from: src/core/pack/task/ResfileReader.cc line: 1195

Fri, 2011-04-15 06:01
chenchaozhao

A) You can save log files by redirecting the output (this is supported in most shells): backrub.linuxgccrelease -option1 -option2 > logfile. The > redirects output to logfile.

B) Can you attach your resfile and params file?

C) Does your input PDB contain a residue of the adduct type, or a regular cysteine? You can try it both ways. If you name it like the adduct, then the PDB reader should be able to add the extra adduct atoms, even if you give it cysteine as input (be sure to remove HG).

D) It does not matter what folder the new parameters file is in, so long as the path is accurate - the folders themselves are only for organization. It does matter that you put it in the fa_standard residue type set.

Fri, 2011-04-15 07:02
smlewis

Thanks for your resourceful ideas.

my backrub command was:

/home/zcc/ro/rosetta_source/bin/backrub.linuxgccrelease -database /home/zcc/ro/rosetta_database -s xxx.pdb -in:file:fullatom -ignore_unrecognized_res -pivot_residues xxx -nstruct 1 -backrub:trajectory -backrub:trajectory_stride 100 -backrub:ntrials 1000 -resfile resfile.resfile

my resfile was:

start
xx x EMPTY NC cysmtsl

my params file was:

NAME cysmtsl
IO_STRING cys X
TYPE POLYMER
AA UNK
ATOM N Nbb X -0.46
ATOM CA CAbb X -0.02
ATOM C CObb C 0.69
ATOM O OCbb O -0.48
ATOM CB CH1 X -0.02
ATOM SG S S -0.09
ATOM SD S S -0.09
ATOM CE CH2 CT2 -0.11
ATOM CZ CH1 X -0.02
ATOM CT1 CH1 X -0.02
ATOM CT2 CH2 CT2 -0.11
ATOM NI1 Nhis N -0.46
ATOM CI2 CH2 CT2 -0.11
ATOM CK CH1 X -0.02
ATOM OL OOC X -0.69
ATOM 1HE Hapo HA 0.16
ATOM 2HE Hapo HA 0.16
ATOM 1HT1 Hapo HA 0.16
ATOM 1HT2 Hapo HA 0.16
ATOM 2HT2 Hapo HA 0.16
ATOM 1HI2 Hapo HA 0.16
ATOM 2HI2 Hapo HA 0.16
ATOM 1HK Hapo HA 0.16
BOND N CA
BOND CA C
BOND CA CB
BOND C O
BOND CB SG
BOND CE SD
BOND CE CZ
BOND CE 1HE
BOND CE 2HE
BOND NI1 CI2
BOND NI1 CK
BOND NI1 CT2
BOND SG SD
BOND CT1 CI2
BOND CT1 CZ
BOND CT1 1HT1
BOND OL CK
BOND CI2 1HI2
BOND CI2 2HI2
BOND CK 1HK
BOND CT2 CZ
BOND CT2 1HT2
BOND CT2 2HT2
LOWER_CONNECT N
UPPER_CONNECT C
CHI 1 N CA C O
CHI 2 N CA CB SG
CHI 3 CA CB SG SD
CHI 4 SG SD CE CZ
CHI 5 SD CE CZ CT1
CHI 6 CI2 NI1 CK OL
CHI 7 CB SG SD CE
NBR_ATOM CB
NBR_RADIUS 12.925454
FIRST_SIDECHAIN_ATOM CB
PROPERTIES
ICOOR_INTERNAL N 0.000000 0.000000 0.000000 N CA C
ICOOR_INTERNAL CA 0.000000 180.000000 1.459903 N CA C
ICOOR_INTERNAL C 0.000000 69.006998 1.510333 CA N C
ICOOR_INTERNAL LOWER -139.014150 70.508075 1.469804 N CA C
ICOOR_INTERNAL O -45.001477 57.373553 1.189745 C CA N
ICOOR_INTERNAL UPPER 134.979634 61.316313 1.470295 C CA N
ICOOR_INTERNAL CB -124.073480 71.485237 1.540777 CA N C
ICOOR_INTERNAL SG -179.600976 69.301095 1.820495 CB CA N
ICOOR_INTERNAL SD 144.270431 70.529387 2.050335 SG CB CA
ICOOR_INTERNAL CE -3.866097 70.477679 1.820179 SD SG CB
ICOOR_INTERNAL CZ 66.627736 70.545670 1.540568 CE SD SG
ICOOR_INTERNAL CT1 38.139473 70.356167 1.534727 CZ CE SD
ICOOR_INTERNAL CI2 92.821331 76.080757 1.529982 CT1 CZ CE
ICOOR_INTERNAL NI1 38.571347 79.793405 1.477770 CI2 CT1 CZ
ICOOR_INTERNAL CK -159.657601 70.552353 1.469053 NI1 CI2 CT1
ICOOR_INTERNAL OL -58.131202 59.560957 1.208191 CK NI1 CI2
ICOOR_INTERNAL 1HK 179.911060 60.877779 1.113399 CK NI1 OL
ICOOR_INTERNAL CT2 120.200527 70.239065 1.477421 NI1 CI2 CK
ICOOR_INTERNAL 1HT2 -93.767901 70.051674 1.117109 CT2 NI1 CI2
ICOOR_INTERNAL 2HT2 -120.446653 66.389617 1.116490 CT2 NI1 1HT2
ICOOR_INTERNAL 1HI2 123.736571 67.068388 1.116479 CI2 CT1 NI1
ICOOR_INTERNAL 2HI2 121.385881 70.128788 1.117124 CI2 CT1 1HI2
ICOOR_INTERNAL 1HT1 -179.980157 51.978019 1.090371 CT1 CZ CI2
ICOOR_INTERNAL 1HE 120.028447 70.490228 1.089499 CE SD CZ
ICOOR_INTERNAL 2HE 120.042929 70.520860 1.090014 CE SD 1HE

I tried both adduct and original cys, but still did not work. What a pity...

And you said `If you name it like the adduct...` does it mean just to add a line in resfile, like what I`ve done?

Thanks very much.

Fri, 2011-04-15 07:52
chenchaozhao

Try changing these lines like so:

resfile:

start
xx x EMPTY NC CYSMSTL #may be case sensitive?

params file:
NAME CYSMSTL
IO_STRING CYM X #NOT CYS: use a unique 3-letter code

You can also try using CYM instead of CYSMSTL in the resfile, and replacing the residue IDs on the adduct in your input PDB with CYM instead of CYS (and deleting the HG); the PDB reader may be able to do the insertion for you without packing.

If this fails, I think we should debug it using fixbb instead of backrub (for simplicity), and just try to get it to recognize your new residue at all, to ensure that there's not a subtle error in the params file or something similar.

Fri, 2011-04-15 08:03
smlewis

after performed as your suggestion, it was improved a lot.

and this time the bug showed

apps.backrub: Processing chaind.pdb...
core.conformation.Conformation: [ WARNING ] missing heavyatom: CZ on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: CT1 on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: CT2 on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: NI1 on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: CI2 on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: CK on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: OL on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: CT2 on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: NI1 on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: CK on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: OL on residue cym 60
core.conformation.Conformation: [ WARNING ] missing heavyatom: CT2 on residue cym 60
core.pack.task: Packer task: initialize from command line()
core.pack.pack_missing_sidechains: packing residue number 60 because of missing atom number 9 atom name CZ
core.pack.rotamer_set.RotamerSet_: [ WARNING ] including current in order to get at least 1 rotamer !!!!!! 60 cym
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
core.pack.pack_rotamers: built 1 rotamers at 1 positions.
core.pack.pack_rotamers: IG: 452 bytes
protocols.moves.BackrubMover: Segment lengths: 3-34 atoms
protocols.moves.BackrubMover: Main chain pivot atoms: CA
protocols.moves.BackrubMover: Adding backrub segments for residues 60-62
protocols.moves.BackrubMover: Total Segments Added: 3
apps.backrub: Score After PDB Load:
core.mm.MMBondAngleLibrary: No parameters for X-X-C

ERROR: t3mapIN7utility4keys9Key2TupleIjjEEjSt4lessIS4_ESaISt4pairIKS4_jEEESaISB_EE
ERROR:: Exit from: src/core/mm/MMBondAngleLibrary.cc line: 188
`

and in the PDB file there was actually e.g C01 C03 C05.. instead of e.g CZ CT1 CT2 in the params file. How could it be like that? I think I`ve copied the adduct in my modified PDB (decorate cys into my adduct) in order to keep the enumeration consistent.

Thanks!

Fri, 2011-04-15 10:15
chenchaozhao

I can spot three issues:

A) core.pack.rotamer_set.RotamerSet_: [ WARNING ] including current in order to get at least 1 rotamer !!!!!! 60 cym
This means you have not provided any rotamers for your new residue - I thought you said you were going to make your own rotamer library? I notice there's no PDB_ROTAMERS line in the params file.

B) core.mm.MMBondAngleLibrary: No parameters for X-X-C
This is a combination of two problems. The direct problem is that your MMBondAngleLibrary does not have bond angle parameters for that bond. The reason it doesn't have them is that two of the atoms have MM atom types of "X". To fix this, you'll need to edit your params file so that the fourth column in the atom definition lines is a valid MM atom type. The MM atom types are in chemical/mm_atom_type_sets/fa_standard/mm_atom_types; I think they're from CHARMM, hopefully those files will make it clear. If your ligand has new atom types, you'll need to add them to the files in that directory and find parameters for them that are consistent with the same forcefield (again, I think it's CHARMM).

C) "and in the PDB file there was actually e.g C01 C03 C05.. instead of e.g CZ CT1 CT2 in the params file. " I don't understand the question - if you don't like the atom names in the INPUT pdb, then you should change them to match the params file. Is this in relation to an output pdb...?

Fri, 2011-04-15 12:20
smlewis

Thanks.

I will supplement the rotamer library with it as soon as possible. I am learning about it now..

The reason to put forth the last question was because there was a warning
core.conformation.Conformation: [ WARNING ] missing heavyatom CZ ... on residue cym 60
So I am not sure whether it does matter or not...

Fri, 2011-04-15 12:44
chenchaozhao

When a PDB is read in, this warning is placed for every heavy atom missing in the input. If you place a copy of your adduct in the input PDB, with all the atoms in place and named as in the params file, then the warnings will go away. They are only warnings: so long as the PDB-reading machinery knows what residue it is, it will fill in the missing atoms for you from the params file.

Sat, 2011-04-16 18:29
smlewis

Should it be in d-ncaa?

Fri, 2011-04-15 06:10
chenchaozhao