> For the complete documentation index, see [llms.txt](https://lmdm.gitbook.io/introducao-ao-snakemake/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lmdm.gitbook.io/introducao-ao-snakemake/parte-1-visao-geral.md).

# Parte 1 - Visão geral

No tutorial original de docagem, cada etapa é executada manualmente no terminal ou em notebooks. Isso é ótimo para entender o que cada ferramenta faz, mas não é a forma ideal de manter um projeto reprodutível.

Neste módulo, vamos organizar o mesmo fluxo em um projeto Snakemake.

## 1.1 O que o Snakemake faz?

O Snakemake descreve análises em termos de **regras**. Cada regra declara:

* arquivos de entrada;
* arquivos de saída;
* comando necessário para gerar a saída a partir da entrada.

Exemplo mínimo:

```python
rule exemplo:
    input:
        "entrada.txt"
    output:
        "saida.txt"
    shell:
        "cat {input} > {output}"
```

A ideia central é simples:

> Se uma regra produz um arquivo que outra regra precisa, o Snakemake descobre automaticamente a ordem correta.

## 1.2 Por que usar em docagem?

Em docagem molecular, é comum ter muitas etapas dependentes:

```
SMILES → SDF 3D → PDBQT → Vina → scores → análise
```

Sem um workflow manager, é fácil:

* esquecer um comando;
* sobrescrever arquivos;
* não saber o que precisa ser refeito;
* ter resultados difíceis de reproduzir;
* dificultar a vida de outra pessoa que queira repetir a análise.

Com Snakemake, você define o alvo final, por exemplo:

```
results/docking/docking_scores.tsv
```

e o programa decide quais regras precisa executar para chegar até ele.

{% hint style="danger" %}
**Aviso**

Este documento tem finalidade exclusivamente didática e foi elaborado para apoiar o aprendizado dos conceitos e etapas gerais de um fluxo de docagem molecular.

Em um ambiente real de docagem, os protocolos devem ser cuidadosamente ajustados de acordo com o sistema estudado, os objetivos da análise, a qualidade das estruturas, os parâmetros físico-químicos relevantes e as boas práticas da área.

Portanto, os procedimentos aqui apresentados não devem ser interpretados como um protocolo universal ou definitivo.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lmdm.gitbook.io/introducao-ao-snakemake/parte-1-visao-geral.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
