# Prince:Notebook/PPIX/Determine All Crosslink Possibilities

## Determine all the PDB files with 2 or more proteins

It is unclear to me the best/proper way to get at all the protein interactions found in PDB [JTP]

The Advanced Search options, selecting assymetric units with 2-100000 chains provides 16441 files for download (≈11 GB). ***Ryan M Taylor 14:07, 13 May 2010 (EDT)**:
List of Complexes

## Determine if inside or outside object

### Applied method

- 1. Determine all novel crosslinks existant between primary nitrogens of Lys residues under 200 Angstroms in length.
- 2. Tunnel through the crosslink vector, determining if there are any atoms within about 3.5 Angstroms from every point of the vector
- : i. This provides % outsideness, allowing for estimation of feasibility of the cross link.
- 3. Export to .yml file, providing a database for further testing.
- 4. Created pymol interaction script to generate images showing the crosslinks mapped to the PDB.

** Available via GitHub**

### Uncoded Alternatives

- Could do some kind of fill algorithm
- specify points that are outside, subdivide into grid and walk and mark

- Odd / even intersection
- link to discussion

`If your mesh is manifold ("regular") you can intersect a line through the interest point and through some other random point that you know is outside the mesh, with all triangles of the mesh. If it intersects an odd number of triangles, the point of interest is inside the mesh.`

```
For the "point outside the mesh" you can use "(max(X)+1, max(Y)+1, max(Z)+1)" where X, Y and Z are the sets of all x, y and z coordinates for vertexes in the mesh.
```

```
The trick is figuring out what to do when a point grazes an edge between two triangles, or when it goes through the mesh at a vertex; you have to carefully construct your inequalities to achieve consistency.
```

- Precalculating plane equations
- link

- Does a ray intersect a triangle? (if you don't have plane equations)
- link