Message Boards Message Boards

GROUPS:

[✓] Solve an equation for peptide deletion sequences?

Posted 12 days ago
124 Views
|
2 Replies
|
3 Total Likes
|

Hi there,

I am trying to solve the equation

[known value]=a*113+b*147+c*99+d*163+e*106+f*101+g*186+h*97+i*103

for a number of different [known values], where each variable is limited to its individual small set of positive integers up to 4, including 0.

However, I am unable to input this into Wolfram Alpha. I have tried

635=a*113+b*147+c*99+d*163+e*106+f*101+g*186+h*97+i*103 ; a=0,1,2 ; b=0,1 ; c=0,1 ; d=0,1 ; e=0,1 ; f=0,1,2,3,4 ; g=0,1,2,3 ; h=0,1 ; i=0,1

solve [635=a*113+b*147+c*99+d*163+e*106+f*101+g*186+h*97+i*103] over a=0,1,2 ; b=0,1 ; c=0,1 ; d=0,1 ; e=0,1 ; f=0,1,2,3,4 ; g=0,1,2,3 ; h=0,1 ; i=0,1

solve [635=a*113+b*147+c*99+d*163+e*106+f*101+g*186+h*97+i*103] over [a,b,c,d,e,f,g,h,i] where [a=0,1,2 ; b=0,1 ; c=0,1 ; d=0,1 ; e=0,1 ; f=0,1,2,3,4 ; g=0,1,2,3 ; h=0,1 ; i=0,1]

635=a*113+b*147+c*99+d*163+e*106+f*101+g*186+h*97+i*103 AND a=0,1,2 AND b=0,1AND c=0,1 AND d=0,1 AND e=0,1 AND f=0,1,2,3,4 AND g=0,1,2,3 AND h=0,1 AND i=0,1

635=a*113+b*147+c*99+d*163+e*106+f*101+g*186+h*97+i*103 ; a={0,1,2}...

...and a bunch of other guesses. Basically I need someone to tell me how to limit different variables to individual sets of numbers. Wolfram Alpha examples and Google are not of much help.

For those interested in the background: I work as a chemist synthesizing peptides. Sometimes in complicated sequences some amino acids won't give full conversion during coupling, leading to deletion sequences in the final product mixture. The number left of the = is the mass differential to the expected product, the variables' factors are masses of individual amino acid building blocks. By finding out which of the amino acids are missing, I'll be able to take measures to improve coupling yields in following attempts.

2 Replies

I went to www.wolframcloud.com and did it there (one can get a free account; I know not what might be restrictions for commercial usage though). I entered this as one might in any Mathematica session:

Solve[Flatten[{635==a*113+b*147+c*99+d*163+e*106+f*101+g*186+h*97+i*103 ,Thread[0<={a,b,c,d,e,f,g,h,i}<=4]}],{a,b,c,d,e,f,g,h,i},Integers]

 (*  {{a->0,b->0,c->0,d->2,e->0,f->0,g->0,h->0,i->3},
{a->0,b->0,c->0,d->2,e->2,f->0,g->0,h->1,i->0},
{a->0,b->1,c->1,d->0,e->1,f->0,g->1,h->1,i->0},
{a->0,b->3,c->0,d->0,e->0,f->0,g->0,h->2,i->0},
{a->1,b->0,c->0,d->0,e->3,f->1,g->0,h->0,i->1},
{a->1,b->0,c->1,d->2,e->0,f->0,g->0,h->1,i->0},
{a->1,b->1,c->0,d->1,e->2,f->0,g->0,h->0,i->0},
{a->2,b->0,c->0,d->0,e->1,f->0,g->0,h->1,i->2},
{a->2,b->0,c->0,d->0,e->1,f->3,g->0,h->0,i->0},
{a->2,b->0,c->1,d->0,e->1,f->1,g->0,h->0,i->1},
{a->2,b->1,c->1,d->1,e->0,f->0,g->0,h->0,i->0}} *)
Posted 11 days ago

Hi Daniel,

thanks a lot for your reply! Your solution works as desired for cases in which all variables can be {0,1,2,3,4}. However in my case, most numbers can only be {0,1}, a few others more.

I was able to adapt your code for my purpose, arriving at...

Solve[Flatten[{635==a113+b147+c99+d163+e106+f101+g186+h97+i*103 ,Thread[0<={b,c,d,e,h,i}<=1],Thread[0<={a}<=2], Thread[0<={g}<=3],Thread[0<={f}<=4]}],{a,b,c,d,e,f,g,h,i},Integers ]

...which gives me the required answer.

Again thank you very much for your help!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract