[gmx-users] Insane.py problem
João Henriques
joao.henriques.32353 at gmail.com
Wed May 13 15:53:53 CEST 2015
If it works, it works, but for example:
>>>a = '1, 1 , 2 '
>>>[float(i) for i in a.split(',')]
[1.0, 1.0, 2.0]
Best regards,
João
On Wed, May 13, 2015 at 3:49 PM, Carlos Navarro Retamal <cnavarro at utalca.cl>
wrote:
> I have no idea either.
> with:
> ./insane.py -f PSII-CG.pdb -pbc square -box 25,20,15 -l CPG:0.5557 -l
> PPG:0.0543 -l CDGDG:2.56 -l CMGDG:4.35 -l CSQDB:2.4774 -l CSQDG:0.0026 -sol
> W -o system.gro
> works perfectly.
> Best,
> carlos
>
> --
> Carlos Navarro Retamal
> Bioinformatics Engineering
> Ph. D (c) Applied Sciences.
> Center of Bioinformatics and Molecular Simulations. CBSM
> University of Talca
> Av. Lircay S/N, Talca, Chile
> T: (+56) 712201 798
> E: carlos.navarro87 at gmail.com or cnavarro at utalca.cl
>
>
>
> On May 13, 2015 at 3:45:24 PM, João Henriques (
> joao.henriques.32353 at gmail.com<mailto:joao.henriques.32353 at gmail.com>)
> wrote:
>
> That's strange. x = [ float(i) for i in a.split(",") ] + 6*[0] creates a
> list x that is [20.0, 20.0, 10.0, 0, 0, 0, 0, 0, 0]. There should be no
> error for having an empty space in between comma separated values...
>
> But then again, I'm not looking at the full code...
>
> /J
>
> On Wed, May 13, 2015 at 3:35 PM, Carlos Navarro Retamal <
> cnavarro at utalca.cl>
> wrote:
>
> > Hi Tsjerk
> > Thanks for your reply.
> > I found that the problem was the empty space between the number and the
> > comma. How silly of me.
> > Thanks in any case :)
> > Carlos
> > --
> > Carlos Navarro Retamal
> > Bioinformatics Engineering
> > Ph. D (c) Applied Sciences.
> > Center of Bioinformatics and Molecular Simulations. CBSM
> > University of Talca
> > Av. Lircay S/N, Talca, Chile
> > T: (+56) 712201 798
> > E: carlos.navarro87 at gmail.com or cnavarro at utalca.cl
> >
> >
> >
> > On May 13, 2015 at 3:28:52 PM, Tsjerk Wassenaar (tsjerkw at gmail.com
> <mailto:
> > tsjerkw at gmail.com>) wrote:
> >
> > Hi Carlos,
> >
> > Use -box 20 20 10, without commas.
> >
> > Cheers,
> >
> > Tsjerk
> > On May 13, 2015 2:25 PM, "João Henriques" <
> joao.henriques.32353 at gmail.com>
> > wrote:
> >
> > > Dear Carlos,
> > >
> > > It's actually the other way around, it's trying to convert a string
> into
> > a
> > > float. I am absolutely not familiar with the code or the procedure, but
> > > form a programming perspective, this is likely due to some input you're
> > > providing that is not convertible to a float. For example, if you
> > provide:
> > > 'ABC123' as an argument to be internally converted to a float, it will
> > fail
> > > and raise an error such as yours.
> > >
> > > Maybe one of your inputs is required to be a 'number' and it's not.
> > >
> > > This as how far as I can go, being unfamiliar with Insane.py.
> > >
> > > Best regards,
> > > João
> > >
> > > On Wed, May 13, 2015 at 12:03 PM, Carlos Navarro Retamal <
> > > cnavarro at utalca.cl
> > > > wrote:
> > >
> > > > Dear gmx users,
> > > > I’m trying to create a thylakoid membrane (from cyanobacteria) with
> the
> > > > following lipid composition:
> > > > 18:1-16:0 PG 5.557%
> > > > 16:1-16:0 PG 0.543%
> > > > 18:1-16:0 DGDG 25.600%
> > > > 18:1-16:0 MGDG 43.500%
> > > > 18:1-16:0 SQDG 24.774%
> > > > 16:0-16:0 SQDG 0.026%
> > > > To do that, i’m using insane.py, by the following command line:
> > > >
> > > > ./insane.py -f PSII-CG.pdb -pbc square -box 20, 20, 10 -l CPG:0.5557
> -l
> > > > PPG:0.0543 -l CDGDG:2.56 -l CMGDG:4.35 -l CSQDB:2.4774 -l
> CSQDG:0.0026
> > > -sol
> > > > W -o system.gro
> > > > But i’m getting the next error message:
> > > > Traceback (most recent call last):
> > > > File "./insane.py", line 559, in <module>
> > > > options[ar].setvalue([args.pop(0) for i in range(options[ar].num)])
> > > > File "./insane.py", line 441, in setvalue
> > > > self.value = self.func(v[0])
> > > > File "./insane.py", line 302, in readBox
> > > > x = [ float(i) for i in a.split(",") ] + 6*[0]
> > > > ValueError: could not convert string to float:
> > > >
> > > > Is this because i’m using float numbers to describe the specific
> amount
> > > of
> > > > lipids?
> > > >
> > > > If this is the case, can someone suggest me an approach to overcome
> > this
> > > > issue?
> > > >
> > > > Thanks in advance,
> > > >
> > > > Carlos
> > > >
> > > > --
> > > > Carlos Navarro Retamal
> > > > Bioinformatics Engineering
> > > > Ph. D (c) Applied Sciences.
> > > > Center of Bioinformatics and Molecular Simulations. CBSM
> > > > University of Talca
> > > > Av. Lircay S/N, Talca, Chile
> > > > T: (+56) 712201 798
> > > > E: carlos.navarro87 at gmail.com or cnavarro at utalca.cl
> > > >
> > > > --
> > > > Gromacs Users mailing list
> > > >
> > > > * Please search the archive at
> > > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > > > posting!
> > > >
> > > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> > > >
> > > > * For (un)subscribe requests visit
> > > > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users
> or
> > > > send a mail to gmx-users-request at gromacs.org.
> > > --
> > > Gromacs Users mailing list
> > >
> > > * Please search the archive at
> > > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > > posting!
> > >
> > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> > >
> > > * For (un)subscribe requests visit
> > > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > > send a mail to gmx-users-request at gromacs.org.
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > posting!
> >
> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >
> > * For (un)subscribe requests visit
> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > send a mail to gmx-users-request at gromacs.org.
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> > posting!
> >
> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >
> > * For (un)subscribe requests visit
> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> > send a mail to gmx-users-request at gromacs.org.
> >
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>
More information about the gromacs.org_gmx-users
mailing list