Giter VIP home page Giter VIP logo

pyfolding's People

Contributors

ergm3 avatar quantumjot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyfolding's Issues

Error in `fit_heterpolymer`

Originally posted by @mnaqvi-code in #4 (comment)


Hi
I am using the heteropolymer model and using the following fitting command:
ising.fit_heteropolymer(curves[0:12], topology1[0:12], popsize=10, maxiter= 10000)
I am getting the following error:


TypeError Traceback (most recent call last)
in
----> 1 ising.fit_heteropolymer(curves[0:12], topology1[0:12], popsize=10, maxiter= 10000)

~\anaconda3\lib\site-packages\pyfolding\ising.py in fit_heteropolymer(equilibrium_curves, topologies, popsize, tol, maxiter, **kwargs)
755 for protein, topology in zip(equilibrium_curves, topologies):
756 fit_func.append(protein, topology)
--> 757 print( '+ added {0:s} with topology {1:s}'.format(protein.ID, [d().name for d in topology]))
758
759 # do the fitting

TypeError: unsupported format string passed to list.format

Please inform me if you know how to fix it. It seems this is an issue with python 3 version? Thanks

S15_homopolymerising model: error

When I am running the code and I am getting the following error
Automatic global fitting to the homozipper model

r_homo = ising.fit_homopolymer(proteins, n_helices)

ValueError Traceback (most recent call last)
in
1 # try with a one-liner which can also save out the curve fits via:"save='/Users/ergm/Desktop/test.csv'
----> 2 r_homo = ising.fit_homopolymer(proteins, n_helices) #, save='/Users/ergm/Desktop/test.csv')

~\anaconda3\lib\site-packages\pyfolding-1.0-py3.8.egg\pyfolding\ising.py in fit_homopolymer(equilibrium_curves, topologies, p0, bounds, **kwargs)
657 # do the global fit
658 # out, covar = global_fit.fit( p0=p0, bounds=((0,-1.,0.),(10.,1.,-10.)) )
--> 659 out, covar = global_fit.fit( p0=p0, bounds=bounds )
660
661

~\anaconda3\lib\site-packages\pyfolding-1.0-py3.8.egg\pyfolding\core.py in fit(self, p0, bounds)
776 # fit the data
777 if bounds:
--> 778 out, covar = optimize.curve_fit(self, x, y, p0=p0, bounds=bounds,
779 max_nfev=20000, absolute_sigma=True,
780 sigma=self.fit_weights)

~\anaconda3\lib\site-packages\scipy\optimize\minpack.py in curve_fit(f, xdata, ydata, p0, sigma, absolute_sigma, check_finite, bounds, method, jac, **kwargs)
793 kwargs['max_nfev'] = kwargs.pop('maxfev', None)
794
--> 795 res = least_squares(func, p0, jac=jac, bounds=bounds, method=method,
796 **kwargs)
797

~\anaconda3\lib\site-packages\scipy\optimize_lsq\least_squares.py in least_squares(fun, x0, jac, bounds, method, ftol, xtol, gtol, x_scale, loss, f_scale, diff_step, tr_solver, tr_options, jac_sparsity, max_nfev, verbose, args, kwargs)
789
790 if np.any(lb >= ub):
--> 791 raise ValueError("Each lower bound must be strictly less than each "
792 "upper bound.")
793

ValueError: Each lower bound must be strictly less than each upper bound.

The equation used for the model

The equation used for the model :TwoStateEquilibriumSloping is incorrect. The correct equation is :

Fnorm =[An + Bn + (Ad + Bd) exp(m(D-D50%)/RT )]/(1 + exp(m(D-D50%)/RT ))

There is a bracket [ ] missing in the equation currently used which is giving wrong fitting parameters. Please correct it. Thanks

Saving fit data to csv file

Hello
Every time I try to use the command Equilm_FKBP12.save_fit('(test.csv') I get the error a bytes-like object is required, not 'str'. How do I fix this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.