You are here

Error while converting mol2 to params using molfile_to_params.py

8 posts / 0 new
Last post
Error while converting mol2 to params using molfile_to_params.py
#1

I'm trying to run python /home/labusr/rosetta/main/source/scripts/python/public/molfile_to_params.py --keep-names --clobber --extra_torsion_output --centroid gtp.mol2 -p GTP -n GTP, on a gtp.pdb that has been reduced using phenix.reduce and converted to mol2 using openbabel. Below is the error I get. 

 

Centering ligands at ( 137.226,  136.120,  116.327)
WARNING:  atom  PG  has valence > 4
WARNING:  atom  PB  has valence > 4
WARNING:  atom  PA  has valence > 4
WARNING:  atom  C6  has valence > 4
Partial charges already fully assigned, no changes made; net charge -2.000
WARNING: fragment 1 has 44 total atoms including H; protein residues have 7 - 24 (DNA: 33)
WARNING: fragment 1 has 32 non-H atoms; protein residues have 4 - 14 (DNA: 22)
WARNING: fragment 1 has 10 rotatable bonds; protein residues have 0 - 4
Fragment 2: ['HN22']
Traceback (most recent call last):
  File "/home/labusr/rosetta/main/source/scripts/python/public/molfile_to_params.py", line 1609, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/labusr/rosetta/main/source/scripts/python/public/molfile_to_params.py", line 1581, in main
    num_frags = fragment_ligand(m)
  File "/home/labusr/rosetta/main/source/scripts/python/public/molfile_to_params.py", line 659, in fragment_ligand
    raise ValueError("Fragment %i has %i atoms; merge with another fragment or add virtual atoms to make 3 total" % (frag_id, num_atoms))
ValueError: Fragment 2 has 1 atoms; merge with another fragment or add virtual atoms to make 3 total
(python27) [labusr@luxor tubulin_nucleotide_refinment]$

 

Post Situation: 
Thu, 2018-06-14 10:30
ahmadkhalifa

 

`Fragment 2: ['HN22'] `

 

That looks weird.  Look in your input to see if that hydrogen is partitioned off by itself for some reason?  The error is that Rosetta thinks the one hydrogen is a standalone unit, and it can't parameterize things that small (you need 3 atoms to define a coordinate frame).

Thu, 2018-06-14 10:36
smlewis

That error message is effectively stating that the mol2 file you're using is not a single molecule, but effectively multiple molecules in the same file. Probably because you're missing bonds in the molecule.

I'd recommend looking at the molecule in a structure viewing program like PyMol or Avogadro. It should show if there are missing bonds in the molecule. These missing bonds are probably coming about because PDBs don't really have any bonding information, so programs which convert them to other formats have to guess. I'm thinking that the particular way you did the conversion means that it missed one or more bonds in the structure, for some reason.

You can either fix up the bonding pattern of the mol2 file in a molecular editor like Avogadro, or you can repeat the process with a GTP that has all the bonds to begin with. (Though the coordinates may not match those of your input.)

Also, recent versions of Rosetta can automatically make params for certain molecules that are in the PDB (like GTP), matching the naming conventions present in your standard PDB, so with very recent versions of Rosetta, you might not even need to make a params file for GTP.

Thu, 2018-06-14 10:44
rmoretti

I looked at it in Pymol, it looks fine? Please find the gtp.mol2 in the attachments. I really appreciate your feedback. 

File attachments: 
Thu, 2018-06-14 12:13
ahmadkhalifa

Dear Ahmad,

If you open that .mol2 file in a molecular viewer/editor like UCSF Chimera and display the atom names, you can see that there are three places where hydrogens are trying to occupy the same space. HAD and HN22 are almost exactly on top of each other. So are HAC/HN1 and HAE/HN21.

Then, if you read the same file in a text editor, you'll see that HAD and HN22 have coordinates that are *way* too close- almost identical. And if you look very closely at the bonding information, you'll see that HAD (atom 31) is bonded to N2 (atom 29), but HN22 is not. That's what Steven and Rocco mentioned above about the fragment.

It looks like when you "reduced using phenix.reduce and converted to mol2 using openbabel," three of the existing hydrogens were not recognized, and so additional hydrogens were added on top of them. If you follow Rocco's advice by removing the HN1,HN21,HN22 atoms (the ones that aren't bonded), that may be enough to fix the bonding pattern. And in general, programs that reduce by adding hydrogens often have trouble when the input structure already contains some hydrogens.

Thu, 2018-06-14 18:06
sheehajh

Thanks a lot. I fixed the problem by removing all hydrogen  using ./phenix_reduce gtp_.pdb -trim > gtp_trimmed.pdb first, then reduced using the same command without the flag -trim. 

I would appreciate your input on the output of molfile_to_params.py, I'm getting all these files, what are they?

-rw-rw-r--. 1 labusr labusr 3.1K Jun 15 12:09 GTP_0001.cen.pdb
-rw-rw-r--. 1 labusr labusr 3.6K Jun 15 12:09 GTP_0001.fa.pdb
-rw-rw-r--. 1 labusr labusr 5.1K Jun 15 12:09 GTP.cen.params
-rw-rw-r--. 1 labusr labusr 1.5K Jun 15 12:09 GTP.cen.tors
-rw-rw-r--. 1 labusr labusr 6.0K Jun 15 12:09 GTP.fa.params
-rw-rw-r--. 1 labusr labusr 1.7K Jun 15 12:09 GTP.fa.tors

 

Fri, 2018-06-15 09:04
ahmadkhalifa

The PDB files are the replacement coordinates with Rosetta's chosen atom names to patch in to your input PDB with your GTP.  The coordinates will be the same; the atom names might have shifted.  cen and fa are centroid and fullatom - you proably have fullatom input so you'd use the fa one.

The params files are what you pass to rosetta to inform it of how to read your GTP.  I can't remember the flags - I think it's -extra_res centroid_params and -extra_res_fa fullatom_params.

I don't know what the tors files are.

 

Fri, 2018-06-15 10:31
smlewis

The tors files are torsional parameters used by the cart_bonded energy term to keep things like aromatic rings planar when doing Cartesian minimization. (This gets passed to the -extra_improper_file option.)

With recent versions of Rosetta, these files are superflous -- they'll be automatically generated internally by Rosetta.

Thu, 2018-06-28 12:04
rmoretti