# RESNAME error while using cgenff python script

**URL:** <https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178>\
**Category:** User discussions\
**Created:** [December 1, 2020, 5:59pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178 "2020-12-01T17:59:09Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://gromacs.bioexcel.eu/u/Sara)\
**Post date:** [December 1, 2020, 5:59pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/1 "2020-12-01T17:59:09Z")

</div>

hey all!  
I am trying to generate my input file for CHARMM force field using CGenff website.  
after using the python script :  
python cgenff\_charmm2gmx\_py2.py lig lig.str charmm36.ff

I got the error:  
Usage: RESNAME lig.mol2 lig.str charmm36.ff  
this happens while my .str and .mol2 file has the exact name mentioned in the python file (i.e lig)  
I would be grateful if anyone helps me.

-Sara

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 1, 2020, 6:10pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/2 "2020-12-01T18:10:38Z")

</div>

You aren’t providing a .mol2 file name in your command.

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://gromacs.bioexcel.eu/u/Sara)\
**Post date:** [December 1, 2020, 6:32pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/3 "2020-12-01T18:32:53Z")

</div>

oh! you are right. how about this one? should I change the script version? my python version is 2.7

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/1X/46bcc0f3c4624722f9b0737d18c7064b6484a984.png)

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 1, 2020, 6:43pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/4 "2020-12-01T18:43:47Z")

</div>

How did you generate the `lig.str` file? If it came from a source other than ParamChem/CGenFF, it will not be compatible with our conversion utility.

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://gromacs.bioexcel.eu/u/Sara)\
**Post date:** [December 1, 2020, 7:04pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/5 "2020-12-01T19:04:27Z")

</div>

I used CGennFF website.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/1X/a496d51e7e65a8e432a2f08568c411d18123afa1.png)

seems the problem arises from the version of CGennFF used in ff and by website. right?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 1, 2020, 7:19pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/6 "2020-12-01T19:19:59Z")

</div>

I have no idea how the script could have given you that error. It looks for the “For use with CGenFF version” string and checks for a match against the force field. Here, both are 4.4 so there should be no issue.

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://gromacs.bioexcel.eu/u/Sara)\
**Post date:** [December 1, 2020, 7:26pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/7 "2020-12-01T19:26:48Z")

</div>

:(  
should I use other servers?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 1, 2020, 7:37pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/8 "2020-12-01T19:37:50Z")

</div>

No.

Have you edited the stream file in any way, or opened it in a non-plain text editor that would cause problems with line endings?

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://gromacs.bioexcel.eu/u/Sara)\
**Post date:** [December 2, 2020, 6:41am UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/9 "2020-12-02T06:41:54Z")

</div>

No for both questions.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 2, 2020, 11:11am UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/10 "2020-12-02T11:11:06Z")

</div>

If you can upload your `.mol2` and `.str` files, I will look into this.

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://gromacs.bioexcel.eu/u/Sara)\
**Post date:** [December 2, 2020, 11:49am UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/11 "2020-12-02T11:49:50Z")

</div>

Unfortunately these formats are not allowed to be uploaded here. Moreover, I can not upload more than one file since I am new to this website.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 2, 2020, 2:25pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/12 "2020-12-02T14:25:13Z")

</div>

Upload to Google Drive and post the link. Please make sure permissions are set correctly so that the files can be accessed by anyone with the link (not via email address).

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://gromacs.bioexcel.eu/u/Sara)\
**Post date:** [December 2, 2020, 3:20pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/13 "2020-12-02T15:20:07Z")

</div>

sure.  
here it is :

> **[lig.rar](https://drive.google.com/file/d/1RKOEiMVHGf9u9lBWtGoysPb3Ox8kcK_J/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 2, 2020, 3:39pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/14 "2020-12-02T15:39:42Z")

</div>

I can’t reproduce the error. The conversion works perfectly for me.

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://gromacs.bioexcel.eu/u/Sara)\
**Post date:** [December 2, 2020, 5:33pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/15 "2020-12-02T17:33:31Z")

</div>

is there probably something wrong in my python script?

> **[cgenff\_charmm2gmx\_py2.py](https://drive.google.com/file/d/17dIET9PnJErWZdltqxtRQ43pTpeUTFWU/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 2, 2020, 5:46pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/16 "2020-12-02T17:46:55Z")

</div>

Looking back at your screenshot, your command is still wrong. Residue name, then mol2, then stream file. You inverted the stream and mol2 files.

---

<div class="post-metadata">

**Author:** ![Sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Sara](https://gromacs.bioexcel.eu/u/Sara)\
**Post date:** [December 2, 2020, 7:29pm UTC](https://gromacs.bioexcel.eu/t/resname-error-while-using-cgenff-python-script/1178/17 "2020-12-02T19:29:52Z")

</div>

awsome! you are right ! it worked. thanks a milion!
