# Array or sparse array ?

In a process of lead optimization, chemist often do SAR expansion around potent compound.
If lead compound can be break down three parts A(head), B(core), C(tail), chemist(me…) often fix one part(e.g core B) and change two parts.
After optimize A and C then, fix A, C and change B.
This approach is called array synthesis (not matrix).

It’s very simple and easy to design molecules, Free wilson approach maybe useful in this case.

But, sometime this approach meet problem that SAR is not additive. Each parts shows interaction because of many factors, steric, electrostatic, etc….
I need to think about SAR design more effectively.

DOE(design of experiment) is used drug discovery.
It’s not only used for QC, QA, but also used in process research or any other process of drug discovery.

I think DOE is useful for LO.
So, I searched DOE library in PyPi, and found pyDOE.
https://pythonhosted.org/pyDOE/
It’s cool but the library can’t make orthogonal array.
So, I moved to R.
CRAN provided DOE library called DOE.base.
I used the library.
Situation is…
Lead compound is build from 3 components.
r1, side chain.
r2, core part.
r3, side chain.
To optimize molecule, I selected 6 parts in r1, 3 parts in core and 3 parts in r2.
Simply, if I’ll try to make all combination, I need to make 6 * 3 * 3 = 54 cmpds.
But based on DOE, make orthogonal array like following code I could reduce number of compounds that I have to make.
I think combination of QSAR and DOE is good method of lead opt process.

```> library("DoE.base")
> r1 <- c("C", "CO", "CN","F","Br", "Cl")
> core <- c("phenyl", "pyridyl", "cyclohexyl")
> r2 <- c("c-pro", "c-bu", "c-pent")

> des <- oa.design( factor.names = list(r1, core, r2))
> des
A          B      C
1  Br cyclohexyl   c-bu
2  CN cyclohexyl  c-pro
3  CN    pyridyl c-pent
4  Cl cyclohexyl   c-bu
5  Br    pyridyl  c-pro
6  CO     phenyl  c-pro
7   F    pyridyl c-pent
8   F     phenyl   c-bu
9  Br     phenyl c-pent
10  C    pyridyl   c-bu
11  F cyclohexyl  c-pro
12 Cl    pyridyl  c-pro
13  C     phenyl  c-pro
14  C cyclohexyl c-pent
15 CO    pyridyl   c-bu
16 Cl     phenyl c-pent
17 CO cyclohexyl c-pent
18 CN     phenyl   c-bu
class=design, type= oa
```

How do you expansion SAR in LO stage?