From 25d9be0a8a883f5498ef703c13e791e4b81db507 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:42:45 -0700 Subject: [PATCH 01/16] Cleaner configs --- configs/data/feat/backbone.yaml | 103 ------- configs/data/feat/openfold.yaml | 6 - configs/deepspeed/deepspeed.yaml | 12 - configs/deepspeed/deepspeed_config.json | 27 -- configs/logger/aim.yaml | 28 -- configs/logger/comet.yaml | 12 - configs/logger/csv.yaml | 7 - configs/logger/mlflow.yaml | 12 - configs/logger/neptune.yaml | 9 - configs/loss/alphafold3_loss.yaml | 29 ++ configs/loss/proteus_loss.yaml | 9 + configs/model/alphafold3.yaml | 273 +++++++----------- configs/model/big-proteus.yaml | 34 +-- configs/model/mini-alphafold3.yaml | 180 +----------- configs/model/mnist.yaml | 25 -- configs/model/proteus.yaml | 34 +-- configs/optimizer/adam.yaml | 10 + configs/optimizer/adamw.yaml | 7 + configs/optimizer/fused_adam.yaml | 6 + configs/scheduler/alphafold3_lr.yaml | 12 + .../{train_af3.yaml => train_alphafold3.yaml} | 0 configs/trainer/deepspeed.yaml | 2 +- src/models/components/atom_attention.py | 4 +- src/models/diffusion_transformer.py | 4 +- src/models/model.py | 2 +- src/models/proteus_module.py | 94 +++--- src/train_alphafold.py | 2 +- src/utils/exponential_moving_average.py | 48 ++- 28 files changed, 301 insertions(+), 690 deletions(-) delete mode 100644 configs/data/feat/backbone.yaml delete mode 100644 configs/data/feat/openfold.yaml delete mode 100644 configs/deepspeed/deepspeed.yaml delete mode 100644 configs/deepspeed/deepspeed_config.json delete mode 100644 configs/logger/aim.yaml delete mode 100644 configs/logger/comet.yaml delete mode 100644 configs/logger/csv.yaml delete mode 100644 configs/logger/mlflow.yaml delete mode 100644 configs/logger/neptune.yaml create mode 100644 configs/loss/alphafold3_loss.yaml create mode 100644 configs/loss/proteus_loss.yaml delete mode 100644 configs/model/mnist.yaml create mode 100644 configs/optimizer/adam.yaml create mode 100644 configs/optimizer/adamw.yaml create mode 100644 configs/optimizer/fused_adam.yaml create mode 100644 configs/scheduler/alphafold3_lr.yaml rename configs/{train_af3.yaml => train_alphafold3.yaml} (100%) diff --git a/configs/data/feat/backbone.yaml b/configs/data/feat/backbone.yaml deleted file mode 100644 index f716543..0000000 --- a/configs/data/feat/backbone.yaml +++ /dev/null @@ -1,103 +0,0 @@ -# Features for AlphaFold 3, single chain, backbone only coordinates - -# Placeholders -placeholders: - NUM_RES: "num residues placeholder" - NUM_MSA_SEQ: "msa placeholder" - NUM_TEMPLATES: "num templates placeholder" - - -feat: - aatype: - - ${placeholders.NUM_RES} - all_atom_mask: - - ${placeholders.NUM_RES} - - null - all_atom_positions: - - ${placeholders.NUM_RES} - - null - - null - ref_pos: - - ${placeholders.NUM_RES} - - null - - null - ref_mask: - - ${placeholders.NUM_RES} - - null - ref_element: - - ${placeholders.NUM_RES} - - null - - null - ref_charge: - - ${placeholders.NUM_RES} - - null - ref_atom_name_chars: - - ${placeholders.NUM_RES} - - null - - null - ref_space_uid: - - ${placeholders.NUM_RES} - - null - atom_to_token: - - ${placeholders.NUM_RES} - - null - is_distillation: [] - msa_feat: - - ${placeholders.NUM_MSA_SEQ} - - ${placeholders.NUM_RES} - - null - msa_mask: - - ${placeholders.NUM_MSA_SEQ} - - ${placeholders.NUM_RES} - residue_index: - - ${placeholders.NUM_RES} - residx_atom14_to_atom37: - - ${placeholders.NUM_RES} - - null - residx_atom37_to_atom14: - - ${placeholders.NUM_RES} - - null - resolution: [] - seq_length: [] - seq_mask: - - ${placeholders.NUM_RES} - template_aatype: - - ${placeholders.NUM_TEMPLATES}, - - ${placeholders.NUM_RES} - template_all_atom_mask: - - ${placeholders.NUM_TEMPLATES}, - - ${placeholders.NUM_RES}, - - null - template_all_atom_positions: - - ${placeholders.NUM_TEMPLATES} - - ${placeholders.NUM_RES} - - null - - null - template_backbone_rigid_mask: - - ${placeholders.NUM_TEMPLATES} - - ${placeholders.NUM_RES} - template_backbone_rigid_tensor: - - ${placeholders.NUM_TEMPLATES} - - ${placeholders.NUM_RES} - - null - - null - template_mask: - - ${placeholders.NUM_TEMPLATES} - template_pseudo_beta: - - ${placeholders.NUM_TEMPLATES} - - ${placeholders.NUM_RES} - - null - template_pseudo_beta_mask: - - ${placeholders.NUM_TEMPLATES} - - ${placeholders.NUM_RES} - template_sum_probs: - - ${placeholders.NUM_TEMPLATES} - - null - valid_residues: - - ${placeholders.NUM_RES} - valid_templates: - - ${placeholders.NUM_TEMPLATES} - valid_msa: - - ${placeholders.NUM_MSA_SEQ} - valid_backbone_atoms: - - ${placeholders.NUM_RES} diff --git a/configs/data/feat/openfold.yaml b/configs/data/feat/openfold.yaml deleted file mode 100644 index 51bfaff..0000000 --- a/configs/data/feat/openfold.yaml +++ /dev/null @@ -1,6 +0,0 @@ -_target_: src.data.mnist_datamodule.MNISTDataModule -data_dir: ${paths.data_dir} -batch_size: 128 # Needs to be divisible by the number of devices (e.g., if in a distributed setup) -train_val_test_split: [55_000, 5_000, 10_000] -num_workers: 0 -pin_memory: False diff --git a/configs/deepspeed/deepspeed.yaml b/configs/deepspeed/deepspeed.yaml deleted file mode 100644 index 9edbd09..0000000 --- a/configs/deepspeed/deepspeed.yaml +++ /dev/null @@ -1,12 +0,0 @@ -_target_: ligthning.pytorch.strategies.DeepSpeedStrategy - -# ZeRO optimization -zero_optimization: True -stage: 2 -offload_optimizer: True -offload_optimizer_device: "cpu" -contiguous_gradients: True - -# Activation Checkpointing -partition_activations: False -cpu_checkpointing: False diff --git a/configs/deepspeed/deepspeed_config.json b/configs/deepspeed/deepspeed_config.json deleted file mode 100644 index c6b4f81..0000000 --- a/configs/deepspeed/deepspeed_config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "fp16": { - "enabled": false, - "min_loss_scale": 1 - }, - "amp": { - "enabled": false, - "opt_level": "O2" - }, - "bfloat16": { - "enabled": true - }, - "zero_optimization": { - "stage": 2, - "offload_optimizer": { - "device": "cpu" - }, - "contiguous_gradients": true - }, - "activation_checkpointing": { - "partition_activations": true, - "cpu_checkpointing": false, - "profile": false - }, - "gradient_clipping": 0.1, - "zero_force_ds_cpu_optimizer": false -} diff --git a/configs/logger/aim.yaml b/configs/logger/aim.yaml deleted file mode 100644 index 8f9f6ad..0000000 --- a/configs/logger/aim.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# https://aimstack.io/ - -# example usage in lightning module: -# https://github.com/aimhubio/aim/blob/main/examples/pytorch_lightning_track.py - -# open the Aim UI with the following command (run in the folder containing the `.aim` folder): -# `aim up` - -aim: - _target_: aim.pytorch_lightning.AimLogger - repo: ${paths.root_dir} # .aim folder will be created here - # repo: "aim://ip_address:port" # can instead provide IP address pointing to Aim remote tracking server which manages the repo, see https://aimstack.readthedocs.io/en/latest/using/remote_tracking.html# - - # aim allows to group runs under experiment name - experiment: null # any string, set to "default" if not specified - - train_metric_prefix: "train/" - val_metric_prefix: "val/" - test_metric_prefix: "test/" - - # sets the tracking interval in seconds for system usage metrics (CPU, GPU, memory, etc.) - system_tracking_interval: 10 # set to null to disable system metrics tracking - - # enable/disable logging of system params such as installed packages, git info, env vars, etc. - log_system_params: true - - # enable/disable tracking console logs (default value is true) - capture_terminal_logs: false # set to false to avoid infinite console log loop issue https://github.com/aimhubio/aim/issues/2550 diff --git a/configs/logger/comet.yaml b/configs/logger/comet.yaml deleted file mode 100644 index e078927..0000000 --- a/configs/logger/comet.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# https://www.comet.ml - -comet: - _target_: lightning.pytorch.loggers.comet.CometLogger - api_key: ${oc.env:COMET_API_TOKEN} # api key is loaded from environment variable - save_dir: "${paths.output_dir}" - project_name: "lightning-hydra-template" - rest_api_key: null - # experiment_name: "" - experiment_key: null # set to resume experiment - offline: False - prefix: "" diff --git a/configs/logger/csv.yaml b/configs/logger/csv.yaml deleted file mode 100644 index fa028e9..0000000 --- a/configs/logger/csv.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# csv logger built in lightning - -csv: - _target_: lightning.pytorch.loggers.csv_logs.CSVLogger - save_dir: "${paths.output_dir}" - name: "csv/" - prefix: "" diff --git a/configs/logger/mlflow.yaml b/configs/logger/mlflow.yaml deleted file mode 100644 index f8fb7e6..0000000 --- a/configs/logger/mlflow.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# https://mlflow.org - -mlflow: - _target_: lightning.pytorch.loggers.mlflow.MLFlowLogger - # experiment_name: "" - # run_name: "" - tracking_uri: ${paths.log_dir}/mlflow/mlruns # run `mlflow ui` command inside the `logs/mlflow/` dir to open the UI - tags: null - # save_dir: "./mlruns" - prefix: "" - artifact_location: null - # run_id: "" diff --git a/configs/logger/neptune.yaml b/configs/logger/neptune.yaml deleted file mode 100644 index 8233c14..0000000 --- a/configs/logger/neptune.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# https://neptune.ai - -neptune: - _target_: lightning.pytorch.loggers.neptune.NeptuneLogger - api_key: ${oc.env:NEPTUNE_API_TOKEN} # api key is loaded from environment variable - project: username/lightning-hydra-template - # name: "" - log_model_checkpoints: True - prefix: "" diff --git a/configs/loss/alphafold3_loss.yaml b/configs/loss/alphafold3_loss.yaml new file mode 100644 index 0000000..286c2c4 --- /dev/null +++ b/configs/loss/alphafold3_loss.yaml @@ -0,0 +1,29 @@ +# AlphaFold3 loss configs +loss: + mse_loss: + sd_data: 16.0 + weight: 4.0 + smooth_lddt_loss: + weight: 4.0 + epsilon: 1e-5 + + distogram: + min_bin: 0.0 + max_bin: 32.0 + no_bins: 64 + eps: 0.000006 # 1e-6 + weight: 0.03 + + experimentally_resolved: + eps: 0.00000001 # 1e-8, + # min_resolution: 0.1, + # max_resolution: 3.0, + weight: 0.0004 + + plddt_loss: + min_resolution: 0.1 + max_resolution: 3.0 + cutoff: 15.0 + no_bins": 50 + eps: 0.0000000001 # 1e-10, + weight: 0.0004 \ No newline at end of file diff --git a/configs/loss/proteus_loss.yaml b/configs/loss/proteus_loss.yaml new file mode 100644 index 0000000..d318f25 --- /dev/null +++ b/configs/loss/proteus_loss.yaml @@ -0,0 +1,9 @@ + +# Loss configs +loss: + mse_loss: + sd_data: 16.0 + weight: 4.0 + smooth_lddt_loss: + weight: 4.0 + epsilon: 1e-5 diff --git a/configs/model/alphafold3.yaml b/configs/model/alphafold3.yaml index 553fb6e..b90cd1c 100644 --- a/configs/model/alphafold3.yaml +++ b/configs/model/alphafold3.yaml @@ -1,166 +1,115 @@ # AlphaFold3 configs -# _target_: src.models.model_wrapper.AlphaFoldWrapper -# config: -optimizer: - _target_: deepspeed.ops.adam.FusedAdam # torch.optim.Adam # - _partial_: true - lr: 0.0018 - betas: - - 0.9 - - 0.95 - eps: 1e-08 - weight_decay: 0.0 - -scheduler: - _target_: src.utils.lr_schedulers.AlphaFoldLRScheduler - _partial_: true - last_epoch: -1 - verbose: false - base_lr: 0.0 # the starting learning rate - max_lr: 0.0018 - warmup_no_steps: 1000 - start_decay_after_n_steps: 50_000 - decay_every_n_steps: 50_000 - decay_factor: 0.95 - -# Loss configs -loss: - mse_loss: - sd_data: 16.0 - weight: 4.0 - smooth_lddt_loss: - weight: 4.0 - epsilon: 1e-5 - - distogram: - min_bin: 0.0 - max_bin: 32.0 - no_bins: 64 - eps: 0.000006 # 1e-6 - weight: 0.03 - - experimentally_resolved: - eps: 0.00000001 # 1e-8, - # min_resolution: 0.1, - # max_resolution: 3.0, - weight: 0.0004 - - plddt_loss: - min_resolution: 0.1 - max_resolution: 3.0 - cutoff: 15.0 - no_bins": 50 - eps: 0.0000000001 # 1e-10, - weight: 0.0004 - - -# TODO: fix the model.model notation in interpolation -model: - c_token: 384 # the token representation dim - c_pair: 128 # the pair representation dim - c_atom: 128 # the atom representation dim - c_atompair: 16 # the atom pair representation dim - - # Pair stack parameters (used in Pairformer, MSA module, and Confidence head) - c_hidden_tri_mul: 128 # the hidden dim for the triangle multiplicative update - c_hidden_pair_attn: 32 # the hidden dim for the pair attention ${common.c_hidden_pair_attn} - no_heads_tri_attn: 4 - transition_n: 4 - pair_dropout: 0.25 - fuse_projection_weights: false - blocks_per_ckpt: 1 # number of blocks per checkpoint, if none, no checkpointing - clear_cache_between_blocks: false # whether to clear GPU memory cache between blocks - # Pairformer attention pair bias - no_heads_single_attn: 16 - - # Input Embedder - input_embedder: - c_token: ${model.model.c_token} - c_trunk_pair: ${model.model.c_pair} - c_atom: ${model.model.c_atom} - c_atompair: ${model.model.c_atompair} - - # MSA module - msa_module: - no_blocks: 4 - c_msa: 64 - c_token: ${model.model.c_token} - c_z: ${model.model.c_pair} - c_hidden: 32 - no_heads: 8 - c_hidden_tri_mul: ${model.model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.model.no_heads_tri_attn} - transition_n: ${model.model.transition_n} - pair_dropout: ${model.model.pair_dropout} - fuse_projection_weights: ${model.model.fuse_projection_weights} - clear_cache_between_blocks: ${model.model.clear_cache_between_blocks} - blocks_per_ckpt: ${model.model.blocks_per_ckpt} - inf: 1e8 - - # Template Embedder - template_embedder: - no_blocks: 2 - c_template: 64 - c_z: ${model.model.c_pair} - clear_cache_between_blocks: ${model.model.clear_cache_between_blocks} - - # PairformerStack - pairformer_stack: - c_s: ${model.model.c_token} - c_z: ${model.model.c_pair} - no_blocks: 48 - c_hidden_mul: ${model.model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.model.no_heads_tri_attn} - no_heads_single_attn: ${model.model.no_heads_single_attn} - transition_n: ${model.model.transition_n} - pair_dropout: ${model.model.pair_dropout} - fuse_projection_weights: ${model.model.fuse_projection_weights} - blocks_per_ckpt: ${model.model.blocks_per_ckpt} - clear_cache_between_blocks: false - inf: 1e8 - - # Diffusion module - diffusion_module: - c_atom: ${model.model.c_atom} - c_atompair: ${model.model.c_atompair} - c_token: ${model.model.c_token} - c_tokenpair: ${model.model.c_pair} - atom_encoder_blocks: 3 - atom_encoder_heads: 16 - dropout: 0.0 - atom_attention_n_queries: 32 # TODO: with sliding window attention this is not used. - atom_attention_n_keys: 128 - atom_decoder_blocks: 3 - atom_decoder_heads: 16 - token_transformer_blocks: 24 - token_transformer_heads: 16 - sd_data: 16.0 - s_max: 160.0 - s_min: 0.0004 - p: 7.0 - clear_cache_between_blocks: ${model.model.clear_cache_between_blocks} - blocks_per_ckpt: ${model.model.blocks_per_ckpt} - - confidence_head: - c_s: 384 # ${model.c_token} - c_z: ${model.model.c_pair} - no_blocks: 4 - no_bins_pde: 64 - no_bins_plddt: 64 - no_bins_pae: 64 - c_hidden_mul: ${model.model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.model.no_heads_tri_attn} - no_heads_single_attn: ${model.model.no_heads_single_attn} - transition_n: ${model.model.transition_n} - pair_dropout: ${model.model.pair_dropout} - fuse_projection_weights: ${model.model.fuse_projection_weights} - - distogram_head: - c_z: ${model.model.c_pair} - no_bins: 64 +defaults: + - /optimizer/fused_adam # The leading slash indicates that the path is relative to the config root directory. + - /scheduler/alphafold_lr + - /loss/alphafold3_loss + + +c_token: 384 # the token representation dim +c_pair: 128 # the pair representation dim +c_atom: 128 # the atom representation dim +c_atompair: 16 # the atom pair representation dim + +# Pair stack parameters (used in Pairformer, MSA module, and Confidence head) +c_hidden_tri_mul: 128 # the hidden dim for the triangle multiplicative update +c_hidden_pair_attn: 32 # the hidden dim for the pair attention ${common.c_hidden_pair_attn} +no_heads_tri_attn: 4 +transition_n: 4 +pair_dropout: 0.25 +fuse_projection_weights: false +blocks_per_ckpt: 1 # number of blocks per checkpoint, if none, no checkpointing +clear_cache_between_blocks: false # whether to clear GPU memory cache between blocks +# Pairformer attention pair bias +no_heads_single_attn: 16 + +# Input Embedder +input_embedder: + c_token: ${model.c_token} + c_trunk_pair: ${model.c_pair} + c_atom: ${model.c_atom} + c_atompair: ${model.c_atompair} + +# MSA module +msa_module: + no_blocks: 4 + c_msa: 64 + c_token: ${model.c_token} + c_z: ${model.c_pair} + c_hidden: 32 + no_heads: 8 + c_hidden_tri_mul: ${model.c_hidden_tri_mul} + c_hidden_pair_attn: ${model.c_hidden_pair_attn} + no_heads_tri_attn: ${model.no_heads_tri_attn} + transition_n: ${model.transition_n} + pair_dropout: ${model.pair_dropout} + fuse_projection_weights: ${model.fuse_projection_weights} + clear_cache_between_blocks: ${model.clear_cache_between_blocks} + blocks_per_ckpt: ${model.blocks_per_ckpt} + inf: 1e8 + +# Template Embedder +template_embedder: + no_blocks: 2 + c_template: 64 + c_z: ${model.c_pair} + clear_cache_between_blocks: ${model.clear_cache_between_blocks} + +# PairformerStack +pairformer_stack: + c_s: ${model.c_token} + c_z: ${model.c_pair} + no_blocks: 48 + c_hidden_mul: ${model.c_hidden_tri_mul} + c_hidden_pair_attn: ${model.c_hidden_pair_attn} + no_heads_tri_attn: ${model.no_heads_tri_attn} + no_heads_single_attn: ${model.no_heads_single_attn} + transition_n: ${model.transition_n} + pair_dropout: ${model.pair_dropout} + fuse_projection_weights: ${model.fuse_projection_weights} + blocks_per_ckpt: ${model.blocks_per_ckpt} + clear_cache_between_blocks: false + inf: 1e8 + +# Diffusion module +diffusion_module: + c_atom: ${model.c_atom} + c_atompair: ${model.c_atompair} + c_token: ${model.c_token} + c_tokenpair: ${model.c_pair} + atom_encoder_blocks: 3 + atom_encoder_heads: 16 + dropout: 0.0 + atom_attention_n_queries: 32 # TODO: with sliding window attention this is not used. + atom_attention_n_keys: 128 + atom_decoder_blocks: 3 + atom_decoder_heads: 16 + token_transformer_blocks: 24 + token_transformer_heads: 16 + sd_data: 16.0 + s_max: 160.0 + s_min: 0.0004 + p: 7.0 + clear_cache_between_blocks: ${model.clear_cache_between_blocks} + blocks_per_ckpt: ${model.blocks_per_ckpt} + +confidence_head: + c_s: 384 # ${model.c_token} + c_z: ${model.c_pair} + no_blocks: 4 + no_bins_pde: 64 + no_bins_plddt: 64 + no_bins_pae: 64 + c_hidden_mul: ${model.c_hidden_tri_mul} + c_hidden_pair_attn: ${model.c_hidden_pair_attn} + no_heads_tri_attn: ${model.no_heads_tri_attn} + no_heads_single_attn: ${model.no_heads_single_attn} + transition_n: ${model.transition_n} + pair_dropout: ${model.pair_dropout} + fuse_projection_weights: ${model.fuse_projection_weights} + +distogram_head: + c_z: ${model.c_pair} + no_bins: 64 # Exponential moving average decay rate ema_decay: 0.999 diff --git a/configs/model/big-proteus.yaml b/configs/model/big-proteus.yaml index ded62bf..b3390f5 100644 --- a/configs/model/big-proteus.yaml +++ b/configs/model/big-proteus.yaml @@ -1,35 +1,9 @@ _target_: src.models.proteus_module.ProteusLitModule -optimizer: - _target_: deepspeed.ops.adam.FusedAdam # torch.optim.Adam # - _partial_: true - lr: 0.0018 - betas: - - 0.9 - - 0.95 - eps: 1e-08 - weight_decay: 0.0 - -scheduler: - _target_: src.utils.lr_schedulers.AlphaFoldLRScheduler - _partial_: true - last_epoch: -1 - verbose: false - base_lr: 0.0 # the starting learning rate - max_lr: 0.0018 - warmup_no_steps: 1000 - start_decay_after_n_steps: 50_000 - decay_every_n_steps: 50_000 - decay_factor: 0.95 - -# Loss configs -loss: - mse_loss: - sd_data: 16.0 - weight: 4.0 - smooth_lddt_loss: - weight: 4.0 - epsilon: 1e-5 +defaults: + - /optimizer/fused_adam + - /scheduler/alphafold3_lr + - /loss/alphafold3_loss model: _target_: src.models.proteus_module.Proteus diff --git a/configs/model/mini-alphafold3.yaml b/configs/model/mini-alphafold3.yaml index 09bc110..7b3a645 100644 --- a/configs/model/mini-alphafold3.yaml +++ b/configs/model/mini-alphafold3.yaml @@ -1,176 +1,14 @@ -# AlphaFold3 configs -# _target_: src.models.model_wrapper.AlphaFoldWrapper -# config: -optimizer: - _target_: deepspeed.ops.adam.FusedAdam # torch.optim.Adam # - _partial_: true - lr: 0.0018 - betas: - - 0.9 - - 0.95 - eps: 1e-08 - weight_decay: 0.0 +# Mini AlphaFold3 configs +defaults: + - /model/alphafold3 + - /loss/alphafold3_loss + - /scheduler/alphafold3_lr -scheduler: - _target_: src.utils.lr_schedulers.AlphaFoldLRScheduler - _partial_: true - last_epoch: -1 - verbose: false - base_lr: 0.0 # the starting learning rate - max_lr: 0.0018 - warmup_no_steps: 1000 - start_decay_after_n_steps: 50_000 - decay_every_n_steps: 50_000 - decay_factor: 0.95 - -# Loss configs -loss: - mse_loss: - sd_data: 16.0 - weight: 4.0 - smooth_lddt_loss: - weight: 4.0 - epsilon: 1e-5 - - distogram: - min_bin: 0.0 - max_bin: 32.0 - no_bins: 64 - eps: 0.000006 # 1e-6 - weight: 0.03 - - experimentally_resolved: - eps: 0.00000001 # 1e-8, - # min_resolution: 0.1, - # max_resolution: 3.0, - weight: 0.0004 - - plddt_loss: - min_resolution: 0.1 - max_resolution: 3.0 - cutoff: 15.0 - no_bins": 50 - eps: 0.0000000001 # 1e-10, - weight: 0.0004 - - -# TODO: fix the model.model notation in interpolation model: - c_token: 128 # the token representation dim original=384 - c_pair: 128 # the pair representation dim - c_atom: 128 # the atom representation dim - c_atompair: 16 # the atom pair representation dim - - # Pair stack parameters (used in Pairformer, MSA module, and Confidence head) - c_hidden_tri_mul: 128 # the hidden dim for the triangle multiplicative update - c_hidden_pair_attn: 32 # the hidden dim for the pair attention ${common.c_hidden_pair_attn} - no_heads_tri_attn: 4 - transition_n: 4 - pair_dropout: 0.25 - fuse_projection_weights: false - blocks_per_ckpt: 1 # number of blocks per checkpoint, if none, no checkpointing - clear_cache_between_blocks: false # whether to clear GPU memory cache between blocks - # Pairformer attention pair bias - no_heads_single_attn: 16 - - # Input Embedder - input_embedder: - c_token: ${model.model.c_token} - c_trunk_pair: ${model.model.c_pair} - c_atom: ${model.model.c_atom} - c_atompair: ${model.model.c_atompair} - - # MSA module - msa_module: - no_blocks: 4 - c_msa: 64 - c_token: ${model.model.c_token} - c_z: ${model.model.c_pair} - c_hidden: 32 - no_heads: 8 - c_hidden_tri_mul: ${model.model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.model.no_heads_tri_attn} - transition_n: ${model.model.transition_n} - pair_dropout: ${model.model.pair_dropout} - fuse_projection_weights: ${model.model.fuse_projection_weights} - clear_cache_between_blocks: ${model.model.clear_cache_between_blocks} - blocks_per_ckpt: ${model.model.blocks_per_ckpt} - inf: 1e8 - - # Template Embedder - template_embedder: - no_blocks: 2 - c_template: 64 - c_z: ${model.model.c_pair} - clear_cache_between_blocks: ${model.model.clear_cache_between_blocks} - - # PairformerStack + c_token: 128 # Reduced from 384 + pairformer_stack: - c_s: ${model.model.c_token} - c_z: ${model.model.c_pair} - no_blocks: 12 - c_hidden_mul: ${model.model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.model.no_heads_tri_attn} - no_heads_single_attn: ${model.model.no_heads_single_attn} - transition_n: ${model.model.transition_n} - pair_dropout: ${model.model.pair_dropout} - fuse_projection_weights: ${model.model.fuse_projection_weights} - blocks_per_ckpt: ${model.model.blocks_per_ckpt} - clear_cache_between_blocks: false - inf: 1e8 + no_blocks: 12 # Reduced from 48 - # Diffusion module diffusion_module: - c_atom: ${model.model.c_atom} - c_atompair: ${model.model.c_atompair} - c_token: ${model.model.c_token} - c_tokenpair: ${model.model.c_pair} - atom_encoder_blocks: 3 - atom_encoder_heads: 16 - dropout: 0.0 - atom_attention_n_queries: 32 - atom_attention_n_keys: 128 - atom_decoder_blocks: 3 - atom_decoder_heads: 16 - token_transformer_blocks: 6 - token_transformer_heads: 16 - sd_data: 16.0 - s_max: 160.0 - s_min: 0.0004 - p: 7.0 - clear_cache_between_blocks: ${model.model.clear_cache_between_blocks} - blocks_per_ckpt: ${model.model.blocks_per_ckpt} - - confidence_head: - c_s: ${model.model.c_token} - c_z: ${model.model.c_pair} - no_blocks: 4 - no_bins_pde: 64 - no_bins_plddt: 64 - no_bins_pae: 64 - c_hidden_mul: ${model.model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.model.no_heads_tri_attn} - no_heads_single_attn: ${model.model.no_heads_single_attn} - transition_n: ${model.model.transition_n} - pair_dropout: ${model.model.pair_dropout} - fuse_projection_weights: ${model.model.fuse_projection_weights} - - distogram_head: - c_z: ${model.model.c_pair} - no_bins: 64 - -# Exponential moving average decay rate -ema_decay: 0.999 - -globals: - chunk_size: null # 4 - # Use DeepSpeed memory-efficient attention kernel in supported modules. - use_deepspeed_evo_attention: true - samples_per_trunk: 48 # Number of diffusion module replicas per trunk - rollout_samples_per_trunk: 1 # Number of mini rollouts per trunk - eps: 0.00000001 - # internal precision of float32 matrix multiplications. "high" or "medium" will utilize Tensor cores - matmul_precision: "high" + token_transformer_blocks: 6 # Reduced from 24 diff --git a/configs/model/mnist.yaml b/configs/model/mnist.yaml deleted file mode 100644 index 6f9c2fa..0000000 --- a/configs/model/mnist.yaml +++ /dev/null @@ -1,25 +0,0 @@ -_target_: src.models.mnist_module.MNISTLitModule - -optimizer: - _target_: torch.optim.Adam - _partial_: true - lr: 0.001 - weight_decay: 0.0 - -scheduler: - _target_: torch.optim.lr_scheduler.ReduceLROnPlateau - _partial_: true - mode: min - factor: 0.1 - patience: 10 - -net: - _target_: src.models.components.simple_dense_net.SimpleDenseNet - input_size: 784 - lin1_size: 64 - lin2_size: 128 - lin3_size: 64 - output_size: 10 - -# compile model for faster training with pytorch 2.0 -compile: false diff --git a/configs/model/proteus.yaml b/configs/model/proteus.yaml index 53380d4..85c32bb 100644 --- a/configs/model/proteus.yaml +++ b/configs/model/proteus.yaml @@ -1,35 +1,9 @@ _target_: src.models.proteus_module.ProteusLitModule -optimizer: - _target_: torch.optim.Adam # deepspeed.ops.adam.FusedAdam - _partial_: true - lr: 0.0018 - betas: - - 0.9 - - 0.95 - eps: 1e-08 - weight_decay: 0.0 - -scheduler: - _target_: src.utils.lr_schedulers.AlphaFoldLRScheduler - _partial_: true - last_epoch: -1 - verbose: false - base_lr: 0.0 # the starting learning rate - max_lr: 0.0018 - warmup_no_steps: 1000 - start_decay_after_n_steps: 50_000 - decay_every_n_steps: 50_000 - decay_factor: 0.95 - -# Loss configs -loss: - mse_loss: - sd_data: 16.0 - weight: 4.0 - smooth_lddt_loss: - weight: 4.0 - epsilon: 1e-5 +defaults: + - /optimizer/fused_adam + - /scheduler/alphafold_lr + - /loss/proteus_loss model: _target_: src.models.proteus_module.Proteus diff --git a/configs/optimizer/adam.yaml b/configs/optimizer/adam.yaml new file mode 100644 index 0000000..6e28137 --- /dev/null +++ b/configs/optimizer/adam.yaml @@ -0,0 +1,10 @@ +# FusedAdam optimizer +optimizer: + _target_: torch.optim.Adam # + _partial_: true + lr: 0.0018 + betas: + - 0.9 + - 0.95 + eps: 1e-08 + weight_decay: 0.0 diff --git a/configs/optimizer/adamw.yaml b/configs/optimizer/adamw.yaml new file mode 100644 index 0000000..b394bfc --- /dev/null +++ b/configs/optimizer/adamw.yaml @@ -0,0 +1,7 @@ +# AdamW optimizer +defaults: + - adam + +optimizer: + _target_: torch.optim.AdamW + weight_decay: 1e-5 diff --git a/configs/optimizer/fused_adam.yaml b/configs/optimizer/fused_adam.yaml new file mode 100644 index 0000000..da64149 --- /dev/null +++ b/configs/optimizer/fused_adam.yaml @@ -0,0 +1,6 @@ +# FusedAdam optimizer +defaults: + - adam + +optimizer: + _target_: deepspeed.ops.adam.FusedAdam diff --git a/configs/scheduler/alphafold3_lr.yaml b/configs/scheduler/alphafold3_lr.yaml new file mode 100644 index 0000000..8d1af4b --- /dev/null +++ b/configs/scheduler/alphafold3_lr.yaml @@ -0,0 +1,12 @@ +# AlphaFold3 LR scheduler +scheduler: + _target_: src.utils.lr_schedulers.AlphaFoldLRScheduler + _partial_: true + last_epoch: -1 + verbose: false + base_lr: 0.0 # the starting learning rate + max_lr: 0.0018 + warmup_no_steps: 1000 + start_decay_after_n_steps: 50_000 + decay_every_n_steps: 50_000 + decay_factor: 0.95 \ No newline at end of file diff --git a/configs/train_af3.yaml b/configs/train_alphafold3.yaml similarity index 100% rename from configs/train_af3.yaml rename to configs/train_alphafold3.yaml diff --git a/configs/trainer/deepspeed.yaml b/configs/trainer/deepspeed.yaml index 91ca2b6..0917f18 100644 --- a/configs/trainer/deepspeed.yaml +++ b/configs/trainer/deepspeed.yaml @@ -4,7 +4,7 @@ defaults: accelerator: gpu devices: auto -precision: 'bf16-mixed' # 'bf16-true' # 'transformer-engine', 'transformer-engine-float16', '16-true', '16-mixed', 'bf16-true', +precision: 32-true # 'bf16-true' # 'transformer-engine', 'transformer-engine-float16', '16-true', '16-mixed', 'bf16-true', # 'bf16-mixed', '32-true', # DeepSpeedStrategy diff --git a/src/models/components/atom_attention.py b/src/models/components/atom_attention.py index d0d4ca4..21f0e75 100644 --- a/src/models/components/atom_attention.py +++ b/src/models/components/atom_attention.py @@ -306,8 +306,8 @@ def forward( atom_pair_local: Tensor, mask: Optional[Tensor] = None ) -> Tuple[Tensor, Tensor, Tensor]: - a = self.atom_attention(atom_single, atom_proj, atom_pair_local, mask) - atom_single = add(a, self.transition(atom_single, atom_proj), inplace=False) + atom_single = atom_single + self.atom_attention(atom_single, atom_proj, atom_pair_local, mask) + atom_single = add(atom_single, self.transition(atom_single, atom_proj), inplace=False) return atom_single, atom_proj, atom_pair_local diff --git a/src/models/diffusion_transformer.py b/src/models/diffusion_transformer.py index 2c9091e..a5ee9cd 100644 --- a/src/models/diffusion_transformer.py +++ b/src/models/diffusion_transformer.py @@ -60,7 +60,7 @@ def forward( TODO: the single_proj and pair_repr do not actually change as a result of this function. Returning them here is a bit misleading. Also, saving them between blocks is unnecessary. """ - b = self.attention_block( + single_repr = single_repr + self.attention_block( single_repr=single_repr, single_proj=single_proj, pair_repr=pair_repr, @@ -69,7 +69,7 @@ def forward( ) single_repr = add( - b, + single_repr, self.conditioned_transition_block(single_repr, single_proj), inplace=False ) diff --git a/src/models/model.py b/src/models/model.py index d99623d..92a10cd 100644 --- a/src/models/model.py +++ b/src/models/model.py @@ -17,7 +17,7 @@ class AlphaFold3(nn.Module): def __init__(self, config): super(AlphaFold3, self).__init__() self.globals = config.globals - self.config = config.model + self.config = config self.input_embedder = InputEmbedder( **self.config["input_embedder"] diff --git a/src/models/proteus_module.py b/src/models/proteus_module.py index bb7a47a..7604879 100644 --- a/src/models/proteus_module.py +++ b/src/models/proteus_module.py @@ -1,5 +1,4 @@ -from typing import Any, Dict - +from typing import Any, Dict, Optional import torch from torch import nn import hydra @@ -88,8 +87,10 @@ def __init__(self, config): self.ema = ExponentialMovingAverage( model=self.model, decay=config.ema_decay ) - self.last_lr_step = -1 + self.cached_weights = None + + self.last_lr_step = -1 # Save hyperparameters self.save_hyperparameters(logger=False) @@ -111,6 +112,9 @@ def on_train_start(self) -> None: # so it's worth to make sure validation metrics don't store results from these checks self.val_loss.reset() + # Log gradients, parameter histograms, and model topology + self.logger.watch(self.model, log="all") + def model_step( self, batch: Dict[str, Any] ) -> torch.Tensor: @@ -173,32 +177,8 @@ def on_train_epoch_end(self) -> None: """Lightning hook that is called when a training epoch ends.""" pass - def on_before_zero_grad(self, optimizer: torch.optim.Optimizer) -> None: - """ - 1. Updates the EMA of the model parameters. - 2. Keeps an eye on weight norms during training. - """ - self.ema.update_parameters(self.model) - - # Log weight norms - weight_norms = {} - for name, param in self.named_parameters(): - weight_norms[f"{name}_abs_mean"] = param.abs().mean().item() - self.log_dict(weight_norms) - - def on_before_optimizer_step(self, optimizer): - """Keeps an eye on gradient norms during training.""" - norms = grad_norm(self.model, norm_type=2) - self.log_dict(norms) - def validation_step(self, batch: Dict[str, torch.Tensor], batch_idx: int) -> None: - """Perform a single validation step on a batch of data from the validation set. - Args: - batch: A batch of data (a tuple) containing the x tensor of images and target - labels. - batch_idx: - The index of the current batch. - """ + """Perform a single validation step on a batch of data from the validation set.""" loss = self.model_step(batch) @@ -206,12 +186,6 @@ def validation_step(self, batch: Dict[str, torch.Tensor], batch_idx: int) -> Non self.val_loss(loss) self.log("val/loss", self.val_loss, on_step=False, on_epoch=True, prog_bar=True) - def on_validation_epoch_end(self): - # Restore the model weights to normal - # self.model.load_state_dict(self.cached_weights) - # self.cached_weights = None - pass - def test_step(self, batch: Dict[str, torch.Tensor], batch_idx: int) -> None: """Perform a single test step on a batch of data from the test set.""" loss = self.model_step(batch) @@ -220,10 +194,6 @@ def test_step(self, batch: Dict[str, torch.Tensor], batch_idx: int) -> None: self.test_loss(loss) self.log("test/loss", self.test_loss, on_step=False, on_epoch=True, prog_bar=True) - def on_test_epoch_end(self) -> None: - """Lightning hook that is called when a test epoch ends.""" - pass - def setup(self, stage: str) -> None: """Lightning hook that is called at the beginning of fit (train + validate), validate, test, or predict. @@ -250,17 +220,55 @@ def configure_optimizers(self): # "frequency": 1, }, } + + def on_before_zero_grad(self, optimizer: torch.optim.Optimizer) -> None: + """ + Keeps an eye on weight norms during training. + """ + # Log weight norms + weight_norms = {} + for name, param in self.named_parameters(): + weight_norms[f"{name}_abs_mean"] = param.abs().mean().item() + self.log_dict(weight_norms) + + def on_before_optimizer_step(self, optimizer): + """Keeps an eye on gradient norms during training.""" + norms = grad_norm(self.model, norm_type=2) + self.log_dict(norms) + + def on_train_batch_end(self, outputs, batch, batch_idx): + # Update EMA after each training batch + self.ema.update(self.model) + + def on_train_batch_start(self, batch: Any, batch_idx: int): + # Fetch the EMA weights to the device + if self.ema.device != batch["residue_index"].device: + self.ema.to(batch["residue_index"].device) + + def on_validation_epoch_start(self): + # At the start of validation, load the EMA weights + if self.cached_weights is None: + # model.state_dict() contains references to model weights rather + # than copies. Therefore, we need to clone them before calling + # load_state_dict(). + clone_param = lambda t: t.detach().clone() + self.cached_weights = tensor_tree_map(clone_param, self.model.state_dict()) + self.model.load_state_dict(self.ema.params) + + def on_validation_epoch_end(self): + # Restore original model weights + if self.cached_weights is not None: + self.model.load_state_dict(self.cached_weights) + self.cached_weights = None def on_load_checkpoint(self, checkpoint: Dict[str, Any]): """Lightning hook that is called when loading a checkpoint.""" - # ema = checkpoint["ema"] - # self.ema.load_state_dict(ema) - pass + ema = checkpoint["ema"] + self.ema.load_state_dict(ema) def on_save_checkpoint(self, checkpoint: Dict[str, Any]): """Lightning hook that is called when saving a checkpoint.""" - # checkpoint["ema"] = self.ema.state_dict() - pass + checkpoint["ema"] = self.ema.state_dict() def reshape_features(batch): diff --git a/src/train_alphafold.py b/src/train_alphafold.py index 2a2e1d8..6771592 100644 --- a/src/train_alphafold.py +++ b/src/train_alphafold.py @@ -100,7 +100,7 @@ def train(cfg: DictConfig) -> Tuple[Dict[str, Any], Dict[str, Any]]: return metric_dict, object_dict -@hydra.main(version_base="1.3", config_path="../configs", config_name="train_af3.yaml") +@hydra.main(version_base="1.3", config_path="../configs", config_name="train_alphafold3.yaml") def main(cfg: DictConfig) -> Optional[float]: """Main entry point for training. diff --git a/src/utils/exponential_moving_average.py b/src/utils/exponential_moving_average.py index 1f0fcbb..ccba60e 100644 --- a/src/utils/exponential_moving_average.py +++ b/src/utils/exponential_moving_average.py @@ -2,11 +2,10 @@ import copy import torch import torch.nn as nn -from torch.optim.swa_utils import AveragedModel from src.utils.tensor_utils import tensor_tree_map -class ExponentialMovingAverage(AveragedModel): +class ExponentialMovingAverage: """ Maintains moving averages of parameters with exponential decay @@ -27,8 +26,45 @@ def __init__(self, model: nn.Module, decay: float): A value (usually close to 1.) by which updates are weighted as part of the above formula """ - super(ExponentialMovingAverage, self).__init__( - model=model, - multi_avg_fn=torch.optim.swa_utils.get_ema_multi_avg_fn(decay) - ) + super(ExponentialMovingAverage, self).__init__() + + clone_param = lambda t: t.clone().detach() + self.params = tensor_tree_map(clone_param, model.state_dict()) self.decay = decay + self.device = next(model.parameters()).device + + def to(self, device): + self.params = tensor_tree_map(lambda t: t.to(device), self.params) + self.device = device + + def _update_state_dict_(self, update, state_dict): + with torch.no_grad(): + for k, v in update.items(): + stored = state_dict[k] + if not isinstance(v, torch.Tensor): + self._update_state_dict_(v, stored) + else: + diff = stored - v + diff *= 1 - self.decay + stored -= diff + + def update(self, model: torch.nn.Module) -> None: + """ + Updates the stored parameters using the state dict of the provided + module. The module should have the same structure as that used to + initialize the ExponentialMovingAverage object. + """ + self._update_state_dict_(model.state_dict(), self.params) + + def load_state_dict(self, state_dict: OrderedDict) -> None: + for k in state_dict["params"].keys(): + self.params[k] = state_dict["params"][k].clone() + self.decay = state_dict["decay"] + + def state_dict(self) -> OrderedDict: + return OrderedDict( + { + "params": self.params, + "decay": self.decay, + } + ) From bd663265b814d2beeaac133e7e0e7665e77b5838 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:52:18 -0700 Subject: [PATCH 02/16] Added validation metrics and tests --- src/utils/validation_metrics.py | 242 +-- tests/test_data/1bn1.pdb | 2492 ++++++++++++++++++++++++++++++ tests/test_validation_metrics.py | 173 +++ 3 files changed, 2813 insertions(+), 94 deletions(-) create mode 100644 tests/test_data/1bn1.pdb create mode 100644 tests/test_validation_metrics.py diff --git a/src/utils/validation_metrics.py b/src/utils/validation_metrics.py index 4bd9abe..c8d70aa 100644 --- a/src/utils/validation_metrics.py +++ b/src/utils/validation_metrics.py @@ -1,42 +1,42 @@ -# Copyright 2021 AlQuraishi Laboratory -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. import torch -from src.utils.tensor_utils import permute_final_dims +from typing import Optional -# TODO: these functions are not resilient to batch size > 1. Gotta fix that +def drmsd(structure_1: torch.Tensor, structure_2: torch.Tensor, mask: Optional[torch.Tensor] = None) -> torch.Tensor: + """ + Calculate the distance Root Mean Square Deviation (dRMSD) between two structures. -def drmsd(structure_1, structure_2, mask=None): - def prep_d(structure): - d = structure[..., :, None, :] - structure[..., None, :, :] - d = d ** 2 - d = torch.sqrt(torch.sum(d, dim=-1)) - return d + Args: + structure_1 (torch.Tensor): First structure of shape [..., N, 3] + structure_2 (torch.Tensor): Second structure of shape [..., N, 3] + mask (Optional[torch.Tensor]): Mask of shape [..., N] indicating valid positions - d1 = prep_d(structure_1) - d2 = prep_d(structure_2) + Returns: + torch.Tensor: The dRMSD between the two structures + """ + def pairwise_distances(structure: torch.Tensor) -> torch.Tensor: + """Calculate pairwise distances within a structure.""" + diff = structure[..., :, None, :] - structure[..., None, :, :] + return torch.norm(diff, dim=-1) + + d1 = pairwise_distances(structure_1) + d2 = pairwise_distances(structure_2) + + squared_diff = (d1 - d2) ** 2 - rmsd = d1 - d2 - rmsd = rmsd ** 2 if mask is not None: - rmsd = rmsd * (mask[..., None] * mask[..., None, :]) - rmsd = torch.sum(rmsd, dim=(-1, -2)) - n = d1.shape[-1] if mask is None else torch.min(torch.sum(mask, dim=-1)) - rmsd = rmsd * (1 / (n * (n - 1))) if n > 1 else (rmsd * 0.) - rmsd = torch.sqrt(rmsd) + mask_2d = mask[..., None] * mask[..., None, :] + squared_diff = squared_diff * mask_2d + n = torch.sum(mask, dim=-1) + else: + n = d1.shape[-1] + + sum_squared_diff = torch.sum(squared_diff, dim=(-1, -2)) - return rmsd + # Avoid division by zero + drmsd = torch.sqrt(sum_squared_diff / (n * (n - 1) + 1e-8)) + + return drmsd def drmsd_np(structure_1, structure_2, mask=None): @@ -48,81 +48,135 @@ def drmsd_np(structure_1, structure_2, mask=None): return drmsd(structure_1, structure_2, mask) -def gdt(p1, p2, mask, cutoffs): - n = torch.sum(mask, dim=-1) +def lddt( + all_atom_pred_pos: torch.Tensor, + all_atom_positions: torch.Tensor, + all_atom_mask: torch.Tensor, + cutoff: float = 15.0, + eps: float = 1e-10, + per_residue: bool = True, +) -> torch.Tensor: + """ + Compute the local distance difference test (LDDT) score. + + Algorithm steps: + 1. Compute pairwise distance matrices for true and predicted structures + 2. Identify pairs within the cutoff distance + 3. Calculate absolute differences between true and predicted distances + 4. Score the differences based on predefined thresholds + 5. Normalize the scores + + Args: + all_atom_pred_pos: Predicted atom positions [..., N, 3] + all_atom_positions: True atom positions [..., N, 3] + all_atom_mask: Mask for valid atoms [..., N] + cutoff: Distance cutoff for considering atom pairs + eps: Small value to avoid division by zero + per_residue: If True, return per-residue scores + + Returns: + LDDT scores + """ + # Compute pairwise distance matrices + dmat_true = torch.cdist(all_atom_positions, all_atom_positions) + dmat_pred = torch.cdist(all_atom_pred_pos, all_atom_pred_pos) + + # Create mask for pairs within cutoff + dists_to_score = (dmat_true < cutoff).float() + + # Apply atom mask + atom_mask_2d = all_atom_mask.unsqueeze(-1) * all_atom_mask.unsqueeze(-2) + dists_to_score = dists_to_score * atom_mask_2d + + # Remove self-interactions + eye = torch.eye(dists_to_score.shape[-1], device=dists_to_score.device) + eye = eye.view(*([1] * (dists_to_score.dim() - 2)), *eye.shape) + dists_to_score = dists_to_score * (1 - eye) + + # Calculate absolute differences + dist_l1 = torch.abs(dmat_true - dmat_pred) + + # Score the differences + score = torch.zeros_like(dist_l1) + for threshold in [0.5, 1.0, 2.0, 4.0]: + score += (dist_l1 < threshold).float() + score *= 0.25 # Normalize by number of thresholds + + # Apply scoring mask and sum + scored_pairs = dists_to_score * score + + if per_residue: + # Compute per-residue scores + residue_scores = scored_pairs.sum(dim=-1) + residue_weights = dists_to_score.sum(dim=-1) + lddt_score = residue_scores / (residue_weights + eps) + else: + # Compute global score + lddt_score = scored_pairs.sum(dim=(-2, -1)) / (dists_to_score.sum(dim=(-2, -1)) + eps) + + return lddt_score + +def gdt(p1, p2, mask, cutoffs): + """ + Calculate the Global Distance Test (GDT) score for protein structures. + + Args: + p1 (torch.Tensor): Coordinates of the first structure [..., N, 3]. + p2 (torch.Tensor): Coordinates of the second structure [..., N, 3]. + mask (torch.Tensor): Mask for valid residues [..., N]. + cutoffs (list): List of distance cutoffs for GDT calculation. + + Returns: + torch.Tensor: GDT score [...]. + """ + # Ensure inputs are float p1 = p1.float() p2 = p2.float() + mask = mask.float() + + # Calculate number of valid residues per batch + n = torch.sum(mask, dim=-1) + + # Calculate pairwise distances distances = torch.sqrt(torch.sum((p1 - p2)**2, dim=-1)) + scores = [] for c in cutoffs: - score = torch.sum((distances <= c) * mask, dim=-1) / n - score = torch.mean(score) + # Calculate score for each cutoff, accounting for the mask + score = torch.sum((distances <= c).float() * mask, dim=-1) / (n + 1e-8) scores.append(score) - return sum(scores) / len(scores) + # Stack scores and average across cutoffs + scores = torch.stack(scores, dim=-1) + return torch.mean(scores, dim=-1) def gdt_ts(p1, p2, mask): - return gdt(p1, p2, mask, [1., 2., 4., 8.]) + """ + Calculate the Global Distance Test Total Score (GDT_TS). + Args: + p1 (torch.Tensor): Coordinates of the first structure [..., N, 3]. + p2 (torch.Tensor): Coordinates of the second structure [..., N, 3]. + mask (torch.Tensor): Mask for valid residues [..., N]. -def gdt_ha(p1, p2, mask): - return gdt(p1, p2, mask, [0.5, 1., 2., 4.]) - - -def lddt( - all_atom_pred_pos: torch.Tensor, - all_atom_positions: torch.Tensor, - all_atom_mask: torch.Tensor, - cutoff: float = 15.0, - eps: float = 1e-10, - per_residue: bool = True, -) -> torch.Tensor: - n = all_atom_mask.shape[-2] - dmat_true = torch.sqrt( - eps - + torch.sum( - ( - all_atom_positions[..., None, :] - - all_atom_positions[..., None, :, :] - ) - ** 2, - dim=-1, - ) - ) - - dmat_pred = torch.sqrt( - eps - + torch.sum( - ( - all_atom_pred_pos[..., None, :] - - all_atom_pred_pos[..., None, :, :] - ) - ** 2, - dim=-1, - ) - ) - dists_to_score = ( - (dmat_true < cutoff) - * all_atom_mask - * permute_final_dims(all_atom_mask, (1, 0)) - * (1.0 - torch.eye(n, device=all_atom_mask.device)) - ) - - dist_l1 = torch.abs(dmat_true - dmat_pred) - - score = ( - (dist_l1 < 0.5).type(dist_l1.dtype) - + (dist_l1 < 1.0).type(dist_l1.dtype) - + (dist_l1 < 2.0).type(dist_l1.dtype) - + (dist_l1 < 4.0).type(dist_l1.dtype) - ) - score = score * 0.25 - - dims = (-1,) if per_residue else (-2, -1) - norm = 1.0 / (eps + torch.sum(dists_to_score, dim=dims)) - score = norm * (eps + torch.sum(dists_to_score * score, dim=dims)) + Returns: + torch.Tensor: GDT_TS score [...]. + """ + return gdt(p1, p2, mask, [1., 2., 4., 8.]) - return score +def gdt_ha(p1, p2, mask): + """ + Calculate the Global Distance Test High Accuracy (GDT_HA) score. + + Args: + p1 (torch.Tensor): Coordinates of the first structure [..., N, 3]. + p2 (torch.Tensor): Coordinates of the second structure [..., N, 3]. + mask (torch.Tensor): Mask for valid residues [..., N]. + + Returns: + torch.Tensor: GDT_HA score [...]. + """ + return gdt(p1, p2, mask, [0.5, 1., 2., 4.]) \ No newline at end of file diff --git a/tests/test_data/1bn1.pdb b/tests/test_data/1bn1.pdb new file mode 100644 index 0000000..caa2b75 --- /dev/null +++ b/tests/test_data/1bn1.pdb @@ -0,0 +1,2492 @@ +ATOM 1 N HIS A 0 8.444 1.077 7.868 1.00 33.00 N +ATOM 2 CA HIS A 0 9.437 0.643 8.901 1.00 30.30 C +ATOM 3 C HIS A 0 8.897 -0.532 9.696 1.00 28.54 C +ATOM 4 O HIS A 0 9.202 -1.697 9.411 1.00 29.67 O +ATOM 5 N TRP A 1 8.054 -0.223 10.669 1.00 24.41 N +ATOM 6 CA TRP A 1 7.458 -1.244 11.509 1.00 20.56 C +ATOM 7 C TRP A 1 6.495 -2.101 10.692 1.00 20.27 C +ATOM 8 O TRP A 1 5.997 -1.678 9.638 1.00 21.18 O +ATOM 9 CB TRP A 1 6.721 -0.585 12.678 1.00 17.55 C +ATOM 10 CG TRP A 1 5.501 0.210 12.267 1.00 15.46 C +ATOM 11 CD1 TRP A 1 5.451 1.535 11.927 1.00 12.58 C +ATOM 12 CD2 TRP A 1 4.159 -0.277 12.174 1.00 14.33 C +ATOM 13 CE2 TRP A 1 3.348 0.807 11.775 1.00 13.42 C +ATOM 14 CE3 TRP A 1 3.562 -1.525 12.395 1.00 13.58 C +ATOM 15 NE1 TRP A 1 4.162 1.901 11.633 1.00 12.53 N +ATOM 16 CZ2 TRP A 1 1.975 0.680 11.594 1.00 12.85 C +ATOM 17 CZ3 TRP A 1 2.194 -1.650 12.217 1.00 14.07 C +ATOM 18 CH2 TRP A 1 1.417 -0.554 11.821 1.00 12.40 C +ATOM 19 H TRP A 1 7.816 0.700 10.875 1.00 0.00 H +ATOM 20 HE1 TRP A 1 3.872 2.814 11.415 1.00 0.00 H +ATOM 21 N GLY A 2 6.222 -3.297 11.188 1.00 18.57 N +ATOM 22 CA GLY A 2 5.309 -4.185 10.503 1.00 17.45 C +ATOM 23 C GLY A 2 4.963 -5.322 11.429 1.00 17.83 C +ATOM 24 O GLY A 2 5.011 -5.176 12.656 1.00 15.24 O +ATOM 25 H GLY A 2 6.623 -3.605 12.031 1.00 0.00 H +ATOM 26 N TYR A 3 4.624 -6.464 10.843 1.00 17.64 N +ATOM 27 CA TYR A 3 4.268 -7.633 11.627 1.00 19.56 C +ATOM 28 C TYR A 3 5.146 -8.830 11.342 1.00 20.82 C +ATOM 29 O TYR A 3 4.868 -9.933 11.800 1.00 23.73 O +ATOM 30 CB TYR A 3 2.800 -7.971 11.413 1.00 15.87 C +ATOM 31 CG TYR A 3 1.894 -6.899 11.940 1.00 13.73 C +ATOM 32 CD1 TYR A 3 1.506 -6.896 13.278 1.00 11.04 C +ATOM 33 CD2 TYR A 3 1.414 -5.894 11.105 1.00 11.20 C +ATOM 34 CE1 TYR A 3 0.662 -5.925 13.778 1.00 11.89 C +ATOM 35 CE2 TYR A 3 0.556 -4.912 11.589 1.00 13.60 C +ATOM 36 CZ TYR A 3 0.183 -4.937 12.931 1.00 12.33 C +ATOM 37 OH TYR A 3 -0.677 -3.995 13.429 1.00 12.42 O +ATOM 38 H TYR A 3 4.618 -6.532 9.869 1.00 0.00 H +ATOM 39 HH TYR A 3 -1.021 -3.417 12.751 1.00 0.00 H +ATOM 40 N GLY A 4 6.225 -8.604 10.604 1.00 25.13 N +ATOM 41 CA GLY A 4 7.143 -9.682 10.280 1.00 28.24 C +ATOM 42 C GLY A 4 8.074 -9.935 11.446 1.00 30.15 C +ATOM 43 O GLY A 4 8.109 -9.162 12.405 1.00 31.67 O +ATOM 44 H GLY A 4 6.449 -7.698 10.316 1.00 0.00 H +ATOM 45 N LYS A 5 8.873 -10.988 11.358 1.00 32.95 N +ATOM 46 CA LYS A 5 9.786 -11.297 12.447 1.00 34.02 C +ATOM 47 C LYS A 5 10.861 -10.235 12.606 1.00 32.84 C +ATOM 48 O LYS A 5 11.321 -9.967 13.716 1.00 32.25 O +ATOM 49 CB LYS A 5 10.431 -12.670 12.253 1.00 38.08 C +ATOM 50 CG LYS A 5 11.029 -13.219 13.546 1.00 45.25 C +ATOM 51 CD LYS A 5 9.961 -13.240 14.655 1.00 48.36 C +ATOM 52 CE LYS A 5 10.559 -13.368 16.052 1.00 50.06 C +ATOM 53 NZ LYS A 5 9.506 -13.232 17.106 1.00 51.19 N1+ +ATOM 54 H LYS A 5 8.808 -11.570 10.577 1.00 0.00 H +ATOM 55 HZ1 LYS A 5 8.791 -13.976 16.978 1.00 0.00 H +ATOM 56 HZ2 LYS A 5 9.942 -13.326 18.045 1.00 0.00 H +ATOM 57 HZ3 LYS A 5 9.056 -12.297 17.024 1.00 0.00 H +ATOM 58 N HIS A 6 11.226 -9.589 11.506 1.00 30.92 N +ATOM 59 CA HIS A 6 12.271 -8.576 11.569 1.00 30.61 C +ATOM 60 C HIS A 6 11.845 -7.150 11.905 1.00 28.42 C +ATOM 61 O HIS A 6 12.669 -6.350 12.348 1.00 28.53 O +ATOM 62 CB HIS A 6 13.148 -8.637 10.312 1.00 33.82 C +ATOM 63 CG HIS A 6 13.975 -9.887 10.232 1.00 38.12 C +ATOM 64 CD2 HIS A 6 14.987 -10.335 11.016 1.00 38.93 C +ATOM 65 ND1 HIS A 6 13.741 -10.881 9.304 1.00 39.94 N +ATOM 66 CE1 HIS A 6 14.567 -11.890 9.524 1.00 41.09 C +ATOM 67 NE2 HIS A 6 15.334 -11.583 10.557 1.00 39.99 N +ATOM 68 H HIS A 6 10.755 -9.773 10.671 1.00 0.00 H +ATOM 69 HD1 HIS A 6 13.104 -10.858 8.556 1.00 0.00 H +ATOM 70 HE2 HIS A 6 16.039 -12.164 10.930 1.00 0.00 H +ATOM 71 N ASN A 7 10.556 -6.851 11.782 1.00 25.58 N +ATOM 72 CA ASN A 7 10.068 -5.512 12.093 1.00 22.22 C +ATOM 73 C ASN A 7 8.751 -5.564 12.865 1.00 20.91 C +ATOM 74 O ASN A 7 8.004 -4.585 12.900 1.00 20.22 O +ATOM 75 CB ASN A 7 9.876 -4.718 10.801 1.00 21.20 C +ATOM 76 CG ASN A 7 8.830 -5.332 9.889 1.00 21.61 C +ATOM 77 ND2 ASN A 7 8.469 -4.607 8.841 1.00 22.21 N +ATOM 78 OD1 ASN A 7 8.352 -6.448 10.120 1.00 20.10 O +ATOM 79 H ASN A 7 9.888 -7.504 11.484 1.00 0.00 H +ATOM 80 HD21 ASN A 7 7.812 -4.956 8.210 1.00 0.00 H +ATOM 81 HD22 ASN A 7 8.899 -3.727 8.753 1.00 0.00 H +ATOM 82 N GLY A 8 8.477 -6.710 13.479 1.00 19.68 N +ATOM 83 CA GLY A 8 7.245 -6.896 14.229 1.00 18.34 C +ATOM 84 C GLY A 8 7.170 -6.296 15.624 1.00 18.84 C +ATOM 85 O GLY A 8 8.115 -5.655 16.087 1.00 16.95 O +ATOM 86 H GLY A 8 9.080 -7.472 13.406 1.00 0.00 H +ATOM 87 N PRO A 9 6.074 -6.567 16.353 1.00 18.79 N +ATOM 88 CA PRO A 9 5.789 -6.090 17.709 1.00 19.96 C +ATOM 89 C PRO A 9 6.966 -6.120 18.674 1.00 20.92 C +ATOM 90 O PRO A 9 7.181 -5.176 19.424 1.00 21.29 O +ATOM 91 CB PRO A 9 4.666 -7.021 18.160 1.00 20.01 C +ATOM 92 CG PRO A 9 3.909 -7.238 16.901 1.00 19.27 C +ATOM 93 CD PRO A 9 5.024 -7.505 15.910 1.00 18.49 C +ATOM 94 N GLU A 10 7.747 -7.191 18.623 1.00 22.30 N +ATOM 95 CA GLU A 10 8.904 -7.357 19.499 1.00 23.81 C +ATOM 96 C GLU A 10 10.038 -6.353 19.239 1.00 22.67 C +ATOM 97 O GLU A 10 10.945 -6.197 20.060 1.00 23.64 O +ATOM 98 CB GLU A 10 9.424 -8.799 19.400 1.00 27.72 C +ATOM 99 CG GLU A 10 9.968 -9.215 18.019 1.00 35.52 C +ATOM 100 CD GLU A 10 8.897 -9.387 16.928 1.00 38.79 C +ATOM 101 OE1 GLU A 10 7.723 -9.673 17.253 1.00 39.71 O +ATOM 102 OE2 GLU A 10 9.245 -9.261 15.731 1.00 41.43 O1- +ATOM 103 H GLU A 10 7.492 -7.864 17.981 1.00 0.00 H +ATOM 104 N HIS A 11 9.965 -5.651 18.112 1.00 20.84 N +ATOM 105 CA HIS A 11 10.983 -4.679 17.726 1.00 19.28 C +ATOM 106 C HIS A 11 10.507 -3.250 17.908 1.00 18.27 C +ATOM 107 O HIS A 11 11.324 -2.325 17.979 1.00 17.41 O +ATOM 108 CB HIS A 11 11.337 -4.832 16.240 1.00 19.28 C +ATOM 109 CG HIS A 11 12.027 -6.113 15.896 1.00 21.93 C +ATOM 110 CD2 HIS A 11 11.535 -7.349 15.640 1.00 22.71 C +ATOM 111 ND1 HIS A 11 13.393 -6.205 15.737 1.00 21.84 N +ATOM 112 CE1 HIS A 11 13.714 -7.442 15.401 1.00 21.73 C +ATOM 113 NE2 HIS A 11 12.604 -8.156 15.336 1.00 23.39 N +ATOM 114 H HIS A 11 9.191 -5.783 17.542 1.00 0.00 H +ATOM 115 HD1 HIS A 11 14.048 -5.481 15.805 1.00 0.00 H +ATOM 116 HE2 HIS A 11 12.519 -9.108 15.080 1.00 0.00 H +ATOM 117 N TRP A 12 9.193 -3.068 17.993 1.00 16.79 N +ATOM 118 CA TRP A 12 8.612 -1.731 18.077 1.00 15.52 C +ATOM 119 C TRP A 12 9.205 -0.763 19.093 1.00 15.13 C +ATOM 120 O TRP A 12 9.398 0.418 18.796 1.00 14.98 O +ATOM 121 CB TRP A 12 7.095 -1.819 18.262 1.00 15.63 C +ATOM 122 CG TRP A 12 6.359 -2.440 17.102 1.00 17.17 C +ATOM 123 CD1 TRP A 12 6.878 -2.792 15.879 1.00 16.26 C +ATOM 124 CD2 TRP A 12 4.959 -2.761 17.052 1.00 16.07 C +ATOM 125 CE2 TRP A 12 4.698 -3.296 15.770 1.00 16.41 C +ATOM 126 CE3 TRP A 12 3.901 -2.646 17.967 1.00 14.57 C +ATOM 127 NE1 TRP A 12 5.885 -3.305 15.078 1.00 16.81 N +ATOM 128 CZ2 TRP A 12 3.414 -3.717 15.379 1.00 15.18 C +ATOM 129 CZ3 TRP A 12 2.623 -3.066 17.577 1.00 13.19 C +ATOM 130 CH2 TRP A 12 2.394 -3.591 16.297 1.00 13.30 C +ATOM 131 H TRP A 12 8.588 -3.840 18.001 1.00 0.00 H +ATOM 132 HE1 TRP A 12 6.013 -3.661 14.166 1.00 0.00 H +ATOM 133 N HIS A 13 9.548 -1.269 20.269 1.00 15.34 N +ATOM 134 CA HIS A 13 10.086 -0.425 21.338 1.00 17.18 C +ATOM 135 C HIS A 13 11.328 0.384 20.965 1.00 17.35 C +ATOM 136 O HIS A 13 11.589 1.421 21.562 1.00 17.28 O +ATOM 137 CB HIS A 13 10.383 -1.268 22.588 1.00 16.33 C +ATOM 138 CG HIS A 13 11.520 -2.231 22.410 1.00 18.61 C +ATOM 139 CD2 HIS A 13 11.590 -3.421 21.766 1.00 17.92 C +ATOM 140 ND1 HIS A 13 12.781 -2.001 22.922 1.00 18.56 N +ATOM 141 CE1 HIS A 13 13.577 -3.006 22.603 1.00 17.59 C +ATOM 142 NE2 HIS A 13 12.878 -3.880 21.900 1.00 18.55 N +ATOM 143 H HIS A 13 9.423 -2.226 20.375 1.00 0.00 H +ATOM 144 HD1 HIS A 13 13.061 -1.211 23.440 1.00 0.00 H +ATOM 145 HE2 HIS A 13 13.203 -4.726 21.516 1.00 0.00 H +ATOM 146 N LYS A 14 12.104 -0.101 20.002 1.00 16.89 N +ATOM 147 CA LYS A 14 13.324 0.594 19.603 1.00 18.94 C +ATOM 148 C LYS A 14 13.030 1.949 18.970 1.00 19.70 C +ATOM 149 O LYS A 14 13.770 2.909 19.167 1.00 19.71 O +ATOM 150 CB LYS A 14 14.160 -0.292 18.676 1.00 18.79 C +ATOM 151 CG LYS A 14 14.779 -1.484 19.401 1.00 17.20 C +ATOM 152 CD LYS A 14 15.496 -2.423 18.459 1.00 16.47 C +ATOM 153 CE LYS A 14 14.520 -3.217 17.621 1.00 15.02 C +ATOM 154 NZ LYS A 14 15.266 -4.054 16.645 1.00 15.35 N1+ +ATOM 155 H LYS A 14 11.852 -0.909 19.504 1.00 0.00 H +ATOM 156 HZ1 LYS A 14 15.918 -3.458 16.100 1.00 0.00 H +ATOM 157 HZ2 LYS A 14 15.812 -4.779 17.151 1.00 0.00 H +ATOM 158 HZ3 LYS A 14 14.594 -4.504 15.997 1.00 0.00 H +ATOM 159 N ASP A 15 11.938 2.029 18.221 1.00 20.24 N +ATOM 160 CA ASP A 15 11.551 3.288 17.603 1.00 20.74 C +ATOM 161 C ASP A 15 10.446 3.992 18.379 1.00 19.70 C +ATOM 162 O ASP A 15 10.299 5.204 18.269 1.00 21.46 O +ATOM 163 CB ASP A 15 11.118 3.072 16.159 1.00 22.80 C +ATOM 164 CG ASP A 15 12.289 2.774 15.251 1.00 27.12 C +ATOM 165 OD1 ASP A 15 13.134 3.679 15.069 1.00 26.06 O +ATOM 166 OD2 ASP A 15 12.372 1.634 14.744 1.00 30.81 O1- +ATOM 167 H ASP A 15 11.372 1.240 18.097 1.00 0.00 H +ATOM 168 N PHE A 16 9.663 3.235 19.148 1.00 17.94 N +ATOM 169 CA PHE A 16 8.570 3.808 19.933 1.00 16.80 C +ATOM 170 C PHE A 16 8.653 3.271 21.357 1.00 16.50 C +ATOM 171 O PHE A 16 7.982 2.305 21.703 1.00 17.24 O +ATOM 172 CB PHE A 16 7.212 3.447 19.309 1.00 16.46 C +ATOM 173 CG PHE A 16 7.128 3.727 17.839 1.00 15.46 C +ATOM 174 CD1 PHE A 16 6.798 4.997 17.376 1.00 16.05 C +ATOM 175 CD2 PHE A 16 7.450 2.734 16.910 1.00 14.14 C +ATOM 176 CE1 PHE A 16 6.799 5.280 16.004 1.00 13.95 C +ATOM 177 CE2 PHE A 16 7.455 3.004 15.544 1.00 12.34 C +ATOM 178 CZ PHE A 16 7.131 4.279 15.091 1.00 13.58 C +ATOM 179 H PHE A 16 9.815 2.271 19.193 1.00 0.00 H +ATOM 180 N PRO A 17 9.482 3.898 22.206 1.00 17.21 N +ATOM 181 CA PRO A 17 9.701 3.527 23.610 1.00 17.41 C +ATOM 182 C PRO A 17 8.424 3.356 24.444 1.00 18.35 C +ATOM 183 O PRO A 17 8.410 2.609 25.435 1.00 17.32 O +ATOM 184 CB PRO A 17 10.551 4.686 24.134 1.00 17.65 C +ATOM 185 CG PRO A 17 11.340 5.074 22.950 1.00 18.09 C +ATOM 186 CD PRO A 17 10.303 5.069 21.853 1.00 17.91 C +ATOM 187 N ILE A 18 7.351 4.036 24.044 1.00 17.26 N +ATOM 188 CA ILE A 18 6.085 3.940 24.761 1.00 16.54 C +ATOM 189 C ILE A 18 5.529 2.515 24.674 1.00 16.01 C +ATOM 190 O ILE A 18 4.601 2.167 25.391 1.00 15.15 O +ATOM 191 CB ILE A 18 5.049 4.968 24.229 1.00 16.83 C +ATOM 192 CG1 ILE A 18 3.928 5.171 25.248 1.00 18.96 C +ATOM 193 CG2 ILE A 18 4.450 4.509 22.906 1.00 17.72 C +ATOM 194 CD1 ILE A 18 4.393 5.800 26.534 1.00 20.50 C +ATOM 195 H ILE A 18 7.403 4.600 23.250 1.00 0.00 H +ATOM 196 N ALA A 19 6.110 1.696 23.795 1.00 15.83 N +ATOM 197 CA ALA A 19 5.703 0.301 23.625 1.00 16.48 C +ATOM 198 C ALA A 19 5.752 -0.439 24.964 1.00 17.39 C +ATOM 199 O ALA A 19 5.083 -1.459 25.141 1.00 16.71 O +ATOM 200 CB ALA A 19 6.609 -0.405 22.596 1.00 13.01 C +ATOM 201 H ALA A 19 6.812 2.029 23.207 1.00 0.00 H +ATOM 202 N LYS A 20 6.572 0.062 25.889 1.00 19.02 N +ATOM 203 CA LYS A 20 6.700 -0.535 27.220 1.00 22.15 C +ATOM 204 C LYS A 20 6.078 0.388 28.273 1.00 21.92 C +ATOM 205 O LYS A 20 6.466 0.364 29.436 1.00 25.17 O +ATOM 206 CB LYS A 20 8.173 -0.771 27.557 1.00 23.23 C +ATOM 207 CG LYS A 20 8.897 -1.739 26.637 1.00 28.11 C +ATOM 208 CD LYS A 20 10.349 -1.884 27.084 1.00 31.51 C +ATOM 209 CE LYS A 20 11.164 -2.766 26.151 1.00 34.18 C +ATOM 210 NZ LYS A 20 10.619 -4.142 26.060 1.00 36.46 N1+ +ATOM 211 H LYS A 20 7.115 0.853 25.689 1.00 0.00 H +ATOM 212 HZ1 LYS A 20 9.631 -4.099 25.748 1.00 0.00 H +ATOM 213 HZ2 LYS A 20 11.174 -4.698 25.381 1.00 0.00 H +ATOM 214 HZ3 LYS A 20 10.660 -4.591 26.998 1.00 0.00 H +ATOM 215 N GLY A 21 5.109 1.196 27.856 1.00 22.32 N +ATOM 216 CA GLY A 21 4.455 2.125 28.763 1.00 21.39 C +ATOM 217 C GLY A 21 3.558 1.469 29.797 1.00 20.42 C +ATOM 218 O GLY A 21 3.415 0.253 29.831 1.00 19.88 O +ATOM 219 H GLY A 21 4.813 1.121 26.931 1.00 0.00 H +ATOM 220 N GLU A 22 2.877 2.298 30.579 1.00 20.61 N +ATOM 221 CA GLU A 22 2.000 1.827 31.645 1.00 20.47 C +ATOM 222 C GLU A 22 0.566 1.458 31.252 1.00 18.70 C +ATOM 223 O GLU A 22 -0.151 0.841 32.037 1.00 17.53 O +ATOM 224 CB GLU A 22 1.972 2.867 32.771 1.00 24.09 C +ATOM 225 CG GLU A 22 3.351 3.214 33.344 1.00 29.80 C +ATOM 226 CD GLU A 22 4.171 1.981 33.727 1.00 33.45 C +ATOM 227 OE1 GLU A 22 3.785 1.265 34.681 1.00 35.68 O +ATOM 228 OE2 GLU A 22 5.205 1.729 33.063 1.00 37.74 O1- +ATOM 229 H GLU A 22 2.984 3.251 30.443 1.00 0.00 H +ATOM 230 N ARG A 23 0.114 1.907 30.089 1.00 15.37 N +ATOM 231 CA ARG A 23 -1.242 1.598 29.647 1.00 13.48 C +ATOM 232 C ARG A 23 -1.276 1.196 28.162 1.00 13.44 C +ATOM 233 O ARG A 23 -1.925 1.816 27.317 1.00 12.60 O +ATOM 234 CB ARG A 23 -2.218 2.747 29.977 1.00 12.16 C +ATOM 235 CG ARG A 23 -1.801 4.108 29.489 1.00 16.12 C +ATOM 236 CD ARG A 23 -2.829 5.199 29.781 1.00 18.09 C +ATOM 237 NE ARG A 23 -3.994 5.178 28.896 1.00 15.56 N +ATOM 238 CZ ARG A 23 -4.870 6.179 28.790 1.00 17.50 C +ATOM 239 NH1 ARG A 23 -4.718 7.291 29.504 1.00 16.81 N1+ +ATOM 240 NH2 ARG A 23 -5.930 6.061 28.002 1.00 15.62 N +ATOM 241 H ARG A 23 0.696 2.441 29.521 1.00 0.00 H +ATOM 242 HE ARG A 23 -4.144 4.380 28.347 1.00 0.00 H +ATOM 243 HH11 ARG A 23 -3.945 7.392 30.130 1.00 0.00 H +ATOM 244 HH12 ARG A 23 -5.382 8.033 29.414 1.00 0.00 H +ATOM 245 HH21 ARG A 23 -6.074 5.218 27.483 1.00 0.00 H +ATOM 246 HH22 ARG A 23 -6.582 6.815 27.926 1.00 0.00 H +ATOM 247 N GLN A 24 -0.548 0.132 27.858 1.00 13.47 N +ATOM 248 CA GLN A 24 -0.484 -0.384 26.507 1.00 12.18 C +ATOM 249 C GLN A 24 -1.586 -1.414 26.258 1.00 11.58 C +ATOM 250 O GLN A 24 -2.059 -2.085 27.180 1.00 11.76 O +ATOM 251 CB GLN A 24 0.904 -0.978 26.240 1.00 12.16 C +ATOM 252 CG GLN A 24 1.991 0.085 26.078 1.00 11.30 C +ATOM 253 CD GLN A 24 1.840 0.876 24.784 1.00 13.83 C +ATOM 254 NE2 GLN A 24 1.505 2.160 24.892 1.00 13.42 N +ATOM 255 OE1 GLN A 24 2.020 0.331 23.699 1.00 15.99 O +ATOM 256 H GLN A 24 -0.102 -0.362 28.577 1.00 0.00 H +ATOM 257 HE21 GLN A 24 1.447 2.678 24.057 1.00 0.00 H +ATOM 258 HE22 GLN A 24 1.352 2.537 25.771 1.00 0.00 H +ATOM 259 N SER A 25 -2.038 -1.461 25.012 1.00 11.77 N +ATOM 260 CA SER A 25 -3.070 -2.384 24.566 1.00 10.10 C +ATOM 261 C SER A 25 -2.482 -3.262 23.450 1.00 10.11 C +ATOM 262 O SER A 25 -1.495 -2.902 22.806 1.00 8.52 O +ATOM 263 CB SER A 25 -4.285 -1.609 24.020 1.00 9.66 C +ATOM 264 OG SER A 25 -4.865 -0.778 25.010 1.00 8.92 O +ATOM 265 H SER A 25 -1.668 -0.845 24.340 1.00 0.00 H +ATOM 266 HG SER A 25 -5.628 -0.354 24.604 1.00 0.00 H +ATOM 267 N PRO A 26 -3.123 -4.403 23.173 1.00 10.22 N +ATOM 268 CA PRO A 26 -4.335 -4.863 23.858 1.00 9.37 C +ATOM 269 C PRO A 26 -3.967 -5.592 25.148 1.00 10.22 C +ATOM 270 O PRO A 26 -2.788 -5.705 25.488 1.00 9.91 O +ATOM 271 CB PRO A 26 -4.936 -5.815 22.840 1.00 8.75 C +ATOM 272 CG PRO A 26 -3.702 -6.467 22.282 1.00 10.96 C +ATOM 273 CD PRO A 26 -2.773 -5.299 22.060 1.00 9.36 C +ATOM 274 N VAL A 27 -4.976 -6.060 25.872 1.00 8.93 N +ATOM 275 CA VAL A 27 -4.758 -6.786 27.105 1.00 7.82 C +ATOM 276 C VAL A 27 -5.679 -7.986 27.088 1.00 10.12 C +ATOM 277 O VAL A 27 -6.562 -8.109 26.230 1.00 9.88 O +ATOM 278 CB VAL A 27 -5.116 -5.945 28.375 1.00 8.52 C +ATOM 279 CG1 VAL A 27 -4.200 -4.737 28.517 1.00 6.99 C +ATOM 280 CG2 VAL A 27 -6.569 -5.521 28.337 1.00 6.52 C +ATOM 281 H VAL A 27 -5.900 -5.964 25.591 1.00 0.00 H +ATOM 282 N ASP A 28 -5.452 -8.885 28.031 1.00 11.76 N +ATOM 283 CA ASP A 28 -6.285 -10.056 28.168 1.00 11.92 C +ATOM 284 C ASP A 28 -7.378 -9.613 29.126 1.00 12.08 C +ATOM 285 O ASP A 28 -7.103 -8.915 30.093 1.00 13.03 O +ATOM 286 CB ASP A 28 -5.493 -11.204 28.789 1.00 12.98 C +ATOM 287 CG ASP A 28 -6.360 -12.404 29.084 1.00 16.06 C +ATOM 288 OD1 ASP A 28 -7.123 -12.814 28.189 1.00 14.84 O +ATOM 289 OD2 ASP A 28 -6.303 -12.922 30.217 1.00 18.67 O1- +ATOM 290 H ASP A 28 -4.763 -8.726 28.691 1.00 0.00 H +ATOM 291 N ILE A 29 -8.621 -9.931 28.819 1.00 13.83 N +ATOM 292 CA ILE A 29 -9.701 -9.561 29.704 1.00 14.70 C +ATOM 293 C ILE A 29 -10.017 -10.787 30.550 1.00 16.02 C +ATOM 294 O ILE A 29 -10.518 -11.793 30.038 1.00 15.56 O +ATOM 295 CB ILE A 29 -10.949 -9.129 28.913 1.00 16.13 C +ATOM 296 CG1 ILE A 29 -10.623 -7.891 28.074 1.00 14.50 C +ATOM 297 CG2 ILE A 29 -12.105 -8.815 29.874 1.00 13.56 C +ATOM 298 CD1 ILE A 29 -11.644 -7.586 26.993 1.00 15.56 C +ATOM 299 H ILE A 29 -8.813 -10.415 27.997 1.00 0.00 H +ATOM 300 N ASP A 30 -9.618 -10.748 31.819 1.00 18.64 N +ATOM 301 CA ASP A 30 -9.895 -11.846 32.745 1.00 20.04 C +ATOM 302 C ASP A 30 -11.302 -11.582 33.303 1.00 19.96 C +ATOM 303 O ASP A 30 -11.498 -10.724 34.158 1.00 19.29 O +ATOM 304 CB ASP A 30 -8.862 -11.872 33.868 1.00 23.48 C +ATOM 305 CG ASP A 30 -9.058 -13.046 34.805 1.00 26.73 C +ATOM 306 OD1 ASP A 30 -9.896 -12.956 35.726 1.00 30.82 O +ATOM 307 OD2 ASP A 30 -8.381 -14.071 34.611 1.00 32.42 O1- +ATOM 308 H ASP A 30 -9.139 -9.955 32.137 1.00 0.00 H +ATOM 309 N THR A 31 -12.283 -12.323 32.810 1.00 21.44 N +ATOM 310 CA THR A 31 -13.657 -12.114 33.223 1.00 24.26 C +ATOM 311 C THR A 31 -13.958 -12.317 34.699 1.00 25.78 C +ATOM 312 O THR A 31 -14.939 -11.785 35.206 1.00 28.62 O +ATOM 313 CB THR A 31 -14.633 -12.944 32.375 1.00 23.18 C +ATOM 314 CG2 THR A 31 -14.422 -12.641 30.885 1.00 24.41 C +ATOM 315 OG1 THR A 31 -14.412 -14.338 32.614 1.00 23.79 O +ATOM 316 H THR A 31 -12.079 -12.986 32.130 1.00 0.00 H +ATOM 317 HG1 THR A 31 -13.707 -14.619 32.035 1.00 0.00 H +ATOM 318 N HIS A 32 -13.129 -13.068 35.403 1.00 26.92 N +ATOM 319 CA HIS A 32 -13.408 -13.275 36.810 1.00 27.57 C +ATOM 320 C HIS A 32 -12.927 -12.140 37.697 1.00 28.02 C +ATOM 321 O HIS A 32 -13.506 -11.913 38.749 1.00 30.02 O +ATOM 322 CB HIS A 32 -12.872 -14.623 37.285 1.00 28.91 C +ATOM 323 CG HIS A 32 -13.668 -15.786 36.784 1.00 30.69 C +ATOM 324 CD2 HIS A 32 -13.337 -16.806 35.956 1.00 32.51 C +ATOM 325 ND1 HIS A 32 -14.998 -15.962 37.095 1.00 32.29 N +ATOM 326 CE1 HIS A 32 -15.456 -17.037 36.476 1.00 32.93 C +ATOM 327 NE2 HIS A 32 -14.468 -17.567 35.778 1.00 34.09 N +ATOM 328 H HIS A 32 -12.339 -13.442 34.973 1.00 0.00 H +ATOM 329 HD1 HIS A 32 -15.536 -15.381 37.679 1.00 0.00 H +ATOM 330 HE2 HIS A 32 -14.540 -18.379 35.215 1.00 0.00 H +ATOM 331 N THR A 33 -11.904 -11.406 37.268 1.00 27.54 N +ATOM 332 CA THR A 33 -11.399 -10.304 38.078 1.00 26.75 C +ATOM 333 C THR A 33 -11.806 -8.928 37.574 1.00 25.82 C +ATOM 334 O THR A 33 -11.386 -7.913 38.132 1.00 26.33 O +ATOM 335 CB THR A 33 -9.877 -10.357 38.243 1.00 27.90 C +ATOM 336 CG2 THR A 33 -9.475 -11.654 38.922 1.00 30.42 C +ATOM 337 OG1 THR A 33 -9.247 -10.282 36.962 1.00 30.23 O +ATOM 338 H THR A 33 -11.474 -11.532 36.400 1.00 0.00 H +ATOM 339 HG1 THR A 33 -8.304 -10.150 37.088 1.00 0.00 H +ATOM 340 N ALA A 34 -12.573 -8.890 36.489 1.00 24.67 N +ATOM 341 CA ALA A 34 -13.056 -7.627 35.949 1.00 23.76 C +ATOM 342 C ALA A 34 -14.117 -7.174 36.947 1.00 23.72 C +ATOM 343 O ALA A 34 -14.869 -7.991 37.470 1.00 23.07 O +ATOM 344 CB ALA A 34 -13.669 -7.833 34.579 1.00 22.84 C +ATOM 345 H ALA A 34 -12.843 -9.723 36.061 1.00 0.00 H +ATOM 346 N LYS A 35 -14.191 -5.881 37.214 1.00 23.67 N +ATOM 347 CA LYS A 35 -15.151 -5.409 38.188 1.00 24.52 C +ATOM 348 C LYS A 35 -16.412 -4.814 37.591 1.00 25.04 C +ATOM 349 O LYS A 35 -16.351 -3.898 36.772 1.00 22.46 O +ATOM 350 CB LYS A 35 -14.492 -4.398 39.119 1.00 26.23 C +ATOM 351 CG LYS A 35 -15.326 -4.111 40.341 1.00 31.00 C +ATOM 352 CD LYS A 35 -14.628 -3.172 41.300 1.00 36.92 C +ATOM 353 CE LYS A 35 -15.530 -2.853 42.498 1.00 38.70 C +ATOM 354 NZ LYS A 35 -16.803 -2.172 42.101 1.00 41.53 N1+ +ATOM 355 H LYS A 35 -13.616 -5.243 36.745 1.00 0.00 H +ATOM 356 HZ1 LYS A 35 -16.580 -1.277 41.620 1.00 0.00 H +ATOM 357 HZ2 LYS A 35 -17.340 -2.786 41.456 1.00 0.00 H +ATOM 358 HZ3 LYS A 35 -17.373 -1.977 42.949 1.00 0.00 H +ATOM 359 N TYR A 36 -17.559 -5.353 37.983 1.00 25.80 N +ATOM 360 CA TYR A 36 -18.829 -4.825 37.511 1.00 29.48 C +ATOM 361 C TYR A 36 -18.992 -3.444 38.141 1.00 29.94 C +ATOM 362 O TYR A 36 -18.834 -3.286 39.351 1.00 31.90 O +ATOM 363 CB TYR A 36 -19.987 -5.734 37.933 1.00 30.82 C +ATOM 364 CG TYR A 36 -21.347 -5.074 37.829 1.00 33.65 C +ATOM 365 CD1 TYR A 36 -21.790 -4.520 36.628 1.00 33.24 C +ATOM 366 CD2 TYR A 36 -22.170 -4.958 38.950 1.00 36.21 C +ATOM 367 CE1 TYR A 36 -23.010 -3.862 36.547 1.00 35.09 C +ATOM 368 CE2 TYR A 36 -23.398 -4.300 38.881 1.00 36.80 C +ATOM 369 CZ TYR A 36 -23.807 -3.751 37.679 1.00 36.86 C +ATOM 370 OH TYR A 36 -24.990 -3.050 37.627 1.00 38.81 O +ATOM 371 H TYR A 36 -17.550 -6.104 38.606 1.00 0.00 H +ATOM 372 HH TYR A 36 -25.106 -2.672 36.748 1.00 0.00 H +ATOM 373 N ASP A 37 -19.291 -2.444 37.327 1.00 30.63 N +ATOM 374 CA ASP A 37 -19.464 -1.101 37.841 1.00 32.17 C +ATOM 375 C ASP A 37 -20.881 -0.617 37.574 1.00 33.77 C +ATOM 376 O ASP A 37 -21.237 -0.314 36.438 1.00 34.16 O +ATOM 377 CB ASP A 37 -18.452 -0.158 37.199 1.00 32.96 C +ATOM 378 CG ASP A 37 -18.354 1.166 37.918 1.00 35.26 C +ATOM 379 OD1 ASP A 37 -19.313 1.544 38.621 1.00 37.53 O +ATOM 380 OD2 ASP A 37 -17.308 1.832 37.788 1.00 38.08 O1- +ATOM 381 H ASP A 37 -19.398 -2.603 36.366 1.00 0.00 H +ATOM 382 N PRO A 38 -21.695 -0.484 38.634 1.00 35.61 N +ATOM 383 CA PRO A 38 -23.085 -0.029 38.504 1.00 36.33 C +ATOM 384 C PRO A 38 -23.226 1.442 38.120 1.00 36.29 C +ATOM 385 O PRO A 38 -24.310 1.883 37.757 1.00 38.38 O +ATOM 386 CB PRO A 38 -23.663 -0.307 39.889 1.00 36.15 C +ATOM 387 CG PRO A 38 -22.489 -0.047 40.784 1.00 36.94 C +ATOM 388 CD PRO A 38 -21.363 -0.752 40.046 1.00 36.59 C +ATOM 389 N SER A 39 -22.151 2.213 38.226 1.00 35.84 N +ATOM 390 CA SER A 39 -22.230 3.620 37.862 1.00 35.54 C +ATOM 391 C SER A 39 -21.938 3.810 36.375 1.00 35.01 C +ATOM 392 O SER A 39 -21.915 4.937 35.873 1.00 36.02 O +ATOM 393 CB SER A 39 -21.273 4.462 38.713 1.00 36.13 C +ATOM 394 OG SER A 39 -19.927 4.075 38.523 1.00 37.02 O +ATOM 395 H SER A 39 -21.303 1.868 38.546 1.00 0.00 H +ATOM 396 HG SER A 39 -19.365 4.738 38.931 1.00 0.00 H +ATOM 397 N LEU A 40 -21.689 2.707 35.677 1.00 33.70 N +ATOM 398 CA LEU A 40 -21.404 2.757 34.248 1.00 32.16 C +ATOM 399 C LEU A 40 -22.712 2.960 33.500 1.00 31.89 C +ATOM 400 O LEU A 40 -23.689 2.248 33.746 1.00 33.33 O +ATOM 401 CB LEU A 40 -20.744 1.453 33.791 1.00 28.90 C +ATOM 402 CG LEU A 40 -19.261 1.461 33.438 1.00 26.78 C +ATOM 403 CD1 LEU A 40 -18.483 2.326 34.377 1.00 28.33 C +ATOM 404 CD2 LEU A 40 -18.740 0.043 33.469 1.00 26.60 C +ATOM 405 H LEU A 40 -21.728 1.821 36.089 1.00 0.00 H +ATOM 406 N LYS A 41 -22.742 3.952 32.620 1.00 30.69 N +ATOM 407 CA LYS A 41 -23.929 4.226 31.824 1.00 28.96 C +ATOM 408 C LYS A 41 -23.910 3.390 30.546 1.00 27.18 C +ATOM 409 O LYS A 41 -22.877 2.834 30.163 1.00 25.32 O +ATOM 410 CB LYS A 41 -23.996 5.712 31.483 1.00 31.25 C +ATOM 411 CG LYS A 41 -24.098 6.571 32.721 1.00 36.09 C +ATOM 412 CD LYS A 41 -23.862 8.030 32.422 1.00 39.94 C +ATOM 413 CE LYS A 41 -23.791 8.833 33.718 1.00 44.54 C +ATOM 414 NZ LYS A 41 -22.652 8.417 34.603 1.00 46.28 N1+ +ATOM 415 H LYS A 41 -21.943 4.500 32.487 1.00 0.00 H +ATOM 416 HZ1 LYS A 41 -21.757 8.552 34.090 1.00 0.00 H +ATOM 417 HZ2 LYS A 41 -22.648 9.000 35.464 1.00 0.00 H +ATOM 418 HZ3 LYS A 41 -22.755 7.415 34.861 1.00 0.00 H +ATOM 419 N PRO A 42 -25.073 3.236 29.901 1.00 25.54 N +ATOM 420 CA PRO A 42 -25.114 2.452 28.667 1.00 24.30 C +ATOM 421 C PRO A 42 -24.411 3.249 27.570 1.00 23.34 C +ATOM 422 O PRO A 42 -24.279 4.469 27.669 1.00 23.14 O +ATOM 423 CB PRO A 42 -26.616 2.365 28.370 1.00 24.72 C +ATOM 424 CG PRO A 42 -27.264 2.584 29.709 1.00 24.86 C +ATOM 425 CD PRO A 42 -26.425 3.673 30.284 1.00 24.38 C +ATOM 426 N LEU A 43 -23.941 2.556 26.542 1.00 21.24 N +ATOM 427 CA LEU A 43 -23.297 3.213 25.423 1.00 19.48 C +ATOM 428 C LEU A 43 -24.371 3.848 24.564 1.00 18.71 C +ATOM 429 O LEU A 43 -25.498 3.367 24.505 1.00 19.12 O +ATOM 430 CB LEU A 43 -22.558 2.203 24.553 1.00 18.42 C +ATOM 431 CG LEU A 43 -21.168 1.769 24.956 1.00 19.57 C +ATOM 432 CD1 LEU A 43 -20.654 0.808 23.894 1.00 18.11 C +ATOM 433 CD2 LEU A 43 -20.282 2.999 25.081 1.00 19.27 C +ATOM 434 H LEU A 43 -24.044 1.588 26.526 1.00 0.00 H +ATOM 435 N SER A 44 -24.001 4.900 23.862 1.00 17.50 N +ATOM 436 CA SER A 44 -24.919 5.563 22.981 1.00 18.04 C +ATOM 437 C SER A 44 -24.158 5.637 21.674 1.00 17.55 C +ATOM 438 O SER A 44 -23.159 6.335 21.574 1.00 17.51 O +ATOM 439 CB SER A 44 -25.249 6.964 23.502 1.00 19.49 C +ATOM 440 OG SER A 44 -26.295 7.555 22.749 1.00 23.94 O +ATOM 441 H SER A 44 -23.087 5.251 23.939 1.00 0.00 H +ATOM 442 HG SER A 44 -26.073 7.622 21.815 1.00 0.00 H +ATOM 443 N VAL A 45 -24.593 4.849 20.701 1.00 17.91 N +ATOM 444 CA VAL A 45 -23.959 4.814 19.394 1.00 19.32 C +ATOM 445 C VAL A 45 -24.923 5.405 18.376 1.00 19.70 C +ATOM 446 O VAL A 45 -25.971 4.819 18.108 1.00 22.06 O +ATOM 447 CB VAL A 45 -23.636 3.368 18.987 1.00 20.09 C +ATOM 448 CG1 VAL A 45 -22.908 3.356 17.669 1.00 23.14 C +ATOM 449 CG2 VAL A 45 -22.805 2.680 20.064 1.00 21.76 C +ATOM 450 H VAL A 45 -25.390 4.297 20.837 1.00 0.00 H +ATOM 451 N SER A 46 -24.605 6.584 17.851 1.00 18.36 N +ATOM 452 CA SER A 46 -25.464 7.221 16.859 1.00 19.36 C +ATOM 453 C SER A 46 -24.779 7.221 15.491 1.00 18.07 C +ATOM 454 O SER A 46 -24.093 8.174 15.139 1.00 16.77 O +ATOM 455 CB SER A 46 -25.789 8.653 17.281 1.00 19.67 C +ATOM 456 OG SER A 46 -26.273 8.690 18.611 1.00 24.99 O +ATOM 457 H SER A 46 -23.792 7.044 18.141 1.00 0.00 H +ATOM 458 HG SER A 46 -26.448 9.603 18.855 1.00 0.00 H +ATOM 459 N TYR A 47 -24.976 6.153 14.724 1.00 18.42 N +ATOM 460 CA TYR A 47 -24.363 6.016 13.402 1.00 19.61 C +ATOM 461 C TYR A 47 -25.344 6.164 12.245 1.00 22.20 C +ATOM 462 O TYR A 47 -25.039 5.756 11.120 1.00 21.65 O +ATOM 463 CB TYR A 47 -23.688 4.652 13.259 1.00 18.46 C +ATOM 464 CG TYR A 47 -22.449 4.400 14.100 1.00 17.51 C +ATOM 465 CD1 TYR A 47 -21.791 5.434 14.772 1.00 16.73 C +ATOM 466 CD2 TYR A 47 -21.921 3.111 14.193 1.00 16.84 C +ATOM 467 CE1 TYR A 47 -20.638 5.183 15.514 1.00 16.64 C +ATOM 468 CE2 TYR A 47 -20.779 2.850 14.921 1.00 17.13 C +ATOM 469 CZ TYR A 47 -20.136 3.884 15.583 1.00 16.92 C +ATOM 470 OH TYR A 47 -18.991 3.592 16.304 1.00 15.54 O +ATOM 471 H TYR A 47 -25.530 5.433 15.082 1.00 0.00 H +ATOM 472 HH TYR A 47 -18.880 2.630 16.255 1.00 0.00 H +ATOM 473 N ASP A 48 -26.527 6.711 12.512 1.00 24.28 N +ATOM 474 CA ASP A 48 -27.526 6.884 11.458 1.00 25.09 C +ATOM 475 C ASP A 48 -27.162 7.919 10.391 1.00 24.31 C +ATOM 476 O ASP A 48 -27.639 7.821 9.267 1.00 24.31 O +ATOM 477 CB ASP A 48 -28.925 7.158 12.040 1.00 28.20 C +ATOM 478 CG ASP A 48 -28.932 8.265 13.078 1.00 31.23 C +ATOM 479 OD1 ASP A 48 -28.421 8.043 14.202 1.00 34.80 O +ATOM 480 OD2 ASP A 48 -29.469 9.354 12.781 1.00 35.53 O1- +ATOM 481 H ASP A 48 -26.712 6.999 13.424 1.00 0.00 H +ATOM 482 N GLN A 49 -26.298 8.878 10.725 1.00 23.79 N +ATOM 483 CA GLN A 49 -25.882 9.914 9.773 1.00 23.42 C +ATOM 484 C GLN A 49 -24.464 9.708 9.255 1.00 21.65 C +ATOM 485 O GLN A 49 -23.885 10.600 8.635 1.00 21.29 O +ATOM 486 CB GLN A 49 -25.986 11.300 10.410 1.00 26.12 C +ATOM 487 CG GLN A 49 -27.411 11.762 10.684 1.00 31.16 C +ATOM 488 CD GLN A 49 -28.257 11.805 9.423 1.00 35.16 C +ATOM 489 NE2 GLN A 49 -27.714 12.395 8.363 1.00 38.99 N +ATOM 490 OE1 GLN A 49 -29.384 11.306 9.400 1.00 39.18 O +ATOM 491 H GLN A 49 -25.900 8.890 11.612 1.00 0.00 H +ATOM 492 HE21 GLN A 49 -28.264 12.408 7.555 1.00 0.00 H +ATOM 493 HE22 GLN A 49 -26.816 12.778 8.415 1.00 0.00 H +ATOM 494 N ALA A 50 -23.906 8.533 9.518 1.00 21.44 N +ATOM 495 CA ALA A 50 -22.549 8.202 9.101 1.00 21.85 C +ATOM 496 C ALA A 50 -22.343 8.344 7.598 1.00 21.96 C +ATOM 497 O ALA A 50 -23.167 7.908 6.792 1.00 21.96 O +ATOM 498 CB ALA A 50 -22.188 6.788 9.548 1.00 21.46 C +ATOM 499 H ALA A 50 -24.438 7.842 9.961 1.00 0.00 H +ATOM 500 N THR A 51 -21.234 8.959 7.221 1.00 20.72 N +ATOM 501 CA THR A 51 -20.935 9.142 5.816 1.00 20.39 C +ATOM 502 C THR A 51 -19.569 8.563 5.527 1.00 18.25 C +ATOM 503 O THR A 51 -18.551 9.166 5.872 1.00 18.51 O +ATOM 504 CB THR A 51 -20.958 10.631 5.435 1.00 21.24 C +ATOM 505 CG2 THR A 51 -20.860 10.788 3.925 1.00 23.06 C +ATOM 506 OG1 THR A 51 -22.187 11.218 5.885 1.00 25.75 O +ATOM 507 H THR A 51 -20.607 9.292 7.865 1.00 0.00 H +ATOM 508 HG1 THR A 51 -22.363 11.060 6.822 1.00 0.00 H +ATOM 509 N SER A 52 -19.552 7.359 4.966 1.00 17.36 N +ATOM 510 CA SER A 52 -18.305 6.692 4.605 1.00 17.53 C +ATOM 511 C SER A 52 -17.808 7.324 3.302 1.00 18.11 C +ATOM 512 O SER A 52 -18.611 7.756 2.460 1.00 17.94 O +ATOM 513 CB SER A 52 -18.539 5.186 4.414 1.00 16.76 C +ATOM 514 OG SER A 52 -19.475 4.928 3.372 1.00 17.13 O +ATOM 515 H SER A 52 -20.375 6.895 4.748 1.00 0.00 H +ATOM 516 HG SER A 52 -18.920 4.929 2.579 1.00 0.00 H +ATOM 517 N LEU A 53 -16.496 7.345 3.117 1.00 17.36 N +ATOM 518 CA LEU A 53 -15.922 7.955 1.927 1.00 16.26 C +ATOM 519 C LEU A 53 -15.049 7.055 1.091 1.00 15.98 C +ATOM 520 O LEU A 53 -15.238 6.935 -0.116 1.00 16.18 O +ATOM 521 CB LEU A 53 -15.053 9.145 2.330 1.00 17.24 C +ATOM 522 CG LEU A 53 -15.687 10.236 3.182 1.00 18.21 C +ATOM 523 CD1 LEU A 53 -14.602 11.099 3.765 1.00 18.43 C +ATOM 524 CD2 LEU A 53 -16.658 11.039 2.339 1.00 19.14 C +ATOM 525 H LEU A 53 -15.915 6.935 3.786 1.00 0.00 H +ATOM 526 N ARG A 54 -14.116 6.380 1.747 1.00 14.90 N +ATOM 527 CA ARG A 54 -13.142 5.593 1.024 1.00 14.74 C +ATOM 528 C ARG A 54 -12.689 4.370 1.803 1.00 13.13 C +ATOM 529 O ARG A 54 -12.914 4.263 3.006 1.00 12.30 O +ATOM 530 CB ARG A 54 -11.945 6.531 0.791 1.00 14.80 C +ATOM 531 CG ARG A 54 -10.835 6.039 -0.097 1.00 20.22 C +ATOM 532 CD ARG A 54 -9.751 7.123 -0.265 1.00 19.49 C +ATOM 533 NE ARG A 54 -9.084 7.460 0.993 1.00 17.40 N +ATOM 534 CZ ARG A 54 -7.809 7.832 1.097 1.00 16.62 C +ATOM 535 NH1 ARG A 54 -7.049 7.924 0.013 1.00 16.22 N1+ +ATOM 536 NH2 ARG A 54 -7.286 8.091 2.288 1.00 15.12 N +ATOM 537 H ARG A 54 -14.088 6.367 2.725 1.00 0.00 H +ATOM 538 HE ARG A 54 -9.623 7.394 1.796 1.00 0.00 H +ATOM 539 HH11 ARG A 54 -7.430 7.713 -0.887 1.00 0.00 H +ATOM 540 HH12 ARG A 54 -6.095 8.204 0.089 1.00 0.00 H +ATOM 541 HH21 ARG A 54 -7.849 8.011 3.108 1.00 0.00 H +ATOM 542 HH22 ARG A 54 -6.330 8.373 2.363 1.00 0.00 H +ATOM 543 N ILE A 55 -12.123 3.413 1.084 1.00 12.44 N +ATOM 544 CA ILE A 55 -11.565 2.225 1.701 1.00 12.40 C +ATOM 545 C ILE A 55 -10.156 2.180 1.126 1.00 12.79 C +ATOM 546 O ILE A 55 -9.938 2.537 -0.037 1.00 14.24 O +ATOM 547 CB ILE A 55 -12.360 0.934 1.376 1.00 11.10 C +ATOM 548 CG1 ILE A 55 -11.807 -0.238 2.205 1.00 10.87 C +ATOM 549 CG2 ILE A 55 -12.323 0.630 -0.122 1.00 8.71 C +ATOM 550 CD1 ILE A 55 -12.719 -1.476 2.241 1.00 9.08 C +ATOM 551 H ILE A 55 -12.054 3.503 0.108 1.00 0.00 H +ATOM 552 N LEU A 56 -9.183 1.855 1.957 1.00 13.75 N +ATOM 553 CA LEU A 56 -7.815 1.804 1.476 1.00 14.72 C +ATOM 554 C LEU A 56 -6.960 0.818 2.225 1.00 13.92 C +ATOM 555 O LEU A 56 -7.166 0.548 3.414 1.00 14.96 O +ATOM 556 CB LEU A 56 -7.155 3.179 1.554 1.00 18.03 C +ATOM 557 CG LEU A 56 -6.990 3.714 2.971 1.00 19.76 C +ATOM 558 CD1 LEU A 56 -5.582 4.248 3.185 1.00 21.86 C +ATOM 559 CD2 LEU A 56 -8.029 4.774 3.198 1.00 22.66 C +ATOM 560 H LEU A 56 -9.382 1.654 2.896 1.00 0.00 H +ATOM 561 N ASN A 57 -6.000 0.280 1.502 1.00 11.72 N +ATOM 562 CA ASN A 57 -5.054 -0.656 2.043 1.00 10.32 C +ATOM 563 C ASN A 57 -3.868 0.249 2.382 1.00 12.50 C +ATOM 564 O ASN A 57 -3.302 0.904 1.498 1.00 10.16 O +ATOM 565 CB ASN A 57 -4.696 -1.674 0.963 1.00 9.65 C +ATOM 566 CG ASN A 57 -3.615 -2.624 1.393 1.00 9.70 C +ATOM 567 ND2 ASN A 57 -3.557 -3.777 0.757 1.00 10.12 N +ATOM 568 OD1 ASN A 57 -2.832 -2.324 2.289 1.00 14.35 O +ATOM 569 H ASN A 57 -5.890 0.542 0.566 1.00 0.00 H +ATOM 570 HD21 ASN A 57 -2.839 -4.402 1.004 1.00 0.00 H +ATOM 571 HD22 ASN A 57 -4.230 -3.946 0.062 1.00 0.00 H +ATOM 572 N ASN A 58 -3.540 0.353 3.668 1.00 13.34 N +ATOM 573 CA ASN A 58 -2.430 1.211 4.090 1.00 14.23 C +ATOM 574 C ASN A 58 -1.145 0.421 4.353 1.00 15.31 C +ATOM 575 O ASN A 58 -0.201 0.930 4.967 1.00 15.69 O +ATOM 576 CB ASN A 58 -2.815 2.029 5.325 1.00 14.21 C +ATOM 577 CG ASN A 58 -3.094 1.167 6.543 1.00 11.52 C +ATOM 578 ND2 ASN A 58 -3.519 1.800 7.614 1.00 15.78 N +ATOM 579 OD1 ASN A 58 -2.926 -0.046 6.524 1.00 12.24 O +ATOM 580 H ASN A 58 -4.031 -0.184 4.329 1.00 0.00 H +ATOM 581 HD21 ASN A 58 -3.708 1.290 8.427 1.00 0.00 H +ATOM 582 HD22 ASN A 58 -3.630 2.773 7.555 1.00 0.00 H +ATOM 583 N GLY A 59 -1.131 -0.828 3.901 1.00 14.24 N +ATOM 584 CA GLY A 59 0.029 -1.679 4.080 1.00 14.85 C +ATOM 585 C GLY A 59 0.055 -2.387 5.417 1.00 14.79 C +ATOM 586 O GLY A 59 0.921 -3.223 5.651 1.00 13.44 O +ATOM 587 H GLY A 59 -1.908 -1.190 3.435 1.00 0.00 H +ATOM 588 N HIS A 60 -0.884 -2.045 6.299 1.00 14.88 N +ATOM 589 CA HIS A 60 -0.960 -2.653 7.629 1.00 16.61 C +ATOM 590 C HIS A 60 -2.329 -3.315 7.844 1.00 16.06 C +ATOM 591 O HIS A 60 -2.457 -4.295 8.585 1.00 16.17 O +ATOM 592 CB HIS A 60 -0.712 -1.593 8.713 1.00 18.78 C +ATOM 593 CG HIS A 60 0.558 -0.822 8.525 1.00 25.84 C +ATOM 594 CD2 HIS A 60 0.774 0.465 8.159 1.00 27.90 C +ATOM 595 ND1 HIS A 60 1.808 -1.389 8.676 1.00 29.44 N +ATOM 596 CE1 HIS A 60 2.738 -0.490 8.406 1.00 28.31 C +ATOM 597 NE2 HIS A 60 2.137 0.644 8.089 1.00 30.48 N +ATOM 598 H HIS A 60 -1.553 -1.384 6.032 1.00 0.00 H +ATOM 599 HD1 HIS A 60 2.003 -2.322 8.908 1.00 0.00 H +ATOM 600 HE2 HIS A 60 2.578 1.475 7.817 1.00 0.00 H +ATOM 601 N ALA A 61 -3.340 -2.780 7.169 1.00 14.62 N +ATOM 602 CA ALA A 61 -4.712 -3.276 7.249 1.00 13.44 C +ATOM 603 C ALA A 61 -5.457 -2.479 6.203 1.00 11.79 C +ATOM 604 O ALA A 61 -4.847 -1.706 5.464 1.00 13.38 O +ATOM 605 CB ALA A 61 -5.313 -2.975 8.647 1.00 9.87 C +ATOM 606 H ALA A 61 -3.191 -2.014 6.575 1.00 0.00 H +ATOM 607 N PHE A 62 -6.762 -2.684 6.112 1.00 10.86 N +ATOM 608 CA PHE A 62 -7.560 -1.893 5.196 1.00 11.80 C +ATOM 609 C PHE A 62 -8.464 -1.084 6.113 1.00 13.32 C +ATOM 610 O PHE A 62 -8.903 -1.570 7.168 1.00 12.94 O +ATOM 611 CB PHE A 62 -8.328 -2.745 4.168 1.00 10.38 C +ATOM 612 CG PHE A 62 -9.379 -3.640 4.749 1.00 11.16 C +ATOM 613 CD1 PHE A 62 -10.673 -3.170 4.955 1.00 10.65 C +ATOM 614 CD2 PHE A 62 -9.096 -4.969 5.034 1.00 10.86 C +ATOM 615 CE1 PHE A 62 -11.665 -4.013 5.432 1.00 10.91 C +ATOM 616 CE2 PHE A 62 -10.087 -5.821 5.514 1.00 10.95 C +ATOM 617 CZ PHE A 62 -11.371 -5.343 5.711 1.00 11.02 C +ATOM 618 H PHE A 62 -7.208 -3.340 6.681 1.00 0.00 H +ATOM 619 N ASN A 63 -8.654 0.181 5.774 1.00 12.65 N +ATOM 620 CA ASN A 63 -9.457 1.051 6.600 1.00 12.17 C +ATOM 621 C ASN A 63 -10.583 1.687 5.815 1.00 12.91 C +ATOM 622 O ASN A 63 -10.419 2.030 4.639 1.00 10.89 O +ATOM 623 CB ASN A 63 -8.574 2.164 7.171 1.00 15.40 C +ATOM 624 CG ASN A 63 -7.371 1.631 7.910 1.00 16.88 C +ATOM 625 ND2 ASN A 63 -6.434 1.050 7.178 1.00 25.60 N +ATOM 626 OD1 ASN A 63 -7.281 1.742 9.115 1.00 21.97 O +ATOM 627 H ASN A 63 -8.287 0.527 4.937 1.00 0.00 H +ATOM 628 HD21 ASN A 63 -5.672 0.686 7.667 1.00 0.00 H +ATOM 629 HD22 ASN A 63 -6.554 1.004 6.209 1.00 0.00 H +ATOM 630 N VAL A 64 -11.732 1.820 6.461 1.00 10.88 N +ATOM 631 CA VAL A 64 -12.872 2.489 5.855 1.00 10.49 C +ATOM 632 C VAL A 64 -12.918 3.839 6.581 1.00 11.16 C +ATOM 633 O VAL A 64 -13.015 3.892 7.807 1.00 12.09 O +ATOM 634 CB VAL A 64 -14.183 1.712 6.072 1.00 9.52 C +ATOM 635 CG1 VAL A 64 -15.365 2.494 5.487 1.00 7.94 C +ATOM 636 CG2 VAL A 64 -14.076 0.322 5.437 1.00 7.39 C +ATOM 637 H VAL A 64 -11.805 1.481 7.382 1.00 0.00 H +ATOM 638 N GLU A 65 -12.753 4.917 5.829 1.00 10.13 N +ATOM 639 CA GLU A 65 -12.750 6.252 6.388 1.00 11.92 C +ATOM 640 C GLU A 65 -14.113 6.893 6.278 1.00 12.51 C +ATOM 641 O GLU A 65 -14.861 6.644 5.326 1.00 11.28 O +ATOM 642 CB GLU A 65 -11.730 7.113 5.659 1.00 13.87 C +ATOM 643 CG GLU A 65 -10.299 6.614 5.779 1.00 18.56 C +ATOM 644 CD GLU A 65 -9.366 7.275 4.773 1.00 19.69 C +ATOM 645 OE1 GLU A 65 -9.853 7.693 3.705 1.00 23.82 O +ATOM 646 OE2 GLU A 65 -8.151 7.357 5.034 1.00 20.59 O1- +ATOM 647 H GLU A 65 -12.657 4.795 4.862 1.00 0.00 H +ATOM 648 N PHE A 66 -14.411 7.749 7.245 1.00 13.58 N +ATOM 649 CA PHE A 66 -15.689 8.453 7.309 1.00 14.05 C +ATOM 650 C PHE A 66 -15.465 9.948 7.373 1.00 14.42 C +ATOM 651 O PHE A 66 -14.392 10.420 7.771 1.00 13.95 O +ATOM 652 CB PHE A 66 -16.488 8.025 8.555 1.00 12.31 C +ATOM 653 CG PHE A 66 -17.009 6.614 8.493 1.00 13.59 C +ATOM 654 CD1 PHE A 66 -16.163 5.530 8.731 1.00 13.70 C +ATOM 655 CD2 PHE A 66 -18.335 6.368 8.161 1.00 12.61 C +ATOM 656 CE1 PHE A 66 -16.634 4.222 8.633 1.00 13.10 C +ATOM 657 CE2 PHE A 66 -18.816 5.068 8.061 1.00 12.71 C +ATOM 658 CZ PHE A 66 -17.965 3.992 8.297 1.00 13.19 C +ATOM 659 H PHE A 66 -13.751 7.955 7.945 1.00 0.00 H +ATOM 660 N ASP A 67 -16.479 10.681 6.940 1.00 16.41 N +ATOM 661 CA ASP A 67 -16.472 12.128 6.974 1.00 17.93 C +ATOM 662 C ASP A 67 -16.688 12.502 8.449 1.00 18.95 C +ATOM 663 O ASP A 67 -17.740 12.212 9.015 1.00 19.01 O +ATOM 664 CB ASP A 67 -17.628 12.647 6.112 1.00 20.26 C +ATOM 665 CG ASP A 67 -17.865 14.145 6.270 1.00 24.02 C +ATOM 666 OD1 ASP A 67 -16.955 14.866 6.728 1.00 26.05 O +ATOM 667 OD2 ASP A 67 -18.974 14.602 5.931 1.00 26.50 O1- +ATOM 668 H ASP A 67 -17.270 10.228 6.611 1.00 0.00 H +ATOM 669 N ASP A 68 -15.687 13.110 9.076 1.00 19.06 N +ATOM 670 CA ASP A 68 -15.802 13.503 10.479 1.00 21.58 C +ATOM 671 C ASP A 68 -15.720 15.025 10.648 1.00 22.51 C +ATOM 672 O ASP A 68 -15.194 15.521 11.646 1.00 22.86 O +ATOM 673 CB ASP A 68 -14.715 12.807 11.322 1.00 20.28 C +ATOM 674 CG ASP A 68 -13.305 13.278 10.977 1.00 21.26 C +ATOM 675 OD1 ASP A 68 -13.067 13.716 9.831 1.00 22.96 O +ATOM 676 OD2 ASP A 68 -12.426 13.216 11.856 1.00 21.88 O1- +ATOM 677 H ASP A 68 -14.850 13.252 8.593 1.00 0.00 H +ATOM 678 N SER A 69 -16.226 15.759 9.661 1.00 24.45 N +ATOM 679 CA SER A 69 -16.207 17.220 9.700 1.00 27.46 C +ATOM 680 C SER A 69 -17.300 17.780 10.603 1.00 28.53 C +ATOM 681 O SER A 69 -17.253 18.949 10.991 1.00 30.51 O +ATOM 682 CB SER A 69 -16.368 17.787 8.292 1.00 26.89 C +ATOM 683 OG SER A 69 -17.543 17.281 7.682 1.00 28.47 O +ATOM 684 H SER A 69 -16.659 15.335 8.896 1.00 0.00 H +ATOM 685 HG SER A 69 -17.714 17.755 6.860 1.00 0.00 H +ATOM 686 N GLN A 70 -18.299 16.950 10.894 1.00 29.95 N +ATOM 687 CA GLN A 70 -19.428 17.304 11.750 1.00 30.45 C +ATOM 688 C GLN A 70 -19.797 16.062 12.553 1.00 30.57 C +ATOM 689 O GLN A 70 -19.372 14.958 12.212 1.00 29.82 O +ATOM 690 CB GLN A 70 -20.640 17.684 10.908 1.00 32.63 C +ATOM 691 CG GLN A 70 -20.528 18.973 10.139 1.00 37.26 C +ATOM 692 CD GLN A 70 -21.777 19.239 9.324 1.00 40.50 C +ATOM 693 NE2 GLN A 70 -22.466 20.331 9.631 1.00 42.13 N +ATOM 694 OE1 GLN A 70 -22.137 18.453 8.445 1.00 43.75 O +ATOM 695 H GLN A 70 -18.285 16.037 10.540 1.00 0.00 H +ATOM 696 HE21 GLN A 70 -23.272 20.479 9.100 1.00 0.00 H +ATOM 697 HE22 GLN A 70 -22.137 20.906 10.346 1.00 0.00 H +ATOM 698 N ASP A 71 -20.611 16.237 13.593 1.00 30.73 N +ATOM 699 CA ASP A 71 -21.061 15.122 14.428 1.00 30.99 C +ATOM 700 C ASP A 71 -21.997 14.207 13.623 1.00 30.75 C +ATOM 701 O ASP A 71 -23.195 14.167 13.876 1.00 31.82 O +ATOM 702 CB ASP A 71 -21.801 15.644 15.673 1.00 30.44 C +ATOM 703 CG ASP A 71 -20.865 16.241 16.732 1.00 31.47 C +ATOM 704 OD1 ASP A 71 -19.629 16.146 16.611 1.00 30.68 O +ATOM 705 OD2 ASP A 71 -21.382 16.800 17.719 1.00 32.89 O1- +ATOM 706 H ASP A 71 -20.928 17.137 13.803 1.00 0.00 H +ATOM 707 N LYS A 72 -21.446 13.465 12.668 1.00 31.45 N +ATOM 708 CA LYS A 72 -22.238 12.573 11.820 1.00 30.89 C +ATOM 709 C LYS A 72 -22.525 11.225 12.482 1.00 28.98 C +ATOM 710 O LYS A 72 -23.658 10.743 12.463 1.00 31.22 O +ATOM 711 CB LYS A 72 -21.514 12.320 10.491 1.00 34.13 C +ATOM 712 CG LYS A 72 -21.297 13.537 9.596 1.00 37.79 C +ATOM 713 CD LYS A 72 -22.588 13.992 8.943 1.00 41.09 C +ATOM 714 CE LYS A 72 -22.328 15.011 7.830 1.00 43.83 C +ATOM 715 NZ LYS A 72 -21.673 14.408 6.633 1.00 43.27 N1+ +ATOM 716 H LYS A 72 -20.479 13.492 12.530 1.00 0.00 H +ATOM 717 HZ1 LYS A 72 -20.759 13.996 6.911 1.00 0.00 H +ATOM 718 HZ2 LYS A 72 -22.283 13.661 6.243 1.00 0.00 H +ATOM 719 HZ3 LYS A 72 -21.518 15.141 5.912 1.00 0.00 H +ATOM 720 N ALA A 73 -21.471 10.573 12.961 1.00 25.43 N +ATOM 721 CA ALA A 73 -21.579 9.277 13.620 1.00 21.63 C +ATOM 722 C ALA A 73 -20.795 9.463 14.893 1.00 20.21 C +ATOM 723 O ALA A 73 -19.586 9.688 14.850 1.00 19.42 O +ATOM 724 CB ALA A 73 -20.949 8.191 12.768 1.00 20.24 C +ATOM 725 H ALA A 73 -20.580 10.972 12.888 1.00 0.00 H +ATOM 726 N VAL A 74 -21.482 9.425 16.025 1.00 18.00 N +ATOM 727 CA VAL A 74 -20.818 9.643 17.299 1.00 16.68 C +ATOM 728 C VAL A 74 -21.097 8.577 18.349 1.00 15.51 C +ATOM 729 O VAL A 74 -22.080 7.843 18.274 1.00 13.72 O +ATOM 730 CB VAL A 74 -21.182 11.033 17.887 1.00 17.35 C +ATOM 731 CG1 VAL A 74 -20.785 12.144 16.922 1.00 16.05 C +ATOM 732 CG2 VAL A 74 -22.681 11.105 18.204 1.00 16.37 C +ATOM 733 H VAL A 74 -22.443 9.226 16.005 1.00 0.00 H +ATOM 734 N LEU A 75 -20.201 8.509 19.324 1.00 14.51 N +ATOM 735 CA LEU A 75 -20.294 7.573 20.432 1.00 14.61 C +ATOM 736 C LEU A 75 -20.325 8.438 21.691 1.00 14.17 C +ATOM 737 O LEU A 75 -19.557 9.392 21.810 1.00 13.15 O +ATOM 738 CB LEU A 75 -19.029 6.708 20.474 1.00 15.64 C +ATOM 739 CG LEU A 75 -19.021 5.219 20.807 1.00 15.02 C +ATOM 740 CD1 LEU A 75 -17.616 4.881 21.290 1.00 15.34 C +ATOM 741 CD2 LEU A 75 -20.034 4.877 21.870 1.00 17.85 C +ATOM 742 H LEU A 75 -19.448 9.134 19.323 1.00 0.00 H +ATOM 743 N LYS A 76 -21.217 8.126 22.617 1.00 14.19 N +ATOM 744 CA LYS A 76 -21.304 8.863 23.870 1.00 16.80 C +ATOM 745 C LYS A 76 -21.676 7.815 24.902 1.00 16.69 C +ATOM 746 O LYS A 76 -21.869 6.641 24.563 1.00 15.90 O +ATOM 747 CB LYS A 76 -22.434 9.902 23.849 1.00 20.29 C +ATOM 748 CG LYS A 76 -22.442 10.929 22.739 1.00 27.88 C +ATOM 749 CD LYS A 76 -23.670 11.830 22.921 1.00 31.53 C +ATOM 750 CE LYS A 76 -24.002 12.659 21.678 1.00 35.98 C +ATOM 751 NZ LYS A 76 -23.142 13.864 21.482 1.00 37.29 N1+ +ATOM 752 H LYS A 76 -21.816 7.365 22.477 1.00 0.00 H +ATOM 753 HZ1 LYS A 76 -23.232 14.497 22.302 1.00 0.00 H +ATOM 754 HZ2 LYS A 76 -22.156 13.552 21.387 1.00 0.00 H +ATOM 755 HZ3 LYS A 76 -23.433 14.365 20.619 1.00 0.00 H +ATOM 756 N GLY A 77 -21.866 8.259 26.142 1.00 17.64 N +ATOM 757 CA GLY A 77 -22.259 7.361 27.211 1.00 18.54 C +ATOM 758 C GLY A 77 -21.170 6.424 27.682 1.00 20.98 C +ATOM 759 O GLY A 77 -19.976 6.700 27.504 1.00 20.57 O +ATOM 760 H GLY A 77 -21.729 9.191 26.345 1.00 0.00 H +ATOM 761 N GLY A 78 -21.580 5.304 28.273 1.00 20.90 N +ATOM 762 CA GLY A 78 -20.619 4.346 28.781 1.00 20.76 C +ATOM 763 C GLY A 78 -19.702 5.043 29.769 1.00 21.07 C +ATOM 764 O GLY A 78 -20.183 5.781 30.636 1.00 21.56 O +ATOM 765 H GLY A 78 -22.537 5.129 28.371 1.00 0.00 H +ATOM 766 N PRO A 79 -18.375 4.826 29.674 1.00 20.58 N +ATOM 767 CA PRO A 79 -17.397 5.447 30.569 1.00 19.75 C +ATOM 768 C PRO A 79 -16.931 6.795 30.016 1.00 21.18 C +ATOM 769 O PRO A 79 -16.057 7.447 30.591 1.00 21.31 O +ATOM 770 CB PRO A 79 -16.253 4.450 30.524 1.00 19.43 C +ATOM 771 CG PRO A 79 -16.248 4.066 29.080 1.00 18.14 C +ATOM 772 CD PRO A 79 -17.717 3.840 28.794 1.00 18.45 C +ATOM 773 N LEU A 80 -17.511 7.203 28.893 1.00 21.20 N +ATOM 774 CA LEU A 80 -17.116 8.436 28.235 1.00 21.25 C +ATOM 775 C LEU A 80 -17.818 9.680 28.736 1.00 23.08 C +ATOM 776 O LEU A 80 -18.960 9.637 29.180 1.00 23.60 O +ATOM 777 CB LEU A 80 -17.364 8.319 26.726 1.00 18.00 C +ATOM 778 CG LEU A 80 -16.843 7.072 26.009 1.00 16.61 C +ATOM 779 CD1 LEU A 80 -17.355 7.065 24.587 1.00 14.57 C +ATOM 780 CD2 LEU A 80 -15.323 7.031 26.037 1.00 12.40 C +ATOM 781 H LEU A 80 -18.263 6.711 28.507 1.00 0.00 H +ATOM 782 N ASP A 81 -17.108 10.793 28.671 1.00 25.13 N +ATOM 783 CA ASP A 81 -17.673 12.071 29.024 1.00 28.93 C +ATOM 784 C ASP A 81 -17.294 12.889 27.812 1.00 28.82 C +ATOM 785 O ASP A 81 -16.122 13.155 27.569 1.00 32.05 O +ATOM 786 CB ASP A 81 -17.044 12.655 30.281 1.00 34.37 C +ATOM 787 CG ASP A 81 -17.907 13.741 30.898 1.00 40.09 C +ATOM 788 OD1 ASP A 81 -18.094 14.795 30.249 1.00 43.50 O +ATOM 789 OD2 ASP A 81 -18.429 13.527 32.019 1.00 45.46 O1- +ATOM 790 H ASP A 81 -16.188 10.769 28.346 1.00 0.00 H +ATOM 791 N GLY A 82 -18.278 13.186 26.987 1.00 28.32 N +ATOM 792 CA GLY A 82 -18.004 13.945 25.790 1.00 26.10 C +ATOM 793 C GLY A 82 -18.478 13.160 24.591 1.00 24.89 C +ATOM 794 O GLY A 82 -18.909 12.011 24.706 1.00 25.63 O +ATOM 795 H GLY A 82 -19.183 12.855 27.154 1.00 0.00 H +ATOM 796 N THR A 83 -18.426 13.804 23.440 1.00 23.32 N +ATOM 797 CA THR A 83 -18.845 13.208 22.191 1.00 21.40 C +ATOM 798 C THR A 83 -17.599 12.790 21.448 1.00 19.38 C +ATOM 799 O THR A 83 -16.618 13.533 21.393 1.00 20.11 O +ATOM 800 CB THR A 83 -19.614 14.241 21.358 1.00 22.29 C +ATOM 801 CG2 THR A 83 -20.077 13.657 20.047 1.00 22.57 C +ATOM 802 OG1 THR A 83 -20.747 14.690 22.110 1.00 25.39 O +ATOM 803 H THR A 83 -18.100 14.721 23.412 1.00 0.00 H +ATOM 804 HG1 THR A 83 -21.257 13.922 22.382 1.00 0.00 H +ATOM 805 N TYR A 84 -17.611 11.575 20.928 1.00 17.32 N +ATOM 806 CA TYR A 84 -16.482 11.077 20.171 1.00 15.08 C +ATOM 807 C TYR A 84 -16.949 10.796 18.756 1.00 14.35 C +ATOM 808 O TYR A 84 -17.956 10.111 18.556 1.00 14.79 O +ATOM 809 CB TYR A 84 -15.935 9.808 20.815 1.00 13.15 C +ATOM 810 CG TYR A 84 -15.160 10.046 22.087 1.00 14.07 C +ATOM 811 CD1 TYR A 84 -15.801 10.453 23.255 1.00 12.27 C +ATOM 812 CD2 TYR A 84 -13.780 9.844 22.127 1.00 11.84 C +ATOM 813 CE1 TYR A 84 -15.088 10.646 24.430 1.00 10.78 C +ATOM 814 CE2 TYR A 84 -13.056 10.032 23.293 1.00 12.01 C +ATOM 815 CZ TYR A 84 -13.714 10.430 24.443 1.00 13.12 C +ATOM 816 OH TYR A 84 -12.999 10.584 25.608 1.00 13.42 O +ATOM 817 H TYR A 84 -18.385 10.983 21.063 1.00 0.00 H +ATOM 818 HH TYR A 84 -12.058 10.504 25.416 1.00 0.00 H +ATOM 819 N ARG A 85 -16.235 11.347 17.784 1.00 12.76 N +ATOM 820 CA ARG A 85 -16.566 11.163 16.367 1.00 14.21 C +ATOM 821 C ARG A 85 -15.901 9.974 15.699 1.00 12.20 C +ATOM 822 O ARG A 85 -14.701 9.763 15.859 1.00 12.12 O +ATOM 823 CB ARG A 85 -16.157 12.382 15.546 1.00 16.01 C +ATOM 824 CG ARG A 85 -17.087 13.535 15.634 1.00 19.06 C +ATOM 825 CD ARG A 85 -16.642 14.615 14.694 1.00 18.35 C +ATOM 826 NE ARG A 85 -17.418 15.817 14.935 1.00 22.09 N +ATOM 827 CZ ARG A 85 -16.980 17.052 14.728 1.00 23.16 C +ATOM 828 NH1 ARG A 85 -15.753 17.258 14.255 1.00 21.09 N1+ +ATOM 829 NH2 ARG A 85 -17.765 18.079 15.033 1.00 24.40 N +ATOM 830 H ARG A 85 -15.453 11.891 18.016 1.00 0.00 H +ATOM 831 HE ARG A 85 -18.334 15.691 15.230 1.00 0.00 H +ATOM 832 HH11 ARG A 85 -15.151 16.486 14.052 1.00 0.00 H +ATOM 833 HH12 ARG A 85 -15.430 18.192 14.102 1.00 0.00 H +ATOM 834 HH21 ARG A 85 -18.674 17.903 15.413 1.00 0.00 H +ATOM 835 HH22 ARG A 85 -17.464 19.017 14.891 1.00 0.00 H +ATOM 836 N LEU A 86 -16.676 9.245 14.903 1.00 10.81 N +ATOM 837 CA LEU A 86 -16.172 8.106 14.150 1.00 11.32 C +ATOM 838 C LEU A 86 -15.324 8.653 12.993 1.00 10.59 C +ATOM 839 O LEU A 86 -15.789 9.485 12.214 1.00 10.12 O +ATOM 840 CB LEU A 86 -17.342 7.292 13.578 1.00 8.78 C +ATOM 841 CG LEU A 86 -17.024 6.095 12.669 1.00 10.13 C +ATOM 842 CD1 LEU A 86 -16.181 5.080 13.432 1.00 9.50 C +ATOM 843 CD2 LEU A 86 -18.315 5.448 12.169 1.00 8.29 C +ATOM 844 H LEU A 86 -17.615 9.507 14.789 1.00 0.00 H +ATOM 845 N ILE A 87 -14.082 8.207 12.895 1.00 9.62 N +ATOM 846 CA ILE A 87 -13.221 8.659 11.815 1.00 9.40 C +ATOM 847 C ILE A 87 -12.880 7.498 10.866 1.00 9.70 C +ATOM 848 O ILE A 87 -12.786 7.678 9.650 1.00 9.70 O +ATOM 849 CB ILE A 87 -11.953 9.349 12.364 1.00 10.57 C +ATOM 850 CG1 ILE A 87 -11.087 9.855 11.209 1.00 14.75 C +ATOM 851 CG2 ILE A 87 -11.170 8.416 13.296 1.00 7.97 C +ATOM 852 CD1 ILE A 87 -9.840 10.604 11.670 1.00 16.99 C +ATOM 853 H ILE A 87 -13.746 7.580 13.566 1.00 0.00 H +ATOM 854 N GLN A 88 -12.729 6.300 11.418 1.00 9.55 N +ATOM 855 CA GLN A 88 -12.420 5.136 10.605 1.00 10.38 C +ATOM 856 C GLN A 88 -12.549 3.849 11.378 1.00 8.81 C +ATOM 857 O GLN A 88 -12.591 3.858 12.604 1.00 9.90 O +ATOM 858 CB GLN A 88 -10.991 5.220 10.067 1.00 11.13 C +ATOM 859 CG GLN A 88 -9.910 5.283 11.150 1.00 15.62 C +ATOM 860 CD GLN A 88 -9.086 4.017 11.255 1.00 15.61 C +ATOM 861 NE2 GLN A 88 -7.779 4.170 11.314 1.00 21.17 N +ATOM 862 OE1 GLN A 88 -9.618 2.921 11.293 1.00 16.71 O +ATOM 863 H GLN A 88 -12.829 6.162 12.384 1.00 0.00 H +ATOM 864 HE21 GLN A 88 -7.284 3.320 11.363 1.00 0.00 H +ATOM 865 HE22 GLN A 88 -7.381 5.060 11.297 1.00 0.00 H +ATOM 866 N PHE A 89 -12.699 2.752 10.652 1.00 8.55 N +ATOM 867 CA PHE A 89 -12.721 1.445 11.281 1.00 9.51 C +ATOM 868 C PHE A 89 -11.825 0.554 10.442 1.00 8.34 C +ATOM 869 O PHE A 89 -11.636 0.797 9.242 1.00 8.32 O +ATOM 870 CB PHE A 89 -14.141 0.872 11.477 1.00 9.28 C +ATOM 871 CG PHE A 89 -14.831 0.407 10.217 1.00 10.90 C +ATOM 872 CD1 PHE A 89 -14.443 -0.771 9.573 1.00 10.66 C +ATOM 873 CD2 PHE A 89 -15.942 1.091 9.735 1.00 10.18 C +ATOM 874 CE1 PHE A 89 -15.153 -1.261 8.476 1.00 11.72 C +ATOM 875 CE2 PHE A 89 -16.666 0.608 8.635 1.00 11.57 C +ATOM 876 CZ PHE A 89 -16.272 -0.571 8.004 1.00 11.46 C +ATOM 877 H PHE A 89 -12.749 2.800 9.675 1.00 0.00 H +ATOM 878 N HIS A 90 -11.211 -0.422 11.094 1.00 8.54 N +ATOM 879 CA HIS A 90 -10.321 -1.366 10.438 1.00 6.86 C +ATOM 880 C HIS A 90 -10.441 -2.670 11.188 1.00 8.89 C +ATOM 881 O HIS A 90 -11.147 -2.765 12.203 1.00 8.85 O +ATOM 882 CB HIS A 90 -8.865 -0.880 10.486 1.00 5.71 C +ATOM 883 CG HIS A 90 -8.390 -0.591 11.905 1.00 5.22 C +ATOM 884 CD2 HIS A 90 -7.724 -1.319 12.926 1.00 3.23 C +ATOM 885 ND1 HIS A 90 -8.599 0.626 12.402 1.00 3.43 N +ATOM 886 CE1 HIS A 90 -8.111 0.729 13.670 1.00 3.72 C +ATOM 887 NE2 HIS A 90 -7.571 -0.471 13.996 1.00 2.54 N +ATOM 888 H HIS A 90 -11.331 -0.510 12.064 1.00 0.00 H +ATOM 889 HD1 HIS A 90 -9.060 1.325 11.909 1.00 0.00 H +ATOM 890 N PHE A 91 -9.731 -3.672 10.698 1.00 8.58 N +ATOM 891 CA PHE A 91 -9.760 -4.986 11.302 1.00 8.47 C +ATOM 892 C PHE A 91 -8.353 -5.474 11.496 1.00 8.18 C +ATOM 893 O PHE A 91 -7.413 -4.982 10.873 1.00 7.79 O +ATOM 894 CB PHE A 91 -10.462 -5.998 10.374 1.00 9.80 C +ATOM 895 CG PHE A 91 -11.911 -5.686 10.085 1.00 10.32 C +ATOM 896 CD1 PHE A 91 -12.256 -4.767 9.098 1.00 9.09 C +ATOM 897 CD2 PHE A 91 -12.928 -6.380 10.742 1.00 11.45 C +ATOM 898 CE1 PHE A 91 -13.590 -4.548 8.760 1.00 10.35 C +ATOM 899 CE2 PHE A 91 -14.272 -6.166 10.407 1.00 12.80 C +ATOM 900 CZ PHE A 91 -14.599 -5.248 9.411 1.00 10.24 C +ATOM 901 H PHE A 91 -9.095 -3.488 9.989 1.00 0.00 H +ATOM 902 N HIS A 92 -8.241 -6.470 12.356 1.00 8.41 N +ATOM 903 CA HIS A 92 -6.997 -7.162 12.635 1.00 9.09 C +ATOM 904 C HIS A 92 -7.472 -8.606 12.490 1.00 11.19 C +ATOM 905 O HIS A 92 -8.567 -8.952 12.958 1.00 11.99 O +ATOM 906 CB HIS A 92 -6.519 -6.895 14.057 1.00 8.23 C +ATOM 907 CG HIS A 92 -6.145 -5.450 14.277 1.00 6.75 C +ATOM 908 CD2 HIS A 92 -6.841 -4.303 14.659 1.00 6.42 C +ATOM 909 ND1 HIS A 92 -4.880 -5.074 14.087 1.00 7.68 N +ATOM 910 CE1 HIS A 92 -4.728 -3.752 14.331 1.00 6.73 C +ATOM 911 NE2 HIS A 92 -5.940 -3.270 14.688 1.00 8.52 N +ATOM 912 H HIS A 92 -9.027 -6.743 12.874 1.00 0.00 H +ATOM 913 HD1 HIS A 92 -4.167 -5.661 13.816 1.00 0.00 H +ATOM 914 N TRP A 93 -6.718 -9.423 11.766 1.00 10.12 N +ATOM 915 CA TRP A 93 -7.129 -10.799 11.566 1.00 9.74 C +ATOM 916 C TRP A 93 -5.931 -11.732 11.520 1.00 9.84 C +ATOM 917 O TRP A 93 -4.783 -11.290 11.461 1.00 7.20 O +ATOM 918 CB TRP A 93 -7.994 -10.918 10.302 1.00 11.30 C +ATOM 919 CG TRP A 93 -7.296 -10.514 9.025 1.00 10.01 C +ATOM 920 CD1 TRP A 93 -6.586 -11.328 8.183 1.00 10.66 C +ATOM 921 CD2 TRP A 93 -7.240 -9.201 8.452 1.00 9.90 C +ATOM 922 CE2 TRP A 93 -6.479 -9.294 7.263 1.00 10.18 C +ATOM 923 CE3 TRP A 93 -7.762 -7.958 8.823 1.00 9.66 C +ATOM 924 NE1 TRP A 93 -6.090 -10.599 7.124 1.00 9.49 N +ATOM 925 CZ2 TRP A 93 -6.230 -8.189 6.447 1.00 6.81 C +ATOM 926 CZ3 TRP A 93 -7.513 -6.860 8.007 1.00 9.99 C +ATOM 927 CH2 TRP A 93 -6.755 -6.986 6.834 1.00 9.04 C +ATOM 928 H TRP A 93 -5.869 -9.110 11.400 1.00 0.00 H +ATOM 929 HE1 TRP A 93 -5.529 -10.939 6.386 1.00 0.00 H +ATOM 930 N GLY A 94 -6.202 -13.027 11.583 1.00 10.69 N +ATOM 931 CA GLY A 94 -5.129 -13.996 11.587 1.00 12.13 C +ATOM 932 C GLY A 94 -5.031 -14.819 10.331 1.00 13.22 C +ATOM 933 O GLY A 94 -5.833 -14.664 9.407 1.00 12.26 O +ATOM 934 H GLY A 94 -7.134 -13.339 11.630 1.00 0.00 H +ATOM 935 N SER A 95 -3.998 -15.656 10.281 1.00 13.94 N +ATOM 936 CA SER A 95 -3.770 -16.537 9.145 1.00 13.99 C +ATOM 937 C SER A 95 -4.597 -17.804 9.331 1.00 15.14 C +ATOM 938 O SER A 95 -4.789 -18.568 8.382 1.00 15.75 O +ATOM 939 CB SER A 95 -2.287 -16.901 9.044 1.00 14.10 C +ATOM 940 OG SER A 95 -1.796 -17.369 10.286 1.00 12.21 O +ATOM 941 H SER A 95 -3.363 -15.745 11.015 1.00 0.00 H +ATOM 942 HG SER A 95 -0.927 -17.763 10.131 1.00 0.00 H +ATOM 943 N LEU A 96 -5.089 -18.003 10.558 1.00 14.26 N +ATOM 944 CA LEU A 96 -5.885 -19.163 10.937 1.00 14.02 C +ATOM 945 C LEU A 96 -7.078 -18.655 11.751 1.00 15.13 C +ATOM 946 O LEU A 96 -6.983 -17.616 12.387 1.00 16.07 O +ATOM 947 CB LEU A 96 -5.036 -20.096 11.801 1.00 13.63 C +ATOM 948 CG LEU A 96 -3.760 -20.665 11.175 1.00 14.88 C +ATOM 949 CD1 LEU A 96 -2.865 -21.248 12.235 1.00 16.40 C +ATOM 950 CD2 LEU A 96 -4.109 -21.714 10.143 1.00 16.32 C +ATOM 951 H LEU A 96 -4.955 -17.330 11.250 1.00 0.00 H +ATOM 952 N ASP A 97 -8.172 -19.409 11.785 1.00 15.53 N +ATOM 953 CA ASP A 97 -9.374 -18.994 12.522 1.00 16.17 C +ATOM 954 C ASP A 97 -9.207 -18.844 14.032 1.00 15.60 C +ATOM 955 O ASP A 97 -9.947 -18.102 14.668 1.00 16.14 O +ATOM 956 CB ASP A 97 -10.540 -19.958 12.249 1.00 18.33 C +ATOM 957 CG ASP A 97 -11.083 -19.857 10.827 1.00 19.02 C +ATOM 958 OD1 ASP A 97 -10.666 -18.967 10.061 1.00 23.36 O +ATOM 959 OD2 ASP A 97 -11.951 -20.675 10.474 1.00 22.26 O1- +ATOM 960 H ASP A 97 -8.182 -20.253 11.293 1.00 0.00 H +ATOM 961 N GLY A 98 -8.237 -19.550 14.595 1.00 14.10 N +ATOM 962 CA GLY A 98 -8.009 -19.504 16.025 1.00 15.16 C +ATOM 963 C GLY A 98 -7.153 -18.358 16.528 1.00 15.31 C +ATOM 964 O GLY A 98 -6.723 -18.372 17.677 1.00 15.06 O +ATOM 965 H GLY A 98 -7.661 -20.065 14.012 1.00 0.00 H +ATOM 966 N GLN A 99 -6.863 -17.387 15.672 1.00 14.91 N +ATOM 967 CA GLN A 99 -6.069 -16.234 16.087 1.00 14.33 C +ATOM 968 C GLN A 99 -6.462 -15.057 15.216 1.00 13.40 C +ATOM 969 O GLN A 99 -7.076 -15.238 14.170 1.00 13.71 O +ATOM 970 CB GLN A 99 -4.568 -16.523 15.967 1.00 13.99 C +ATOM 971 CG GLN A 99 -4.069 -16.766 14.547 1.00 14.97 C +ATOM 972 CD GLN A 99 -2.687 -17.375 14.544 1.00 18.01 C +ATOM 973 NE2 GLN A 99 -1.746 -16.723 13.885 1.00 18.25 N +ATOM 974 OE1 GLN A 99 -2.466 -18.412 15.149 1.00 21.06 O +ATOM 975 H GLN A 99 -7.214 -17.376 14.752 1.00 0.00 H +ATOM 976 HE21 GLN A 99 -0.860 -17.143 13.873 1.00 0.00 H +ATOM 977 HE22 GLN A 99 -1.972 -15.896 13.468 1.00 0.00 H +ATOM 978 N GLY A 100 -6.136 -13.850 15.657 1.00 13.06 N +ATOM 979 CA GLY A 100 -6.477 -12.680 14.875 1.00 11.86 C +ATOM 980 C GLY A 100 -6.917 -11.497 15.706 1.00 11.79 C +ATOM 981 O GLY A 100 -6.650 -10.360 15.340 1.00 11.67 O +ATOM 982 H GLY A 100 -5.697 -13.740 16.505 1.00 0.00 H +ATOM 983 N SER A 101 -7.638 -11.743 16.794 1.00 11.71 N +ATOM 984 CA SER A 101 -8.071 -10.643 17.642 1.00 10.85 C +ATOM 985 C SER A 101 -6.860 -10.187 18.442 1.00 10.54 C +ATOM 986 O SER A 101 -5.891 -10.931 18.597 1.00 11.51 O +ATOM 987 CB SER A 101 -9.202 -11.083 18.577 1.00 10.45 C +ATOM 988 OG SER A 101 -8.764 -12.060 19.503 1.00 10.59 O +ATOM 989 H SER A 101 -7.885 -12.663 17.036 1.00 0.00 H +ATOM 990 HG SER A 101 -8.312 -11.632 20.249 1.00 0.00 H +ATOM 991 N GLU A 102 -6.887 -8.945 18.899 1.00 9.25 N +ATOM 992 CA GLU A 102 -5.785 -8.420 19.676 1.00 9.12 C +ATOM 993 C GLU A 102 -6.107 -8.632 21.149 1.00 10.24 C +ATOM 994 O GLU A 102 -5.261 -9.076 21.925 1.00 8.68 O +ATOM 995 CB GLU A 102 -5.584 -6.949 19.346 1.00 10.35 C +ATOM 996 CG GLU A 102 -5.454 -6.690 17.859 1.00 9.64 C +ATOM 997 CD GLU A 102 -4.686 -5.433 17.572 1.00 13.52 C +ATOM 998 OE1 GLU A 102 -5.214 -4.331 17.838 1.00 10.11 O +ATOM 999 OE2 GLU A 102 -3.545 -5.552 17.084 1.00 13.93 O1- +ATOM 1000 H GLU A 102 -7.626 -8.377 18.637 1.00 0.00 H +ATOM 1001 N HIS A 103 -7.319 -8.251 21.542 1.00 9.29 N +ATOM 1002 CA HIS A 103 -7.767 -8.467 22.905 1.00 9.96 C +ATOM 1003 C HIS A 103 -8.163 -9.929 22.950 1.00 10.99 C +ATOM 1004 O HIS A 103 -8.496 -10.517 21.919 1.00 10.93 O +ATOM 1005 CB HIS A 103 -8.992 -7.614 23.222 1.00 8.86 C +ATOM 1006 CG HIS A 103 -8.673 -6.182 23.487 1.00 7.00 C +ATOM 1007 CD2 HIS A 103 -8.300 -5.550 24.622 1.00 8.18 C +ATOM 1008 ND1 HIS A 103 -8.657 -5.228 22.495 1.00 6.84 N +ATOM 1009 CE1 HIS A 103 -8.279 -4.071 23.005 1.00 7.31 C +ATOM 1010 NE2 HIS A 103 -8.058 -4.239 24.295 1.00 6.30 N +ATOM 1011 H HIS A 103 -7.908 -7.872 20.887 1.00 0.00 H +ATOM 1012 HD1 HIS A 103 -8.897 -5.344 21.563 1.00 0.00 H +ATOM 1013 HE2 HIS A 103 -7.835 -3.529 24.919 1.00 0.00 H +ATOM 1014 N THR A 104 -8.079 -10.529 24.127 1.00 12.62 N +ATOM 1015 CA THR A 104 -8.461 -11.916 24.292 1.00 13.79 C +ATOM 1016 C THR A 104 -9.359 -11.941 25.526 1.00 14.90 C +ATOM 1017 O THR A 104 -9.318 -11.029 26.353 1.00 14.11 O +ATOM 1018 CB THR A 104 -7.223 -12.836 24.507 1.00 13.95 C +ATOM 1019 CG2 THR A 104 -6.314 -12.849 23.274 1.00 12.14 C +ATOM 1020 OG1 THR A 104 -6.471 -12.375 25.629 1.00 14.67 O +ATOM 1021 H THR A 104 -7.754 -10.063 24.927 1.00 0.00 H +ATOM 1022 HG1 THR A 104 -5.586 -12.739 25.542 1.00 0.00 H +ATOM 1023 N VAL A 105 -10.218 -12.942 25.624 1.00 14.98 N +ATOM 1024 CA VAL A 105 -11.098 -13.039 26.776 1.00 15.40 C +ATOM 1025 C VAL A 105 -10.704 -14.344 27.453 1.00 16.13 C +ATOM 1026 O VAL A 105 -10.786 -15.402 26.844 1.00 16.41 O +ATOM 1027 CB VAL A 105 -12.593 -13.039 26.351 1.00 15.74 C +ATOM 1028 CG1 VAL A 105 -13.495 -13.023 27.581 1.00 14.64 C +ATOM 1029 CG2 VAL A 105 -12.889 -11.817 25.493 1.00 13.77 C +ATOM 1030 H VAL A 105 -10.255 -13.631 24.924 1.00 0.00 H +ATOM 1031 N ASP A 106 -10.187 -14.253 28.674 1.00 15.84 N +ATOM 1032 CA ASP A 106 -9.743 -15.432 29.409 1.00 17.85 C +ATOM 1033 C ASP A 106 -8.742 -16.200 28.559 1.00 18.02 C +ATOM 1034 O ASP A 106 -8.803 -17.414 28.462 1.00 19.09 O +ATOM 1035 CB ASP A 106 -10.930 -16.336 29.765 1.00 17.56 C +ATOM 1036 CG ASP A 106 -11.895 -15.687 30.745 1.00 17.58 C +ATOM 1037 OD1 ASP A 106 -11.464 -14.868 31.583 1.00 14.75 O +ATOM 1038 OD2 ASP A 106 -13.092 -16.015 30.680 1.00 19.26 O1- +ATOM 1039 H ASP A 106 -10.116 -13.365 29.076 1.00 0.00 H +ATOM 1040 N LYS A 107 -7.866 -15.457 27.891 1.00 19.50 N +ATOM 1041 CA LYS A 107 -6.831 -16.001 27.017 1.00 19.17 C +ATOM 1042 C LYS A 107 -7.357 -16.510 25.679 1.00 19.19 C +ATOM 1043 O LYS A 107 -6.577 -16.932 24.829 1.00 19.49 O +ATOM 1044 CB LYS A 107 -6.042 -17.100 27.717 1.00 21.61 C +ATOM 1045 CG LYS A 107 -5.292 -16.643 28.953 1.00 25.81 C +ATOM 1046 CD LYS A 107 -4.283 -15.561 28.619 1.00 29.10 C +ATOM 1047 CE LYS A 107 -3.166 -15.519 29.652 1.00 32.57 C +ATOM 1048 NZ LYS A 107 -3.668 -15.417 31.053 1.00 35.16 N1+ +ATOM 1049 H LYS A 107 -7.981 -14.506 27.973 1.00 0.00 H +ATOM 1050 HZ1 LYS A 107 -4.233 -14.549 31.156 1.00 0.00 H +ATOM 1051 HZ2 LYS A 107 -4.260 -16.244 31.274 1.00 0.00 H +ATOM 1052 HZ3 LYS A 107 -2.861 -15.385 31.708 1.00 0.00 H +ATOM 1053 N LYS A 108 -8.670 -16.459 25.486 1.00 19.54 N +ATOM 1054 CA LYS A 108 -9.283 -16.908 24.238 1.00 21.37 C +ATOM 1055 C LYS A 108 -9.142 -15.866 23.124 1.00 20.33 C +ATOM 1056 O LYS A 108 -9.470 -14.686 23.314 1.00 17.78 O +ATOM 1057 CB LYS A 108 -10.771 -17.225 24.438 1.00 25.11 C +ATOM 1058 CG LYS A 108 -11.481 -17.673 23.157 1.00 30.72 C +ATOM 1059 CD LYS A 108 -12.995 -17.509 23.239 1.00 35.93 C +ATOM 1060 CE LYS A 108 -13.691 -18.139 22.030 1.00 37.03 C +ATOM 1061 NZ LYS A 108 -13.223 -17.579 20.734 1.00 40.45 N1+ +ATOM 1062 H LYS A 108 -9.249 -16.151 26.199 1.00 0.00 H +ATOM 1063 HZ1 LYS A 108 -13.405 -16.555 20.717 1.00 0.00 H +ATOM 1064 HZ2 LYS A 108 -12.203 -17.749 20.628 1.00 0.00 H +ATOM 1065 HZ3 LYS A 108 -13.735 -18.035 19.952 1.00 0.00 H +ATOM 1066 N LYS A 109 -8.686 -16.327 21.960 1.00 19.15 N +ATOM 1067 CA LYS A 109 -8.505 -15.482 20.784 1.00 18.74 C +ATOM 1068 C LYS A 109 -9.648 -15.719 19.815 1.00 17.24 C +ATOM 1069 O LYS A 109 -10.162 -16.831 19.713 1.00 18.75 O +ATOM 1070 CB LYS A 109 -7.201 -15.826 20.059 1.00 18.80 C +ATOM 1071 CG LYS A 109 -5.915 -15.525 20.809 1.00 20.47 C +ATOM 1072 CD LYS A 109 -4.738 -16.064 20.003 1.00 23.90 C +ATOM 1073 CE LYS A 109 -3.405 -15.557 20.512 1.00 25.59 C +ATOM 1074 NZ LYS A 109 -3.046 -16.098 21.844 1.00 29.59 N1+ +ATOM 1075 H LYS A 109 -8.494 -17.283 21.864 1.00 0.00 H +ATOM 1076 HZ1 LYS A 109 -2.996 -17.135 21.795 1.00 0.00 H +ATOM 1077 HZ2 LYS A 109 -2.124 -15.718 22.137 1.00 0.00 H +ATOM 1078 HZ3 LYS A 109 -3.772 -15.818 22.534 1.00 0.00 H +ATOM 1079 N TYR A 110 -10.062 -14.660 19.132 1.00 16.77 N +ATOM 1080 CA TYR A 110 -11.117 -14.737 18.131 1.00 15.18 C +ATOM 1081 C TYR A 110 -10.447 -14.652 16.762 1.00 14.08 C +ATOM 1082 O TYR A 110 -9.269 -14.308 16.674 1.00 13.65 O +ATOM 1083 CB TYR A 110 -12.123 -13.601 18.318 1.00 15.70 C +ATOM 1084 CG TYR A 110 -13.087 -13.855 19.448 1.00 17.93 C +ATOM 1085 CD1 TYR A 110 -12.768 -13.503 20.764 1.00 17.82 C +ATOM 1086 CD2 TYR A 110 -14.314 -14.467 19.207 1.00 17.96 C +ATOM 1087 CE1 TYR A 110 -13.654 -13.755 21.809 1.00 19.21 C +ATOM 1088 CE2 TYR A 110 -15.203 -14.723 20.243 1.00 20.68 C +ATOM 1089 CZ TYR A 110 -14.868 -14.365 21.539 1.00 20.54 C +ATOM 1090 OH TYR A 110 -15.758 -14.622 22.556 1.00 23.36 O +ATOM 1091 H TYR A 110 -9.624 -13.796 19.290 1.00 0.00 H +ATOM 1092 HH TYR A 110 -15.415 -14.276 23.385 1.00 0.00 H +ATOM 1093 N ALA A 111 -11.205 -14.923 15.703 1.00 14.83 N +ATOM 1094 CA ALA A 111 -10.677 -14.907 14.337 1.00 14.07 C +ATOM 1095 C ALA A 111 -10.255 -13.527 13.847 1.00 14.65 C +ATOM 1096 O ALA A 111 -9.398 -13.400 12.968 1.00 13.99 O +ATOM 1097 CB ALA A 111 -11.700 -15.501 13.380 1.00 13.75 C +ATOM 1098 H ALA A 111 -12.149 -15.125 15.844 1.00 0.00 H +ATOM 1099 N ALA A 112 -10.887 -12.491 14.379 1.00 13.80 N +ATOM 1100 CA ALA A 112 -10.571 -11.130 13.964 1.00 12.93 C +ATOM 1101 C ALA A 112 -11.119 -10.172 14.995 1.00 12.44 C +ATOM 1102 O ALA A 112 -11.816 -10.584 15.926 1.00 12.36 O +ATOM 1103 CB ALA A 112 -11.191 -10.831 12.586 1.00 11.54 C +ATOM 1104 H ALA A 112 -11.567 -12.625 15.071 1.00 0.00 H +ATOM 1105 N GLU A 113 -10.790 -8.900 14.829 1.00 10.78 N +ATOM 1106 CA GLU A 113 -11.255 -7.873 15.730 1.00 9.83 C +ATOM 1107 C GLU A 113 -11.438 -6.560 14.979 1.00 9.61 C +ATOM 1108 O GLU A 113 -10.540 -6.082 14.280 1.00 11.12 O +ATOM 1109 CB GLU A 113 -10.283 -7.693 16.889 1.00 8.44 C +ATOM 1110 CG GLU A 113 -10.832 -6.813 18.001 1.00 10.78 C +ATOM 1111 CD GLU A 113 -9.916 -6.766 19.212 1.00 10.35 C +ATOM 1112 OE1 GLU A 113 -9.325 -7.812 19.551 1.00 9.51 O +ATOM 1113 OE2 GLU A 113 -9.790 -5.689 19.828 1.00 10.41 O1- +ATOM 1114 H GLU A 113 -10.213 -8.627 14.080 1.00 0.00 H +ATOM 1115 N LEU A 114 -12.637 -6.016 15.095 1.00 8.00 N +ATOM 1116 CA LEU A 114 -13.000 -4.770 14.461 1.00 8.55 C +ATOM 1117 C LEU A 114 -12.780 -3.612 15.432 1.00 9.69 C +ATOM 1118 O LEU A 114 -13.205 -3.670 16.589 1.00 12.30 O +ATOM 1119 CB LEU A 114 -14.476 -4.835 14.066 1.00 6.66 C +ATOM 1120 CG LEU A 114 -15.208 -3.577 13.613 1.00 6.74 C +ATOM 1121 CD1 LEU A 114 -14.578 -2.996 12.346 1.00 5.63 C +ATOM 1122 CD2 LEU A 114 -16.655 -3.965 13.352 1.00 6.57 C +ATOM 1123 H LEU A 114 -13.303 -6.457 15.647 1.00 0.00 H +ATOM 1124 N HIS A 115 -12.107 -2.572 14.960 1.00 10.07 N +ATOM 1125 CA HIS A 115 -11.863 -1.387 15.762 1.00 8.66 C +ATOM 1126 C HIS A 115 -12.507 -0.182 15.099 1.00 9.87 C +ATOM 1127 O HIS A 115 -12.185 0.149 13.945 1.00 9.86 O +ATOM 1128 CB HIS A 115 -10.368 -1.133 15.906 1.00 7.01 C +ATOM 1129 CG HIS A 115 -9.677 -2.186 16.736 1.00 7.14 C +ATOM 1130 CD2 HIS A 115 -10.067 -3.067 17.757 1.00 6.89 C +ATOM 1131 ND1 HIS A 115 -8.357 -2.316 16.615 1.00 10.00 N +ATOM 1132 CE1 HIS A 115 -7.883 -3.227 17.509 1.00 7.80 C +ATOM 1133 NE2 HIS A 115 -8.937 -3.688 18.212 1.00 7.99 N +ATOM 1134 H HIS A 115 -11.749 -2.599 14.049 1.00 0.00 H +ATOM 1135 HE2 HIS A 115 -8.844 -4.315 18.923 1.00 0.00 H +ATOM 1136 N LEU A 116 -13.474 0.420 15.792 1.00 8.30 N +ATOM 1137 CA LEU A 116 -14.147 1.623 15.302 1.00 9.06 C +ATOM 1138 C LEU A 116 -13.493 2.750 16.082 1.00 9.94 C +ATOM 1139 O LEU A 116 -13.666 2.858 17.304 1.00 9.75 O +ATOM 1140 CB LEU A 116 -15.651 1.554 15.553 1.00 8.42 C +ATOM 1141 CG LEU A 116 -16.341 0.460 14.712 1.00 11.02 C +ATOM 1142 CD1 LEU A 116 -17.248 -0.384 15.570 1.00 10.69 C +ATOM 1143 CD2 LEU A 116 -17.126 1.071 13.565 1.00 10.31 C +ATOM 1144 H LEU A 116 -13.713 0.019 16.654 1.00 0.00 H +ATOM 1145 N VAL A 117 -12.685 3.539 15.378 1.00 8.73 N +ATOM 1146 CA VAL A 117 -11.923 4.631 15.978 1.00 9.04 C +ATOM 1147 C VAL A 117 -12.661 5.966 16.039 1.00 9.55 C +ATOM 1148 O VAL A 117 -13.151 6.469 15.017 1.00 9.13 O +ATOM 1149 CB VAL A 117 -10.544 4.782 15.260 1.00 8.91 C +ATOM 1150 CG1 VAL A 117 -9.632 5.750 16.016 1.00 8.19 C +ATOM 1151 CG2 VAL A 117 -9.883 3.421 15.145 1.00 7.00 C +ATOM 1152 H VAL A 117 -12.593 3.381 14.415 1.00 0.00 H +ATOM 1153 N HIS A 118 -12.742 6.517 17.254 1.00 8.63 N +ATOM 1154 CA HIS A 118 -13.415 7.786 17.518 1.00 8.79 C +ATOM 1155 C HIS A 118 -12.473 8.744 18.230 1.00 9.78 C +ATOM 1156 O HIS A 118 -11.606 8.309 18.984 1.00 9.76 O +ATOM 1157 CB HIS A 118 -14.612 7.573 18.445 1.00 8.47 C +ATOM 1158 CG HIS A 118 -15.550 6.500 17.994 1.00 6.85 C +ATOM 1159 CD2 HIS A 118 -16.774 6.572 17.422 1.00 4.87 C +ATOM 1160 ND1 HIS A 118 -15.264 5.158 18.124 1.00 6.08 N +ATOM 1161 CE1 HIS A 118 -16.272 4.448 17.648 1.00 6.28 C +ATOM 1162 NE2 HIS A 118 -17.201 5.282 17.219 1.00 7.11 N +ATOM 1163 H HIS A 118 -12.297 6.081 18.013 1.00 0.00 H +ATOM 1164 HD1 HIS A 118 -14.436 4.780 18.509 1.00 0.00 H +ATOM 1165 HE2 HIS A 118 -18.069 5.034 16.838 1.00 0.00 H +ATOM 1166 N TRP A 119 -12.638 10.044 17.989 1.00 10.59 N +ATOM 1167 CA TRP A 119 -11.820 11.044 18.667 1.00 11.57 C +ATOM 1168 C TRP A 119 -12.715 12.046 19.409 1.00 12.07 C +ATOM 1169 O TRP A 119 -13.829 12.345 18.971 1.00 11.31 O +ATOM 1170 CB TRP A 119 -10.834 11.732 17.705 1.00 12.65 C +ATOM 1171 CG TRP A 119 -11.457 12.426 16.549 1.00 13.81 C +ATOM 1172 CD1 TRP A 119 -11.807 11.873 15.353 1.00 13.24 C +ATOM 1173 CD2 TRP A 119 -11.831 13.808 16.481 1.00 13.90 C +ATOM 1174 CE2 TRP A 119 -12.412 14.019 15.208 1.00 14.82 C +ATOM 1175 CE3 TRP A 119 -11.739 14.888 17.374 1.00 14.26 C +ATOM 1176 NE1 TRP A 119 -12.384 12.820 14.545 1.00 14.93 N +ATOM 1177 CZ2 TRP A 119 -12.903 15.268 14.801 1.00 13.54 C +ATOM 1178 CZ3 TRP A 119 -12.228 16.131 16.973 1.00 14.60 C +ATOM 1179 CH2 TRP A 119 -12.804 16.309 15.693 1.00 13.66 C +ATOM 1180 H TRP A 119 -13.316 10.341 17.344 1.00 0.00 H +ATOM 1181 HE1 TRP A 119 -12.802 12.625 13.687 1.00 0.00 H +ATOM 1182 N ASN A 120 -12.248 12.494 20.571 1.00 12.71 N +ATOM 1183 CA ASN A 120 -12.972 13.436 21.425 1.00 14.06 C +ATOM 1184 C ASN A 120 -13.084 14.820 20.766 1.00 14.79 C +ATOM 1185 O ASN A 120 -12.090 15.542 20.617 1.00 13.43 O +ATOM 1186 CB ASN A 120 -12.253 13.540 22.770 1.00 13.78 C +ATOM 1187 CG ASN A 120 -13.129 14.112 23.857 1.00 16.80 C +ATOM 1188 ND2 ASN A 120 -12.910 13.657 25.086 1.00 16.12 N +ATOM 1189 OD1 ASN A 120 -14.000 14.951 23.601 1.00 16.60 O +ATOM 1190 H ASN A 120 -11.363 12.228 20.842 1.00 0.00 H +ATOM 1191 HD21 ASN A 120 -13.489 14.000 25.793 1.00 0.00 H +ATOM 1192 HD22 ASN A 120 -12.207 12.987 25.238 1.00 0.00 H +ATOM 1193 N THR A 121 -14.306 15.205 20.416 1.00 14.42 N +ATOM 1194 CA THR A 121 -14.536 16.474 19.735 1.00 16.72 C +ATOM 1195 C THR A 121 -14.101 17.732 20.481 1.00 18.48 C +ATOM 1196 O THR A 121 -13.821 18.755 19.854 1.00 19.76 O +ATOM 1197 CB THR A 121 -15.992 16.613 19.314 1.00 15.48 C +ATOM 1198 CG2 THR A 121 -16.368 15.473 18.388 1.00 16.17 C +ATOM 1199 OG1 THR A 121 -16.826 16.572 20.480 1.00 18.60 O +ATOM 1200 H THR A 121 -15.056 14.612 20.629 1.00 0.00 H +ATOM 1201 HG1 THR A 121 -16.728 15.710 20.901 1.00 0.00 H +ATOM 1202 N LYS A 123 -14.007 17.672 21.804 1.00 19.27 N +ATOM 1203 CA LYS A 123 -13.581 18.852 22.534 1.00 21.01 C +ATOM 1204 C LYS A 123 -12.162 19.257 22.159 1.00 21.63 C +ATOM 1205 O LYS A 123 -11.742 20.378 22.448 1.00 22.61 O +ATOM 1206 CB LYS A 123 -13.697 18.655 24.044 1.00 24.38 C +ATOM 1207 CG LYS A 123 -12.652 17.769 24.699 1.00 25.92 C +ATOM 1208 CD LYS A 123 -12.943 17.727 26.191 1.00 29.30 C +ATOM 1209 CE LYS A 123 -11.930 16.916 26.966 1.00 33.38 C +ATOM 1210 NZ LYS A 123 -12.226 16.893 28.435 1.00 35.61 N1+ +ATOM 1211 H LYS A 123 -14.222 16.842 22.281 1.00 0.00 H +ATOM 1212 HZ1 LYS A 123 -13.168 16.482 28.592 1.00 0.00 H +ATOM 1213 HZ2 LYS A 123 -11.511 16.317 28.923 1.00 0.00 H +ATOM 1214 HZ3 LYS A 123 -12.204 17.864 28.807 1.00 0.00 H +ATOM 1215 N TYR A 124 -11.442 18.362 21.483 1.00 19.82 N +ATOM 1216 CA TYR A 124 -10.076 18.644 21.076 1.00 19.99 C +ATOM 1217 C TYR A 124 -9.893 19.230 19.678 1.00 20.18 C +ATOM 1218 O TYR A 124 -8.760 19.404 19.224 1.00 21.84 O +ATOM 1219 CB TYR A 124 -9.192 17.413 21.280 1.00 19.77 C +ATOM 1220 CG TYR A 124 -9.077 17.044 22.733 1.00 20.86 C +ATOM 1221 CD1 TYR A 124 -8.685 17.991 23.678 1.00 21.09 C +ATOM 1222 CD2 TYR A 124 -9.423 15.774 23.177 1.00 20.95 C +ATOM 1223 CE1 TYR A 124 -8.652 17.682 25.026 1.00 22.25 C +ATOM 1224 CE2 TYR A 124 -9.391 15.453 24.520 1.00 21.64 C +ATOM 1225 CZ TYR A 124 -9.009 16.412 25.441 1.00 22.06 C +ATOM 1226 OH TYR A 124 -8.993 16.098 26.776 1.00 22.73 O +ATOM 1227 H TYR A 124 -11.814 17.487 21.250 1.00 0.00 H +ATOM 1228 HH TYR A 124 -9.580 15.358 26.913 1.00 0.00 H +ATOM 1229 N GLY A 125 -10.989 19.505 18.982 1.00 20.27 N +ATOM 1230 CA GLY A 125 -10.890 20.126 17.667 1.00 20.68 C +ATOM 1231 C GLY A 125 -10.638 19.257 16.454 1.00 20.79 C +ATOM 1232 O GLY A 125 -11.343 19.377 15.458 1.00 21.93 O +ATOM 1233 H GLY A 125 -11.875 19.301 19.349 1.00 0.00 H +ATOM 1234 N ASP A 126 -9.567 18.478 16.468 1.00 19.93 N +ATOM 1235 CA ASP A 126 -9.286 17.591 15.349 1.00 19.56 C +ATOM 1236 C ASP A 126 -8.584 16.353 15.880 1.00 18.78 C +ATOM 1237 O ASP A 126 -8.188 16.317 17.051 1.00 18.52 O +ATOM 1238 CB ASP A 126 -8.497 18.289 14.215 1.00 20.75 C +ATOM 1239 CG ASP A 126 -7.091 18.715 14.618 1.00 22.06 C +ATOM 1240 OD1 ASP A 126 -6.257 17.863 14.966 1.00 27.53 O +ATOM 1241 OD2 ASP A 126 -6.781 19.912 14.527 1.00 26.47 O1- +ATOM 1242 H ASP A 126 -8.982 18.476 17.259 1.00 0.00 H +ATOM 1243 N PHE A 127 -8.476 15.330 15.037 1.00 17.03 N +ATOM 1244 CA PHE A 127 -7.847 14.072 15.410 1.00 16.70 C +ATOM 1245 C PHE A 127 -6.424 14.257 15.921 1.00 16.86 C +ATOM 1246 O PHE A 127 -6.030 13.644 16.914 1.00 15.41 O +ATOM 1247 CB PHE A 127 -7.865 13.100 14.229 1.00 16.10 C +ATOM 1248 CG PHE A 127 -7.302 11.749 14.552 1.00 18.37 C +ATOM 1249 CD1 PHE A 127 -8.084 10.793 15.175 1.00 18.59 C +ATOM 1250 CD2 PHE A 127 -5.975 11.444 14.261 1.00 20.94 C +ATOM 1251 CE1 PHE A 127 -7.560 9.547 15.511 1.00 20.37 C +ATOM 1252 CE2 PHE A 127 -5.434 10.201 14.592 1.00 21.22 C +ATOM 1253 CZ PHE A 127 -6.233 9.251 15.220 1.00 22.08 C +ATOM 1254 H PHE A 127 -8.857 15.424 14.142 1.00 0.00 H +ATOM 1255 N GLY A 128 -5.665 15.116 15.245 1.00 17.83 N +ATOM 1256 CA GLY A 128 -4.286 15.379 15.634 1.00 17.25 C +ATOM 1257 C GLY A 128 -4.126 15.914 17.044 1.00 17.44 C +ATOM 1258 O GLY A 128 -3.143 15.616 17.710 1.00 18.75 O +ATOM 1259 H GLY A 128 -6.033 15.565 14.461 1.00 0.00 H +ATOM 1260 N LYS A 129 -5.065 16.735 17.499 1.00 17.56 N +ATOM 1261 CA LYS A 129 -4.995 17.266 18.850 1.00 16.84 C +ATOM 1262 C LYS A 129 -5.427 16.175 19.837 1.00 17.80 C +ATOM 1263 O LYS A 129 -4.871 16.059 20.937 1.00 18.26 O +ATOM 1264 CB LYS A 129 -5.905 18.479 18.994 1.00 18.42 C +ATOM 1265 CG LYS A 129 -5.606 19.604 18.023 1.00 21.53 C +ATOM 1266 CD LYS A 129 -4.184 20.140 18.185 1.00 22.80 C +ATOM 1267 CE LYS A 129 -3.857 21.152 17.089 1.00 21.43 C +ATOM 1268 NZ LYS A 129 -4.014 20.578 15.708 1.00 22.72 N1+ +ATOM 1269 H LYS A 129 -5.833 16.966 16.943 1.00 0.00 H +ATOM 1270 HZ1 LYS A 129 -3.376 19.765 15.596 1.00 0.00 H +ATOM 1271 HZ2 LYS A 129 -4.996 20.267 15.571 1.00 0.00 H +ATOM 1272 HZ3 LYS A 129 -3.779 21.303 15.000 1.00 0.00 H +ATOM 1273 N ALA A 130 -6.395 15.359 19.427 1.00 16.20 N +ATOM 1274 CA ALA A 130 -6.906 14.279 20.268 1.00 16.77 C +ATOM 1275 C ALA A 130 -5.822 13.277 20.667 1.00 16.82 C +ATOM 1276 O ALA A 130 -5.800 12.789 21.811 1.00 16.94 O +ATOM 1277 CB ALA A 130 -8.071 13.565 19.568 1.00 15.93 C +ATOM 1278 H ALA A 130 -6.797 15.489 18.543 1.00 0.00 H +ATOM 1279 N VAL A 131 -4.896 12.999 19.748 1.00 17.65 N +ATOM 1280 CA VAL A 131 -3.814 12.058 20.028 1.00 18.89 C +ATOM 1281 C VAL A 131 -2.741 12.602 20.966 1.00 20.08 C +ATOM 1282 O VAL A 131 -1.700 11.981 21.155 1.00 21.78 O +ATOM 1283 CB VAL A 131 -3.159 11.504 18.737 1.00 20.67 C +ATOM 1284 CG1 VAL A 131 -4.164 10.670 17.969 1.00 20.37 C +ATOM 1285 CG2 VAL A 131 -2.619 12.626 17.874 1.00 18.85 C +ATOM 1286 H VAL A 131 -4.963 13.420 18.863 1.00 0.00 H +ATOM 1287 N GLN A 132 -2.990 13.772 21.540 1.00 20.73 N +ATOM 1288 CA GLN A 132 -2.062 14.376 22.487 1.00 21.72 C +ATOM 1289 C GLN A 132 -2.740 14.385 23.855 1.00 20.07 C +ATOM 1290 O GLN A 132 -2.233 14.992 24.801 1.00 21.67 O +ATOM 1291 CB GLN A 132 -1.750 15.824 22.089 1.00 24.22 C +ATOM 1292 CG GLN A 132 -1.070 15.985 20.739 1.00 29.67 C +ATOM 1293 CD GLN A 132 -0.952 17.443 20.320 1.00 32.32 C +ATOM 1294 NE2 GLN A 132 -1.545 17.778 19.182 1.00 34.21 N +ATOM 1295 OE1 GLN A 132 -0.331 18.256 21.007 1.00 34.55 O +ATOM 1296 H GLN A 132 -3.805 14.269 21.337 1.00 0.00 H +ATOM 1297 HE21 GLN A 132 -1.482 18.714 18.910 1.00 0.00 H +ATOM 1298 HE22 GLN A 132 -2.008 17.072 18.678 1.00 0.00 H +ATOM 1299 N GLN A 133 -3.886 13.720 23.962 1.00 17.80 N +ATOM 1300 CA GLN A 133 -4.633 13.709 25.211 1.00 15.35 C +ATOM 1301 C GLN A 133 -4.944 12.316 25.714 1.00 14.16 C +ATOM 1302 O GLN A 133 -5.303 11.429 24.930 1.00 12.73 O +ATOM 1303 CB GLN A 133 -5.937 14.482 25.030 1.00 17.73 C +ATOM 1304 CG GLN A 133 -5.752 15.905 24.551 1.00 21.90 C +ATOM 1305 CD GLN A 133 -5.135 16.803 25.598 1.00 22.61 C +ATOM 1306 NE2 GLN A 133 -4.327 17.746 25.152 1.00 24.71 N +ATOM 1307 OE1 GLN A 133 -5.385 16.655 26.793 1.00 25.12 O +ATOM 1308 H GLN A 133 -4.238 13.194 23.211 1.00 0.00 H +ATOM 1309 HE21 GLN A 133 -3.932 18.337 25.819 1.00 0.00 H +ATOM 1310 HE22 GLN A 133 -4.167 17.802 24.196 1.00 0.00 H +ATOM 1311 N PRO A 134 -4.909 12.130 27.047 1.00 13.70 N +ATOM 1312 CA PRO A 134 -5.176 10.856 27.725 1.00 14.27 C +ATOM 1313 C PRO A 134 -6.603 10.351 27.519 1.00 14.74 C +ATOM 1314 O PRO A 134 -6.884 9.174 27.714 1.00 15.32 O +ATOM 1315 CB PRO A 134 -4.889 11.184 29.197 1.00 14.83 C +ATOM 1316 CG PRO A 134 -5.206 12.633 29.292 1.00 13.86 C +ATOM 1317 CD PRO A 134 -4.611 13.188 28.031 1.00 14.52 C +ATOM 1318 N ASP A 135 -7.498 11.250 27.124 1.00 15.03 N +ATOM 1319 CA ASP A 135 -8.889 10.888 26.866 1.00 15.11 C +ATOM 1320 C ASP A 135 -9.269 11.329 25.449 1.00 13.31 C +ATOM 1321 O ASP A 135 -10.426 11.621 25.165 1.00 14.61 O +ATOM 1322 CB ASP A 135 -9.813 11.543 27.899 1.00 17.66 C +ATOM 1323 CG ASP A 135 -9.710 13.055 27.909 1.00 18.27 C +ATOM 1324 OD1 ASP A 135 -8.710 13.608 27.415 1.00 18.76 O +ATOM 1325 OD2 ASP A 135 -10.639 13.704 28.426 1.00 23.85 O1- +ATOM 1326 H ASP A 135 -7.208 12.172 26.994 1.00 0.00 H +ATOM 1327 N GLY A 136 -8.283 11.329 24.558 1.00 13.10 N +ATOM 1328 CA GLY A 136 -8.500 11.765 23.196 1.00 11.07 C +ATOM 1329 C GLY A 136 -9.245 10.825 22.278 1.00 10.64 C +ATOM 1330 O GLY A 136 -10.010 11.278 21.427 1.00 10.30 O +ATOM 1331 H GLY A 136 -7.391 10.995 24.798 1.00 0.00 H +ATOM 1332 N LEU A 137 -9.046 9.524 22.446 1.00 10.29 N +ATOM 1333 CA LEU A 137 -9.696 8.557 21.577 1.00 9.76 C +ATOM 1334 C LEU A 137 -10.532 7.554 22.331 1.00 10.59 C +ATOM 1335 O LEU A 137 -10.302 7.286 23.513 1.00 12.07 O +ATOM 1336 CB LEU A 137 -8.655 7.780 20.763 1.00 8.10 C +ATOM 1337 CG LEU A 137 -7.643 8.524 19.893 1.00 10.81 C +ATOM 1338 CD1 LEU A 137 -6.774 7.508 19.168 1.00 10.85 C +ATOM 1339 CD2 LEU A 137 -8.352 9.415 18.900 1.00 9.94 C +ATOM 1340 H LEU A 137 -8.477 9.197 23.174 1.00 0.00 H +ATOM 1341 N ALA A 138 -11.494 6.985 21.623 1.00 9.61 N +ATOM 1342 CA ALA A 138 -12.355 5.957 22.175 1.00 10.48 C +ATOM 1343 C ALA A 138 -12.460 4.943 21.054 1.00 10.36 C +ATOM 1344 O ALA A 138 -12.893 5.276 19.948 1.00 12.43 O +ATOM 1345 CB ALA A 138 -13.730 6.523 22.501 1.00 10.22 C +ATOM 1346 H ALA A 138 -11.615 7.258 20.688 1.00 0.00 H +ATOM 1347 N VAL A 139 -11.971 3.737 21.284 1.00 9.88 N +ATOM 1348 CA VAL A 139 -12.079 2.732 20.245 1.00 10.12 C +ATOM 1349 C VAL A 139 -13.070 1.667 20.693 1.00 9.79 C +ATOM 1350 O VAL A 139 -13.001 1.187 21.826 1.00 9.05 O +ATOM 1351 CB VAL A 139 -10.718 2.066 19.894 1.00 9.23 C +ATOM 1352 CG1 VAL A 139 -10.907 1.085 18.736 1.00 7.24 C +ATOM 1353 CG2 VAL A 139 -9.680 3.118 19.515 1.00 8.14 C +ATOM 1354 H VAL A 139 -11.594 3.504 22.159 1.00 0.00 H +ATOM 1355 N LEU A 140 -14.011 1.348 19.811 1.00 8.01 N +ATOM 1356 CA LEU A 140 -15.013 0.330 20.063 1.00 9.26 C +ATOM 1357 C LEU A 140 -14.447 -0.938 19.459 1.00 8.13 C +ATOM 1358 O LEU A 140 -14.192 -0.983 18.261 1.00 9.41 O +ATOM 1359 CB LEU A 140 -16.310 0.683 19.348 1.00 10.98 C +ATOM 1360 CG LEU A 140 -17.608 0.647 20.152 1.00 15.49 C +ATOM 1361 CD1 LEU A 140 -18.789 0.691 19.174 1.00 15.69 C +ATOM 1362 CD2 LEU A 140 -17.679 -0.590 21.026 1.00 15.70 C +ATOM 1363 H LEU A 140 -13.999 1.782 18.937 1.00 0.00 H +ATOM 1364 N GLY A 141 -14.209 -1.942 20.291 1.00 8.71 N +ATOM 1365 CA GLY A 141 -13.648 -3.196 19.827 1.00 9.21 C +ATOM 1366 C GLY A 141 -14.722 -4.256 19.770 1.00 10.83 C +ATOM 1367 O GLY A 141 -15.459 -4.467 20.732 1.00 11.82 O +ATOM 1368 H GLY A 141 -14.442 -1.849 21.231 1.00 0.00 H +ATOM 1369 N ILE A 142 -14.806 -4.940 18.641 1.00 11.58 N +ATOM 1370 CA ILE A 142 -15.808 -5.966 18.442 1.00 9.82 C +ATOM 1371 C ILE A 142 -15.113 -7.208 17.930 1.00 11.13 C +ATOM 1372 O ILE A 142 -14.336 -7.152 16.983 1.00 11.65 O +ATOM 1373 CB ILE A 142 -16.871 -5.477 17.433 1.00 9.74 C +ATOM 1374 CG1 ILE A 142 -17.567 -4.236 18.004 1.00 12.58 C +ATOM 1375 CG2 ILE A 142 -17.870 -6.573 17.127 1.00 10.05 C +ATOM 1376 CD1 ILE A 142 -18.539 -3.554 17.087 1.00 11.93 C +ATOM 1377 H ILE A 142 -14.172 -4.738 17.915 1.00 0.00 H +ATOM 1378 N PHE A 143 -15.337 -8.322 18.605 1.00 11.14 N +ATOM 1379 CA PHE A 143 -14.735 -9.584 18.207 1.00 11.03 C +ATOM 1380 C PHE A 143 -15.524 -10.244 17.077 1.00 11.91 C +ATOM 1381 O PHE A 143 -16.752 -10.121 16.997 1.00 10.37 O +ATOM 1382 CB PHE A 143 -14.694 -10.544 19.395 1.00 9.79 C +ATOM 1383 CG PHE A 143 -13.831 -10.080 20.537 1.00 8.42 C +ATOM 1384 CD1 PHE A 143 -12.460 -9.919 20.374 1.00 8.60 C +ATOM 1385 CD2 PHE A 143 -14.387 -9.876 21.800 1.00 7.62 C +ATOM 1386 CE1 PHE A 143 -11.650 -9.568 21.455 1.00 6.84 C +ATOM 1387 CE2 PHE A 143 -13.595 -9.527 22.882 1.00 7.43 C +ATOM 1388 CZ PHE A 143 -12.223 -9.374 22.713 1.00 9.48 C +ATOM 1389 H PHE A 143 -15.908 -8.292 19.381 1.00 0.00 H +ATOM 1390 N LEU A 144 -14.812 -10.921 16.189 1.00 10.76 N +ATOM 1391 CA LEU A 144 -15.455 -11.633 15.099 1.00 11.33 C +ATOM 1392 C LEU A 144 -15.187 -13.113 15.294 1.00 11.63 C +ATOM 1393 O LEU A 144 -14.051 -13.515 15.562 1.00 10.25 O +ATOM 1394 CB LEU A 144 -14.915 -11.188 13.731 1.00 11.16 C +ATOM 1395 CG LEU A 144 -15.498 -9.920 13.079 1.00 12.16 C +ATOM 1396 CD1 LEU A 144 -15.132 -8.665 13.876 1.00 9.73 C +ATOM 1397 CD2 LEU A 144 -14.976 -9.813 11.650 1.00 11.94 C +ATOM 1398 H LEU A 144 -13.836 -10.963 16.269 1.00 0.00 H +ATOM 1399 N LYS A 145 -16.245 -13.911 15.265 1.00 13.42 N +ATOM 1400 CA LYS A 145 -16.088 -15.355 15.378 1.00 15.57 C +ATOM 1401 C LYS A 145 -16.575 -15.935 14.048 1.00 14.99 C +ATOM 1402 O LYS A 145 -17.416 -15.336 13.377 1.00 14.88 O +ATOM 1403 CB LYS A 145 -16.890 -15.926 16.554 1.00 16.26 C +ATOM 1404 CG LYS A 145 -18.386 -15.915 16.383 1.00 22.05 C +ATOM 1405 CD LYS A 145 -19.038 -16.794 17.436 1.00 26.20 C +ATOM 1406 CE LYS A 145 -20.394 -17.301 16.958 1.00 31.58 C +ATOM 1407 NZ LYS A 145 -20.291 -18.134 15.709 1.00 33.66 N1+ +ATOM 1408 H LYS A 145 -17.139 -13.538 15.132 1.00 0.00 H +ATOM 1409 HZ1 LYS A 145 -19.875 -17.566 14.943 1.00 0.00 H +ATOM 1410 HZ2 LYS A 145 -19.687 -18.960 15.893 1.00 0.00 H +ATOM 1411 HZ3 LYS A 145 -21.239 -18.454 15.426 1.00 0.00 H +ATOM 1412 N VAL A 146 -15.994 -17.050 13.630 1.00 16.46 N +ATOM 1413 CA VAL A 146 -16.397 -17.678 12.378 1.00 17.54 C +ATOM 1414 C VAL A 146 -17.685 -18.461 12.602 1.00 18.16 C +ATOM 1415 O VAL A 146 -17.831 -19.171 13.595 1.00 19.76 O +ATOM 1416 CB VAL A 146 -15.298 -18.604 11.829 1.00 17.12 C +ATOM 1417 CG1 VAL A 146 -15.767 -19.276 10.547 1.00 18.71 C +ATOM 1418 CG2 VAL A 146 -14.041 -17.805 11.568 1.00 17.50 C +ATOM 1419 H VAL A 146 -15.311 -17.481 14.173 1.00 0.00 H +ATOM 1420 N GLY A 147 -18.636 -18.275 11.702 1.00 17.77 N +ATOM 1421 CA GLY A 147 -19.905 -18.953 11.807 1.00 17.43 C +ATOM 1422 C GLY A 147 -20.718 -18.579 10.593 1.00 18.01 C +ATOM 1423 O GLY A 147 -20.273 -18.784 9.461 1.00 19.31 O +ATOM 1424 H GLY A 147 -18.475 -17.703 10.930 1.00 0.00 H +ATOM 1425 N SER A 148 -21.899 -18.015 10.812 1.00 18.04 N +ATOM 1426 CA SER A 148 -22.747 -17.614 9.704 1.00 19.91 C +ATOM 1427 C SER A 148 -22.260 -16.277 9.185 1.00 20.71 C +ATOM 1428 O SER A 148 -21.643 -15.499 9.922 1.00 19.56 O +ATOM 1429 CB SER A 148 -24.213 -17.526 10.135 1.00 20.89 C +ATOM 1430 OG SER A 148 -24.370 -16.659 11.242 1.00 26.12 O +ATOM 1431 H SER A 148 -22.211 -17.805 11.718 1.00 0.00 H +ATOM 1432 HG SER A 148 -24.081 -15.758 11.046 1.00 0.00 H +ATOM 1433 N ALA A 149 -22.518 -16.036 7.905 1.00 21.01 N +ATOM 1434 CA ALA A 149 -22.118 -14.808 7.238 1.00 22.03 C +ATOM 1435 C ALA A 149 -22.756 -13.586 7.885 1.00 22.50 C +ATOM 1436 O ALA A 149 -23.862 -13.665 8.421 1.00 23.42 O +ATOM 1437 CB ALA A 149 -22.502 -14.874 5.754 1.00 18.86 C +ATOM 1438 H ALA A 149 -23.023 -16.698 7.395 1.00 0.00 H +ATOM 1439 N LYS A 150 -22.033 -12.470 7.864 1.00 22.87 N +ATOM 1440 CA LYS A 150 -22.535 -11.216 8.404 1.00 22.83 C +ATOM 1441 C LYS A 150 -22.911 -10.413 7.157 1.00 24.11 C +ATOM 1442 O LYS A 150 -22.037 -9.991 6.387 1.00 23.72 O +ATOM 1443 CB LYS A 150 -21.439 -10.509 9.195 1.00 22.58 C +ATOM 1444 CG LYS A 150 -21.917 -9.298 9.965 1.00 23.83 C +ATOM 1445 CD LYS A 150 -22.930 -9.679 11.023 1.00 23.97 C +ATOM 1446 CE LYS A 150 -23.240 -8.497 11.926 1.00 25.27 C +ATOM 1447 NZ LYS A 150 -24.374 -8.788 12.843 1.00 27.98 N1+ +ATOM 1448 H LYS A 150 -21.130 -12.479 7.491 1.00 0.00 H +ATOM 1449 HZ1 LYS A 150 -24.134 -9.605 13.440 1.00 0.00 H +ATOM 1450 HZ2 LYS A 150 -24.555 -7.959 13.445 1.00 0.00 H +ATOM 1451 HZ3 LYS A 150 -25.224 -9.005 12.284 1.00 0.00 H +ATOM 1452 N PRO A 151 -24.220 -10.248 6.901 1.00 24.02 N +ATOM 1453 CA PRO A 151 -24.675 -9.505 5.726 1.00 24.06 C +ATOM 1454 C PRO A 151 -24.027 -8.131 5.570 1.00 23.72 C +ATOM 1455 O PRO A 151 -23.506 -7.807 4.501 1.00 23.70 O +ATOM 1456 CB PRO A 151 -26.185 -9.414 5.957 1.00 24.72 C +ATOM 1457 CG PRO A 151 -26.483 -10.710 6.621 1.00 24.20 C +ATOM 1458 CD PRO A 151 -25.372 -10.781 7.650 1.00 24.71 C +ATOM 1459 N GLY A 152 -24.005 -7.359 6.655 1.00 23.24 N +ATOM 1460 CA GLY A 152 -23.429 -6.023 6.623 1.00 21.65 C +ATOM 1461 C GLY A 152 -21.952 -5.951 6.279 1.00 20.26 C +ATOM 1462 O GLY A 152 -21.453 -4.891 5.913 1.00 22.04 O +ATOM 1463 H GLY A 152 -24.371 -7.693 7.492 1.00 0.00 H +ATOM 1464 N LEU A 153 -21.255 -7.077 6.376 1.00 17.96 N +ATOM 1465 CA LEU A 153 -19.835 -7.124 6.077 1.00 16.79 C +ATOM 1466 C LEU A 153 -19.543 -7.428 4.610 1.00 16.29 C +ATOM 1467 O LEU A 153 -18.491 -7.062 4.104 1.00 16.12 O +ATOM 1468 CB LEU A 153 -19.156 -8.173 6.961 1.00 16.99 C +ATOM 1469 CG LEU A 153 -17.631 -8.280 6.895 1.00 18.65 C +ATOM 1470 CD1 LEU A 153 -16.983 -7.058 7.509 1.00 18.48 C +ATOM 1471 CD2 LEU A 153 -17.175 -9.524 7.611 1.00 17.71 C +ATOM 1472 H LEU A 153 -21.700 -7.903 6.647 1.00 0.00 H +ATOM 1473 N GLN A 154 -20.491 -8.030 3.904 1.00 16.48 N +ATOM 1474 CA GLN A 154 -20.259 -8.399 2.512 1.00 18.17 C +ATOM 1475 C GLN A 154 -19.873 -7.261 1.559 1.00 18.75 C +ATOM 1476 O GLN A 154 -19.050 -7.450 0.663 1.00 18.05 O +ATOM 1477 CB GLN A 154 -21.448 -9.199 1.962 1.00 19.54 C +ATOM 1478 CG GLN A 154 -21.136 -9.958 0.661 1.00 20.05 C +ATOM 1479 CD GLN A 154 -19.998 -10.970 0.808 1.00 21.07 C +ATOM 1480 NE2 GLN A 154 -19.205 -11.123 -0.245 1.00 21.38 N +ATOM 1481 OE1 GLN A 154 -19.843 -11.610 1.853 1.00 18.80 O +ATOM 1482 H GLN A 154 -21.362 -8.215 4.316 1.00 0.00 H +ATOM 1483 HE21 GLN A 154 -18.456 -11.761 -0.188 1.00 0.00 H +ATOM 1484 HE22 GLN A 154 -19.389 -10.590 -1.044 1.00 0.00 H +ATOM 1485 N LYS A 155 -20.451 -6.082 1.753 1.00 19.53 N +ATOM 1486 CA LYS A 155 -20.139 -4.939 0.905 1.00 20.72 C +ATOM 1487 C LYS A 155 -18.639 -4.652 1.002 1.00 19.58 C +ATOM 1488 O LYS A 155 -17.975 -4.407 -0.004 1.00 20.37 O +ATOM 1489 CB LYS A 155 -20.964 -3.719 1.342 1.00 25.57 C +ATOM 1490 CG LYS A 155 -20.836 -2.500 0.427 1.00 31.26 C +ATOM 1491 CD LYS A 155 -21.698 -1.322 0.907 1.00 35.13 C +ATOM 1492 CE LYS A 155 -21.595 -0.099 -0.028 1.00 36.70 C +ATOM 1493 NZ LYS A 155 -20.223 0.481 -0.108 1.00 36.89 N1+ +ATOM 1494 H LYS A 155 -21.098 -5.987 2.483 1.00 0.00 H +ATOM 1495 HZ1 LYS A 155 -19.918 0.782 0.840 1.00 0.00 H +ATOM 1496 HZ2 LYS A 155 -19.564 -0.238 -0.470 1.00 0.00 H +ATOM 1497 HZ3 LYS A 155 -20.228 1.301 -0.748 1.00 0.00 H +ATOM 1498 N VAL A 156 -18.105 -4.727 2.216 1.00 19.14 N +ATOM 1499 CA VAL A 156 -16.681 -4.498 2.455 1.00 18.76 C +ATOM 1500 C VAL A 156 -15.879 -5.595 1.749 1.00 19.26 C +ATOM 1501 O VAL A 156 -14.918 -5.319 1.033 1.00 19.94 O +ATOM 1502 CB VAL A 156 -16.359 -4.528 3.974 1.00 18.30 C +ATOM 1503 CG1 VAL A 156 -14.851 -4.472 4.203 1.00 16.61 C +ATOM 1504 CG2 VAL A 156 -17.059 -3.376 4.686 1.00 15.28 C +ATOM 1505 H VAL A 156 -18.675 -4.961 2.975 1.00 0.00 H +ATOM 1506 N VAL A 157 -16.308 -6.839 1.941 1.00 19.74 N +ATOM 1507 CA VAL A 157 -15.653 -8.000 1.346 1.00 18.98 C +ATOM 1508 C VAL A 157 -15.591 -7.948 -0.185 1.00 18.50 C +ATOM 1509 O VAL A 157 -14.572 -8.291 -0.775 1.00 16.05 O +ATOM 1510 CB VAL A 157 -16.336 -9.304 1.817 1.00 18.98 C +ATOM 1511 CG1 VAL A 157 -15.828 -10.490 1.037 1.00 18.37 C +ATOM 1512 CG2 VAL A 157 -16.085 -9.501 3.302 1.00 19.58 C +ATOM 1513 H VAL A 157 -17.092 -6.975 2.513 1.00 0.00 H +ATOM 1514 N ASP A 158 -16.647 -7.457 -0.822 1.00 20.00 N +ATOM 1515 CA ASP A 158 -16.683 -7.383 -2.281 1.00 21.79 C +ATOM 1516 C ASP A 158 -15.743 -6.370 -2.919 1.00 20.81 C +ATOM 1517 O ASP A 158 -15.414 -6.495 -4.094 1.00 23.22 O +ATOM 1518 CB ASP A 158 -18.107 -7.124 -2.776 1.00 23.95 C +ATOM 1519 CG ASP A 158 -19.022 -8.319 -2.574 1.00 27.61 C +ATOM 1520 OD1 ASP A 158 -18.584 -9.467 -2.817 1.00 26.14 O +ATOM 1521 OD2 ASP A 158 -20.181 -8.102 -2.159 1.00 31.21 O1- +ATOM 1522 H ASP A 158 -17.411 -7.128 -0.305 1.00 0.00 H +ATOM 1523 N VAL A 159 -15.309 -5.374 -2.163 1.00 19.35 N +ATOM 1524 CA VAL A 159 -14.428 -4.348 -2.711 1.00 19.79 C +ATOM 1525 C VAL A 159 -12.929 -4.635 -2.491 1.00 18.90 C +ATOM 1526 O VAL A 159 -12.067 -3.993 -3.095 1.00 16.41 O +ATOM 1527 CB VAL A 159 -14.816 -2.946 -2.142 1.00 20.98 C +ATOM 1528 CG1 VAL A 159 -14.431 -2.835 -0.676 1.00 21.11 C +ATOM 1529 CG2 VAL A 159 -14.187 -1.826 -2.958 1.00 22.98 C +ATOM 1530 H VAL A 159 -15.593 -5.321 -1.223 1.00 0.00 H +ATOM 1531 N LEU A 160 -12.621 -5.647 -1.688 1.00 18.87 N +ATOM 1532 CA LEU A 160 -11.232 -5.971 -1.391 1.00 19.61 C +ATOM 1533 C LEU A 160 -10.362 -6.212 -2.618 1.00 20.70 C +ATOM 1534 O LEU A 160 -9.177 -5.891 -2.610 1.00 18.88 O +ATOM 1535 CB LEU A 160 -11.133 -7.122 -0.381 1.00 15.90 C +ATOM 1536 CG LEU A 160 -11.692 -6.778 1.015 1.00 18.47 C +ATOM 1537 CD1 LEU A 160 -11.332 -7.853 2.020 1.00 15.85 C +ATOM 1538 CD2 LEU A 160 -11.157 -5.438 1.494 1.00 16.64 C +ATOM 1539 H LEU A 160 -13.340 -6.179 -1.282 1.00 0.00 H +ATOM 1540 N ASP A 161 -10.976 -6.687 -3.695 1.00 23.62 N +ATOM 1541 CA ASP A 161 -10.270 -6.948 -4.953 1.00 26.20 C +ATOM 1542 C ASP A 161 -9.564 -5.713 -5.514 1.00 24.61 C +ATOM 1543 O ASP A 161 -8.452 -5.797 -6.038 1.00 25.86 O +ATOM 1544 CB ASP A 161 -11.252 -7.465 -6.023 1.00 30.85 C +ATOM 1545 CG ASP A 161 -11.486 -8.967 -5.937 1.00 34.82 C +ATOM 1546 OD1 ASP A 161 -10.609 -9.677 -5.386 1.00 37.53 O +ATOM 1547 OD2 ASP A 161 -12.543 -9.434 -6.433 1.00 36.50 O1- +ATOM 1548 H ASP A 161 -11.933 -6.878 -3.632 1.00 0.00 H +ATOM 1549 N SER A 162 -10.214 -4.568 -5.389 1.00 23.59 N +ATOM 1550 CA SER A 162 -9.677 -3.326 -5.916 1.00 23.18 C +ATOM 1551 C SER A 162 -8.620 -2.629 -5.065 1.00 21.32 C +ATOM 1552 O SER A 162 -8.004 -1.661 -5.514 1.00 21.15 O +ATOM 1553 CB SER A 162 -10.828 -2.375 -6.220 1.00 25.84 C +ATOM 1554 OG SER A 162 -11.681 -2.253 -5.099 1.00 30.18 O +ATOM 1555 H SER A 162 -11.055 -4.537 -4.895 1.00 0.00 H +ATOM 1556 HG SER A 162 -12.073 -3.073 -4.795 1.00 0.00 H +ATOM 1557 N ILE A 163 -8.398 -3.121 -3.848 1.00 19.34 N +ATOM 1558 CA ILE A 163 -7.397 -2.535 -2.955 1.00 17.65 C +ATOM 1559 C ILE A 163 -6.451 -3.627 -2.437 1.00 17.67 C +ATOM 1560 O ILE A 163 -6.076 -3.648 -1.263 1.00 15.97 O +ATOM 1561 CB ILE A 163 -8.060 -1.783 -1.755 1.00 17.02 C +ATOM 1562 CG1 ILE A 163 -8.809 -2.761 -0.840 1.00 15.57 C +ATOM 1563 CG2 ILE A 163 -9.028 -0.727 -2.273 1.00 14.62 C +ATOM 1564 CD1 ILE A 163 -9.046 -2.240 0.571 1.00 11.58 C +ATOM 1565 H ILE A 163 -8.901 -3.899 -3.529 1.00 0.00 H +ATOM 1566 N LYS A 164 -6.098 -4.528 -3.326 1.00 18.25 N +ATOM 1567 CA LYS A 164 -5.242 -5.646 -2.959 1.00 19.73 C +ATOM 1568 C LYS A 164 -3.881 -5.280 -2.414 1.00 19.59 C +ATOM 1569 O LYS A 164 -3.374 -5.953 -1.524 1.00 19.82 O +ATOM 1570 CB LYS A 164 -5.054 -6.609 -4.135 1.00 24.46 C +ATOM 1571 CG LYS A 164 -4.302 -7.867 -3.724 1.00 22.94 C +ATOM 1572 CD LYS A 164 -4.134 -8.860 -4.854 1.00 26.83 C +ATOM 1573 CE LYS A 164 -3.302 -10.054 -4.379 1.00 26.93 C +ATOM 1574 NZ LYS A 164 -3.110 -11.122 -5.405 1.00 24.81 N1+ +ATOM 1575 H LYS A 164 -6.406 -4.433 -4.247 1.00 0.00 H +ATOM 1576 HZ1 LYS A 164 -2.646 -10.723 -6.245 1.00 0.00 H +ATOM 1577 HZ2 LYS A 164 -2.517 -11.875 -5.002 1.00 0.00 H +ATOM 1578 HZ3 LYS A 164 -4.033 -11.518 -5.673 1.00 0.00 H +ATOM 1579 N THR A 165 -3.287 -4.220 -2.948 1.00 18.42 N +ATOM 1580 CA THR A 165 -1.955 -3.828 -2.528 1.00 19.16 C +ATOM 1581 C THR A 165 -1.900 -2.503 -1.777 1.00 18.38 C +ATOM 1582 O THR A 165 -2.834 -1.704 -1.822 1.00 16.93 O +ATOM 1583 CB THR A 165 -0.982 -3.813 -3.743 1.00 21.74 C +ATOM 1584 CG2 THR A 165 -0.759 -5.228 -4.278 1.00 23.67 C +ATOM 1585 OG1 THR A 165 -1.536 -3.017 -4.796 1.00 23.90 O +ATOM 1586 H THR A 165 -3.745 -3.650 -3.602 1.00 0.00 H +ATOM 1587 HG1 THR A 165 -2.299 -3.459 -5.166 1.00 0.00 H +ATOM 1588 N LYS A 166 -0.793 -2.291 -1.081 1.00 19.82 N +ATOM 1589 CA LYS A 166 -0.556 -1.087 -0.294 1.00 20.33 C +ATOM 1590 C LYS A 166 -0.704 0.173 -1.122 1.00 17.08 C +ATOM 1591 O LYS A 166 -0.141 0.268 -2.214 1.00 21.89 O +ATOM 1592 CB LYS A 166 0.859 -1.111 0.267 1.00 21.33 C +ATOM 1593 CG LYS A 166 1.162 0.041 1.218 1.00 30.28 C +ATOM 1594 CD LYS A 166 2.632 0.328 1.247 1.00 37.63 C +ATOM 1595 CE LYS A 166 3.425 -0.954 1.350 1.00 36.98 C +ATOM 1596 NZ LYS A 166 4.690 -0.866 0.552 1.00 41.85 N1+ +ATOM 1597 H LYS A 166 -0.109 -2.985 -1.091 1.00 0.00 H +ATOM 1598 HZ1 LYS A 166 4.451 -0.643 -0.436 1.00 0.00 H +ATOM 1599 HZ2 LYS A 166 5.281 -0.109 0.950 1.00 0.00 H +ATOM 1600 HZ3 LYS A 166 5.203 -1.772 0.590 1.00 0.00 H +ATOM 1601 N GLY A 167 -1.412 1.156 -0.578 1.00 16.94 N +ATOM 1602 CA GLY A 167 -1.586 2.415 -1.279 1.00 16.04 C +ATOM 1603 C GLY A 167 -2.817 2.488 -2.148 1.00 14.15 C +ATOM 1604 O GLY A 167 -3.187 3.571 -2.601 1.00 15.93 O +ATOM 1605 H GLY A 167 -1.837 1.030 0.292 1.00 0.00 H +ATOM 1606 N LYS A 168 -3.441 1.348 -2.414 1.00 17.36 N +ATOM 1607 CA LYS A 168 -4.637 1.348 -3.236 1.00 17.56 C +ATOM 1608 C LYS A 168 -5.822 1.813 -2.405 1.00 15.55 C +ATOM 1609 O LYS A 168 -5.920 1.498 -1.224 1.00 15.74 O +ATOM 1610 CB LYS A 168 -4.932 -0.055 -3.789 1.00 19.71 C +ATOM 1611 CG LYS A 168 -3.951 -0.572 -4.817 1.00 26.13 C +ATOM 1612 CD LYS A 168 -4.098 0.155 -6.136 1.00 30.04 C +ATOM 1613 CE LYS A 168 -3.152 -0.426 -7.203 1.00 33.68 C +ATOM 1614 NZ LYS A 168 -3.395 -1.894 -7.465 1.00 33.33 N1+ +ATOM 1615 H LYS A 168 -3.116 0.498 -2.049 1.00 0.00 H +ATOM 1616 HZ1 LYS A 168 -4.371 -2.030 -7.796 1.00 0.00 H +ATOM 1617 HZ2 LYS A 168 -2.727 -2.226 -8.186 1.00 0.00 H +ATOM 1618 HZ3 LYS A 168 -3.252 -2.436 -6.588 1.00 0.00 H +ATOM 1619 N SER A 169 -6.718 2.561 -3.023 1.00 17.51 N +ATOM 1620 CA SER A 169 -7.909 3.034 -2.348 1.00 17.98 C +ATOM 1621 C SER A 169 -9.055 2.955 -3.345 1.00 17.74 C +ATOM 1622 O SER A 169 -8.826 2.826 -4.547 1.00 17.59 O +ATOM 1623 CB SER A 169 -7.724 4.462 -1.849 1.00 20.09 C +ATOM 1624 OG SER A 169 -7.536 5.355 -2.919 1.00 21.20 O +ATOM 1625 H SER A 169 -6.633 2.794 -3.967 1.00 0.00 H +ATOM 1626 HG SER A 169 -6.703 5.124 -3.340 1.00 0.00 H +ATOM 1627 N ALA A 170 -10.281 3.004 -2.845 1.00 13.63 N +ATOM 1628 CA ALA A 170 -11.463 2.942 -3.685 1.00 13.72 C +ATOM 1629 C ALA A 170 -12.553 3.723 -2.997 1.00 11.83 C +ATOM 1630 O ALA A 170 -12.561 3.830 -1.771 1.00 16.71 O +ATOM 1631 CB ALA A 170 -11.900 1.504 -3.867 1.00 11.80 C +ATOM 1632 H ALA A 170 -10.415 3.089 -1.877 1.00 0.00 H +ATOM 1633 N ASP A 171 -13.396 4.293 -3.801 1.00 19.24 N +ATOM 1634 CA ASP A 171 -14.515 5.060 -3.256 1.00 21.88 C +ATOM 1635 C ASP A 171 -15.395 4.041 -2.531 1.00 20.52 C +ATOM 1636 O ASP A 171 -15.607 2.931 -3.024 1.00 20.68 O +ATOM 1637 CB ASP A 171 -15.312 5.763 -4.376 1.00 26.13 C +ATOM 1638 CG ASP A 171 -14.485 6.831 -5.121 1.00 31.74 C +ATOM 1639 OD1 ASP A 171 -13.792 7.639 -4.458 1.00 33.44 O +ATOM 1640 OD2 ASP A 171 -14.532 6.870 -6.375 1.00 33.22 O1- +ATOM 1641 H ASP A 171 -13.317 4.183 -4.766 1.00 0.00 H +ATOM 1642 N PHE A 172 -15.875 4.395 -1.349 1.00 19.28 N +ATOM 1643 CA PHE A 172 -16.701 3.475 -0.576 1.00 17.87 C +ATOM 1644 C PHE A 172 -17.707 4.308 0.182 1.00 17.53 C +ATOM 1645 O PHE A 172 -17.599 4.480 1.393 1.00 20.25 O +ATOM 1646 CB PHE A 172 -15.823 2.702 0.409 1.00 17.33 C +ATOM 1647 CG PHE A 172 -16.463 1.450 0.948 1.00 17.57 C +ATOM 1648 CD1 PHE A 172 -16.683 0.353 0.117 1.00 16.64 C +ATOM 1649 CD2 PHE A 172 -16.826 1.361 2.290 1.00 16.00 C +ATOM 1650 CE1 PHE A 172 -17.254 -0.818 0.620 1.00 18.37 C +ATOM 1651 CE2 PHE A 172 -17.395 0.199 2.799 1.00 16.71 C +ATOM 1652 CZ PHE A 172 -17.608 -0.892 1.962 1.00 17.83 C +ATOM 1653 H PHE A 172 -15.677 5.285 -0.991 1.00 0.00 H +ATOM 1654 N THR A 173 -18.657 4.868 -0.546 1.00 16.15 N +ATOM 1655 CA THR A 173 -19.665 5.718 0.053 1.00 14.78 C +ATOM 1656 C THR A 173 -20.910 4.930 0.405 1.00 14.30 C +ATOM 1657 O THR A 173 -21.079 3.785 -0.021 1.00 13.10 O +ATOM 1658 CB THR A 173 -20.069 6.862 -0.909 1.00 15.46 C +ATOM 1659 CG2 THR A 173 -18.914 7.826 -1.120 1.00 14.71 C +ATOM 1660 OG1 THR A 173 -20.457 6.304 -2.173 1.00 15.54 O +ATOM 1661 H THR A 173 -18.720 4.711 -1.503 1.00 0.00 H +ATOM 1662 HG1 THR A 173 -20.742 7.042 -2.723 1.00 0.00 H +ATOM 1663 N ASN A 174 -21.758 5.562 1.210 1.00 13.92 N +ATOM 1664 CA ASN A 174 -23.036 5.016 1.640 1.00 15.08 C +ATOM 1665 C ASN A 174 -22.960 3.665 2.343 1.00 14.97 C +ATOM 1666 O ASN A 174 -23.828 2.817 2.174 1.00 15.54 O +ATOM 1667 CB ASN A 174 -24.032 4.972 0.465 1.00 16.17 C +ATOM 1668 CG ASN A 174 -24.268 6.347 -0.155 1.00 16.41 C +ATOM 1669 ND2 ASN A 174 -23.709 6.564 -1.334 1.00 17.24 N +ATOM 1670 OD1 ASN A 174 -24.912 7.211 0.435 1.00 19.19 O +ATOM 1671 H ASN A 174 -21.482 6.403 1.568 1.00 0.00 H +ATOM 1672 HD21 ASN A 174 -23.837 7.449 -1.738 1.00 0.00 H +ATOM 1673 HD22 ASN A 174 -23.193 5.842 -1.739 1.00 0.00 H +ATOM 1674 N PHE A 175 -21.903 3.453 3.115 1.00 15.10 N +ATOM 1675 CA PHE A 175 -21.791 2.214 3.868 1.00 14.14 C +ATOM 1676 C PHE A 175 -22.333 2.498 5.271 1.00 13.20 C +ATOM 1677 O PHE A 175 -21.981 3.500 5.888 1.00 12.56 O +ATOM 1678 CB PHE A 175 -20.349 1.727 3.962 1.00 12.43 C +ATOM 1679 CG PHE A 175 -20.204 0.499 4.787 1.00 12.13 C +ATOM 1680 CD1 PHE A 175 -20.570 -0.735 4.277 1.00 10.09 C +ATOM 1681 CD2 PHE A 175 -19.776 0.582 6.109 1.00 13.07 C +ATOM 1682 CE1 PHE A 175 -20.520 -1.876 5.067 1.00 12.69 C +ATOM 1683 CE2 PHE A 175 -19.722 -0.557 6.912 1.00 14.49 C +ATOM 1684 CZ PHE A 175 -20.095 -1.787 6.390 1.00 10.87 C +ATOM 1685 H PHE A 175 -21.205 4.130 3.210 1.00 0.00 H +ATOM 1686 N ASP A 176 -23.168 1.601 5.777 1.00 13.42 N +ATOM 1687 CA ASP A 176 -23.768 1.777 7.096 1.00 14.51 C +ATOM 1688 C ASP A 176 -23.033 0.913 8.113 1.00 13.40 C +ATOM 1689 O ASP A 176 -23.182 -0.305 8.126 1.00 11.62 O +ATOM 1690 CB ASP A 176 -25.254 1.400 7.050 1.00 17.27 C +ATOM 1691 CG ASP A 176 -26.022 1.860 8.282 1.00 19.38 C +ATOM 1692 OD1 ASP A 176 -25.407 2.190 9.322 1.00 20.00 O +ATOM 1693 OD2 ASP A 176 -27.264 1.904 8.195 1.00 23.44 O1- +ATOM 1694 H ASP A 176 -23.349 0.796 5.272 1.00 0.00 H +ATOM 1695 N PRO A 177 -22.292 1.550 9.030 1.00 13.30 N +ATOM 1696 CA PRO A 177 -21.539 0.816 10.046 1.00 14.61 C +ATOM 1697 C PRO A 177 -22.416 0.121 11.093 1.00 14.48 C +ATOM 1698 O PRO A 177 -21.936 -0.717 11.847 1.00 15.32 O +ATOM 1699 CB PRO A 177 -20.626 1.894 10.633 1.00 13.12 C +ATOM 1700 CG PRO A 177 -21.459 3.129 10.531 1.00 13.69 C +ATOM 1701 CD PRO A 177 -22.122 3.007 9.181 1.00 14.13 C +ATOM 1702 N ARG A 178 -23.708 0.433 11.109 1.00 15.07 N +ATOM 1703 CA ARG A 178 -24.626 -0.195 12.056 1.00 15.25 C +ATOM 1704 C ARG A 178 -24.799 -1.689 11.783 1.00 14.75 C +ATOM 1705 O ARG A 178 -25.167 -2.455 12.672 1.00 14.10 O +ATOM 1706 CB ARG A 178 -25.985 0.506 12.034 1.00 15.04 C +ATOM 1707 CG ARG A 178 -25.962 1.859 12.728 1.00 15.65 C +ATOM 1708 CD ARG A 178 -27.298 2.516 12.649 1.00 16.46 C +ATOM 1709 NE ARG A 178 -27.634 2.848 11.276 1.00 20.00 N +ATOM 1710 CZ ARG A 178 -28.843 3.224 10.882 1.00 24.73 C +ATOM 1711 NH1 ARG A 178 -29.833 3.300 11.759 1.00 28.28 N1+ +ATOM 1712 NH2 ARG A 178 -29.050 3.597 9.627 1.00 24.99 N +ATOM 1713 H ARG A 178 -24.042 1.106 10.490 1.00 0.00 H +ATOM 1714 HE ARG A 178 -26.932 2.802 10.599 1.00 0.00 H +ATOM 1715 HH11 ARG A 178 -29.679 3.077 12.722 1.00 0.00 H +ATOM 1716 HH12 ARG A 178 -30.743 3.584 11.456 1.00 0.00 H +ATOM 1717 HH21 ARG A 178 -28.293 3.597 8.975 1.00 0.00 H +ATOM 1718 HH22 ARG A 178 -29.964 3.879 9.334 1.00 0.00 H +ATOM 1719 N GLY A 179 -24.502 -2.099 10.556 1.00 14.90 N +ATOM 1720 CA GLY A 179 -24.629 -3.495 10.199 1.00 12.47 C +ATOM 1721 C GLY A 179 -23.485 -4.319 10.745 1.00 13.45 C +ATOM 1722 O GLY A 179 -23.430 -5.512 10.485 1.00 14.07 O +ATOM 1723 H GLY A 179 -24.184 -1.472 9.873 1.00 0.00 H +ATOM 1724 N LEU A 180 -22.572 -3.698 11.490 1.00 12.13 N +ATOM 1725 CA LEU A 180 -21.438 -4.420 12.068 1.00 13.01 C +ATOM 1726 C LEU A 180 -21.539 -4.594 13.585 1.00 13.34 C +ATOM 1727 O LEU A 180 -20.654 -5.192 14.206 1.00 14.14 O +ATOM 1728 CB LEU A 180 -20.124 -3.704 11.734 1.00 12.60 C +ATOM 1729 CG LEU A 180 -19.783 -3.526 10.248 1.00 14.36 C +ATOM 1730 CD1 LEU A 180 -18.528 -2.707 10.105 1.00 11.56 C +ATOM 1731 CD2 LEU A 180 -19.617 -4.869 9.577 1.00 12.89 C +ATOM 1732 H LEU A 180 -22.625 -2.737 11.664 1.00 0.00 H +ATOM 1733 N LEU A 181 -22.615 -4.087 14.178 1.00 13.00 N +ATOM 1734 CA LEU A 181 -22.805 -4.163 15.631 1.00 14.21 C +ATOM 1735 C LEU A 181 -23.547 -5.407 16.126 1.00 14.81 C +ATOM 1736 O LEU A 181 -24.409 -5.953 15.421 1.00 16.06 O +ATOM 1737 CB LEU A 181 -23.542 -2.915 16.136 1.00 12.62 C +ATOM 1738 CG LEU A 181 -22.947 -1.541 15.799 1.00 15.40 C +ATOM 1739 CD1 LEU A 181 -23.841 -0.420 16.324 1.00 14.47 C +ATOM 1740 CD2 LEU A 181 -21.556 -1.423 16.370 1.00 14.74 C +ATOM 1741 H LEU A 181 -23.331 -3.691 13.640 1.00 0.00 H +ATOM 1742 N PRO A 182 -23.158 -5.928 17.311 1.00 14.08 N +ATOM 1743 CA PRO A 182 -23.836 -7.106 17.856 1.00 13.82 C +ATOM 1744 C PRO A 182 -25.200 -6.638 18.374 1.00 15.42 C +ATOM 1745 O PRO A 182 -25.501 -5.441 18.322 1.00 13.60 O +ATOM 1746 CB PRO A 182 -22.900 -7.549 18.984 1.00 12.14 C +ATOM 1747 CG PRO A 182 -22.275 -6.288 19.435 1.00 12.07 C +ATOM 1748 CD PRO A 182 -21.984 -5.578 18.131 1.00 13.95 C +ATOM 1749 N GLU A 183 -26.039 -7.564 18.839 1.00 16.53 N +ATOM 1750 CA GLU A 183 -27.362 -7.180 19.335 1.00 18.48 C +ATOM 1751 C GLU A 183 -27.273 -6.427 20.663 1.00 17.46 C +ATOM 1752 O GLU A 183 -27.983 -5.450 20.878 1.00 18.08 O +ATOM 1753 CB GLU A 183 -28.270 -8.405 19.489 1.00 21.20 C +ATOM 1754 CG GLU A 183 -28.513 -9.194 18.200 1.00 27.64 C +ATOM 1755 CD GLU A 183 -29.525 -10.340 18.360 1.00 31.36 C +ATOM 1756 OE1 GLU A 183 -30.012 -10.571 19.490 1.00 33.25 O +ATOM 1757 OE2 GLU A 183 -29.841 -11.009 17.347 1.00 35.29 O1- +ATOM 1758 H GLU A 183 -25.755 -8.494 18.820 1.00 0.00 H +ATOM 1759 N SER A 184 -26.373 -6.874 21.533 1.00 17.37 N +ATOM 1760 CA SER A 184 -26.173 -6.276 22.849 1.00 16.70 C +ATOM 1761 C SER A 184 -24.984 -5.326 22.882 1.00 15.88 C +ATOM 1762 O SER A 184 -23.975 -5.553 22.216 1.00 14.74 O +ATOM 1763 CB SER A 184 -25.965 -7.377 23.892 1.00 18.07 C +ATOM 1764 OG SER A 184 -25.508 -6.842 25.119 1.00 21.41 O +ATOM 1765 H SER A 184 -25.775 -7.590 21.264 1.00 0.00 H +ATOM 1766 HG SER A 184 -25.569 -7.543 25.782 1.00 0.00 H +ATOM 1767 N LEU A 185 -25.102 -4.283 23.696 1.00 15.91 N +ATOM 1768 CA LEU A 185 -24.045 -3.295 23.832 1.00 16.59 C +ATOM 1769 C LEU A 185 -23.288 -3.386 25.167 1.00 16.76 C +ATOM 1770 O LEU A 185 -22.609 -2.427 25.562 1.00 16.53 O +ATOM 1771 CB LEU A 185 -24.586 -1.873 23.623 1.00 16.57 C +ATOM 1772 CG LEU A 185 -25.078 -1.426 22.241 1.00 18.30 C +ATOM 1773 CD1 LEU A 185 -25.369 0.062 22.277 1.00 17.85 C +ATOM 1774 CD2 LEU A 185 -24.051 -1.729 21.162 1.00 19.30 C +ATOM 1775 H LEU A 185 -25.899 -4.210 24.239 1.00 0.00 H +ATOM 1776 N ASP A 186 -23.419 -4.514 25.873 1.00 15.16 N +ATOM 1777 CA ASP A 186 -22.691 -4.694 27.130 1.00 14.81 C +ATOM 1778 C ASP A 186 -21.205 -4.660 26.781 1.00 14.47 C +ATOM 1779 O ASP A 186 -20.803 -5.174 25.735 1.00 12.19 O +ATOM 1780 CB ASP A 186 -23.026 -6.030 27.780 1.00 15.67 C +ATOM 1781 CG ASP A 186 -24.381 -6.029 28.451 1.00 19.13 C +ATOM 1782 OD1 ASP A 186 -24.762 -4.992 29.029 1.00 22.65 O +ATOM 1783 OD2 ASP A 186 -25.055 -7.076 28.416 1.00 21.78 O1- +ATOM 1784 H ASP A 186 -23.979 -5.237 25.524 1.00 0.00 H +ATOM 1785 N TYR A 187 -20.387 -4.137 27.687 1.00 13.25 N +ATOM 1786 CA TYR A 187 -18.966 -4.014 27.407 1.00 12.79 C +ATOM 1787 C TYR A 187 -18.043 -4.057 28.617 1.00 12.64 C +ATOM 1788 O TYR A 187 -18.476 -3.999 29.770 1.00 12.05 O +ATOM 1789 CB TYR A 187 -18.736 -2.668 26.705 1.00 13.85 C +ATOM 1790 CG TYR A 187 -19.157 -1.473 27.562 1.00 15.28 C +ATOM 1791 CD1 TYR A 187 -20.471 -1.001 27.537 1.00 15.11 C +ATOM 1792 CD2 TYR A 187 -18.256 -0.858 28.441 1.00 14.74 C +ATOM 1793 CE1 TYR A 187 -20.884 0.043 28.363 1.00 13.56 C +ATOM 1794 CE2 TYR A 187 -18.659 0.186 29.273 1.00 14.71 C +ATOM 1795 CZ TYR A 187 -19.981 0.627 29.226 1.00 15.82 C +ATOM 1796 OH TYR A 187 -20.409 1.635 30.058 1.00 13.88 O +ATOM 1797 H TYR A 187 -20.759 -3.789 28.514 1.00 0.00 H +ATOM 1798 HH TYR A 187 -19.717 1.856 30.679 1.00 0.00 H +ATOM 1799 N TRP A 188 -16.756 -4.135 28.308 1.00 12.36 N +ATOM 1800 CA TRP A 188 -15.677 -4.085 29.274 1.00 11.12 C +ATOM 1801 C TRP A 188 -15.003 -2.789 28.850 1.00 10.85 C +ATOM 1802 O TRP A 188 -15.051 -2.419 27.677 1.00 10.84 O +ATOM 1803 CB TRP A 188 -14.692 -5.232 29.077 1.00 12.13 C +ATOM 1804 CG TRP A 188 -15.204 -6.551 29.520 1.00 12.71 C +ATOM 1805 CD1 TRP A 188 -15.466 -6.933 30.798 1.00 13.96 C +ATOM 1806 CD2 TRP A 188 -15.479 -7.691 28.691 1.00 13.49 C +ATOM 1807 CE2 TRP A 188 -15.902 -8.733 29.545 1.00 14.28 C +ATOM 1808 CE3 TRP A 188 -15.400 -7.935 27.313 1.00 13.37 C +ATOM 1809 NE1 TRP A 188 -15.884 -8.241 30.823 1.00 15.19 N +ATOM 1810 CZ2 TRP A 188 -16.250 -10.005 29.068 1.00 13.96 C +ATOM 1811 CZ3 TRP A 188 -15.743 -9.199 26.838 1.00 14.12 C +ATOM 1812 CH2 TRP A 188 -16.163 -10.218 27.716 1.00 15.11 C +ATOM 1813 H TRP A 188 -16.498 -4.211 27.366 1.00 0.00 H +ATOM 1814 HE1 TRP A 188 -16.138 -8.729 31.633 1.00 0.00 H +ATOM 1815 N THR A 189 -14.392 -2.092 29.789 1.00 10.35 N +ATOM 1816 CA THR A 189 -13.728 -0.848 29.472 1.00 10.96 C +ATOM 1817 C THR A 189 -12.506 -0.677 30.348 1.00 10.38 C +ATOM 1818 O THR A 189 -12.496 -1.100 31.505 1.00 10.79 O +ATOM 1819 CB THR A 189 -14.680 0.360 29.638 1.00 10.52 C +ATOM 1820 CG2 THR A 189 -15.182 0.484 31.072 1.00 13.58 C +ATOM 1821 OG1 THR A 189 -13.993 1.559 29.270 1.00 11.16 O +ATOM 1822 H THR A 189 -14.385 -2.407 30.719 1.00 0.00 H +ATOM 1823 HG1 THR A 189 -13.185 1.663 29.766 1.00 0.00 H +ATOM 1824 N TYR A 190 -11.469 -0.073 29.784 1.00 10.32 N +ATOM 1825 CA TYR A 190 -10.226 0.153 30.517 1.00 11.08 C +ATOM 1826 C TYR A 190 -9.399 1.169 29.733 1.00 9.83 C +ATOM 1827 O TYR A 190 -9.649 1.390 28.550 1.00 11.40 O +ATOM 1828 CB TYR A 190 -9.449 -1.174 30.666 1.00 11.28 C +ATOM 1829 CG TYR A 190 -8.717 -1.608 29.403 1.00 12.40 C +ATOM 1830 CD1 TYR A 190 -9.382 -2.290 28.381 1.00 11.68 C +ATOM 1831 CD2 TYR A 190 -7.380 -1.273 29.208 1.00 11.14 C +ATOM 1832 CE1 TYR A 190 -8.735 -2.616 27.202 1.00 12.53 C +ATOM 1833 CE2 TYR A 190 -6.723 -1.587 28.031 1.00 12.29 C +ATOM 1834 CZ TYR A 190 -7.402 -2.255 27.031 1.00 13.19 C +ATOM 1835 OH TYR A 190 -6.744 -2.540 25.855 1.00 12.98 O +ATOM 1836 H TYR A 190 -11.537 0.235 28.850 1.00 0.00 H +ATOM 1837 HH TYR A 190 -5.863 -2.129 25.967 1.00 0.00 H +ATOM 1838 N PRO A 191 -8.503 1.895 30.412 1.00 10.83 N +ATOM 1839 CA PRO A 191 -7.674 2.878 29.713 1.00 9.36 C +ATOM 1840 C PRO A 191 -6.485 2.176 29.045 1.00 9.52 C +ATOM 1841 O PRO A 191 -5.797 1.369 29.679 1.00 8.78 O +ATOM 1842 CB PRO A 191 -7.242 3.824 30.837 1.00 11.11 C +ATOM 1843 CG PRO A 191 -7.209 2.934 32.050 1.00 11.67 C +ATOM 1844 CD PRO A 191 -8.425 2.066 31.879 1.00 11.28 C +ATOM 1845 N GLY A 192 -6.268 2.465 27.763 1.00 8.07 N +ATOM 1846 CA GLY A 192 -5.179 1.841 27.029 1.00 8.57 C +ATOM 1847 C GLY A 192 -4.519 2.717 25.980 1.00 8.53 C +ATOM 1848 O GLY A 192 -4.438 3.936 26.137 1.00 7.99 O +ATOM 1849 H GLY A 192 -6.812 3.131 27.321 1.00 0.00 H +ATOM 1850 N SER A 193 -4.091 2.095 24.884 1.00 9.93 N +ATOM 1851 CA SER A 193 -3.394 2.791 23.806 1.00 9.81 C +ATOM 1852 C SER A 193 -3.769 2.282 22.413 1.00 10.26 C +ATOM 1853 O SER A 193 -4.618 1.403 22.255 1.00 10.64 O +ATOM 1854 CB SER A 193 -1.890 2.544 23.963 1.00 12.07 C +ATOM 1855 OG SER A 193 -1.573 1.183 23.671 1.00 9.49 O +ATOM 1856 H SER A 193 -4.195 1.128 24.794 1.00 0.00 H +ATOM 1857 HG SER A 193 -0.741 1.153 23.168 1.00 0.00 H +ATOM 1858 N LEU A 194 -3.127 2.852 21.401 1.00 10.33 N +ATOM 1859 CA LEU A 194 -3.315 2.394 20.033 1.00 10.92 C +ATOM 1860 C LEU A 194 -2.535 1.100 20.047 1.00 9.32 C +ATOM 1861 O LEU A 194 -1.576 0.958 20.816 1.00 10.04 O +ATOM 1862 CB LEU A 194 -2.650 3.349 19.050 1.00 11.48 C +ATOM 1863 CG LEU A 194 -3.276 4.737 18.968 1.00 13.58 C +ATOM 1864 CD1 LEU A 194 -2.400 5.626 18.094 1.00 14.54 C +ATOM 1865 CD2 LEU A 194 -4.690 4.628 18.419 1.00 10.84 C +ATOM 1866 H LEU A 194 -2.501 3.579 21.585 1.00 0.00 H +ATOM 1867 N THR A 195 -2.929 0.153 19.217 1.00 10.07 N +ATOM 1868 CA THR A 195 -2.234 -1.117 19.186 1.00 9.33 C +ATOM 1869 C THR A 195 -1.154 -1.193 18.114 1.00 10.09 C +ATOM 1870 O THR A 195 -0.531 -2.242 17.944 1.00 11.17 O +ATOM 1871 CB THR A 195 -3.207 -2.280 19.031 1.00 9.73 C +ATOM 1872 CG2 THR A 195 -4.209 -2.300 20.189 1.00 9.08 C +ATOM 1873 OG1 THR A 195 -3.913 -2.138 17.799 1.00 10.73 O +ATOM 1874 H THR A 195 -3.686 0.295 18.613 1.00 0.00 H +ATOM 1875 HG1 THR A 195 -4.472 -1.347 17.743 1.00 0.00 H +ATOM 1876 N THR A 196 -0.964 -0.114 17.354 1.00 10.25 N +ATOM 1877 CA THR A 196 0.089 -0.076 16.335 1.00 10.91 C +ATOM 1878 C THR A 196 0.881 1.197 16.590 1.00 12.24 C +ATOM 1879 O THR A 196 0.386 2.121 17.260 1.00 12.19 O +ATOM 1880 CB THR A 196 -0.458 0.037 14.885 1.00 10.66 C +ATOM 1881 CG2 THR A 196 -1.343 -1.130 14.517 1.00 11.93 C +ATOM 1882 OG1 THR A 196 -1.192 1.257 14.748 1.00 11.83 O +ATOM 1883 H THR A 196 -1.534 0.675 17.439 1.00 0.00 H +ATOM 1884 HG1 THR A 196 -0.613 2.033 14.711 1.00 0.00 H +ATOM 1885 N PRO A 197 2.141 1.253 16.121 1.00 12.25 N +ATOM 1886 CA PRO A 197 2.899 2.484 16.344 1.00 13.67 C +ATOM 1887 C PRO A 197 2.038 3.623 15.785 1.00 13.27 C +ATOM 1888 O PRO A 197 1.340 3.436 14.786 1.00 15.33 O +ATOM 1889 CB PRO A 197 4.154 2.247 15.509 1.00 11.62 C +ATOM 1890 CG PRO A 197 4.399 0.796 15.714 1.00 11.43 C +ATOM 1891 CD PRO A 197 2.998 0.215 15.519 1.00 12.29 C +ATOM 1892 N PRO A 198 2.131 4.832 16.360 1.00 13.42 N +ATOM 1893 CA PRO A 198 2.958 5.284 17.483 1.00 11.81 C +ATOM 1894 C PRO A 198 2.599 4.811 18.900 1.00 12.38 C +ATOM 1895 O PRO A 198 3.189 5.280 19.867 1.00 12.68 O +ATOM 1896 CB PRO A 198 2.896 6.803 17.341 1.00 11.74 C +ATOM 1897 CG PRO A 198 1.493 7.031 16.847 1.00 11.79 C +ATOM 1898 CD PRO A 198 1.319 5.942 15.818 1.00 11.41 C +ATOM 1899 N LEU A 199 1.627 3.909 19.028 1.00 12.22 N +ATOM 1900 CA LEU A 199 1.238 3.354 20.334 1.00 12.05 C +ATOM 1901 C LEU A 199 0.904 4.398 21.413 1.00 13.00 C +ATOM 1902 O LEU A 199 1.166 4.185 22.603 1.00 15.47 O +ATOM 1903 CB LEU A 199 2.351 2.426 20.833 1.00 11.75 C +ATOM 1904 CG LEU A 199 2.769 1.316 19.859 1.00 11.60 C +ATOM 1905 CD1 LEU A 199 4.163 0.803 20.208 1.00 12.96 C +ATOM 1906 CD2 LEU A 199 1.741 0.185 19.858 1.00 8.50 C +ATOM 1907 H LEU A 199 1.130 3.607 18.242 1.00 0.00 H +ATOM 1908 N LEU A 200 0.299 5.508 20.996 1.00 12.35 N +ATOM 1909 CA LEU A 200 -0.067 6.593 21.902 1.00 11.70 C +ATOM 1910 C LEU A 200 -1.079 6.134 22.949 1.00 11.37 C +ATOM 1911 O LEU A 200 -2.069 5.490 22.629 1.00 12.69 O +ATOM 1912 CB LEU A 200 -0.623 7.774 21.097 1.00 9.59 C +ATOM 1913 CG LEU A 200 0.342 8.255 20.005 1.00 11.77 C +ATOM 1914 CD1 LEU A 200 -0.229 9.453 19.297 1.00 13.09 C +ATOM 1915 CD2 LEU A 200 1.687 8.603 20.598 1.00 10.66 C +ATOM 1916 H LEU A 200 0.092 5.587 20.048 1.00 0.00 H +ATOM 1917 N GLU A 201 -0.815 6.453 24.207 1.00 11.72 N +ATOM 1918 CA GLU A 201 -1.695 6.067 25.301 1.00 10.25 C +ATOM 1919 C GLU A 201 -2.776 7.127 25.496 1.00 10.98 C +ATOM 1920 O GLU A 201 -2.827 7.801 26.526 1.00 8.30 O +ATOM 1921 CB GLU A 201 -0.860 5.870 26.559 1.00 9.26 C +ATOM 1922 CG GLU A 201 0.177 4.775 26.377 1.00 12.37 C +ATOM 1923 CD GLU A 201 1.002 4.493 27.620 1.00 10.26 C +ATOM 1924 OE1 GLU A 201 1.215 5.411 28.435 1.00 12.85 O +ATOM 1925 OE2 GLU A 201 1.454 3.345 27.768 1.00 11.54 O1- +ATOM 1926 H GLU A 201 -0.007 6.964 24.408 1.00 0.00 H +ATOM 1927 N CYS A 202 -3.670 7.206 24.512 1.00 10.08 N +ATOM 1928 CA CYS A 202 -4.741 8.192 24.477 1.00 11.06 C +ATOM 1929 C CYS A 202 -6.107 7.525 24.334 1.00 11.98 C +ATOM 1930 O CYS A 202 -7.113 8.216 24.142 1.00 12.80 O +ATOM 1931 CB CYS A 202 -4.534 9.093 23.238 1.00 9.94 C +ATOM 1932 SG CYS A 202 -2.825 9.766 22.975 1.00 12.70 S +ATOM 1933 H CYS A 202 -3.593 6.568 23.774 1.00 0.00 H +ATOM 1934 N VAL A 203 -6.172 6.206 24.497 1.00 12.42 N +ATOM 1935 CA VAL A 203 -7.431 5.496 24.252 1.00 10.17 C +ATOM 1936 C VAL A 203 -8.264 4.919 25.392 1.00 11.84 C +ATOM 1937 O VAL A 203 -7.752 4.227 26.266 1.00 11.29 O +ATOM 1938 CB VAL A 203 -7.195 4.315 23.255 1.00 10.60 C +ATOM 1939 CG1 VAL A 203 -8.523 3.672 22.850 1.00 7.25 C +ATOM 1940 CG2 VAL A 203 -6.417 4.781 22.024 1.00 7.26 C +ATOM 1941 H VAL A 203 -5.403 5.711 24.851 1.00 0.00 H +ATOM 1942 N THR A 204 -9.564 5.191 25.362 1.00 11.49 N +ATOM 1943 CA THR A 204 -10.468 4.583 26.322 1.00 11.05 C +ATOM 1944 C THR A 204 -11.021 3.438 25.485 1.00 11.64 C +ATOM 1945 O THR A 204 -11.603 3.663 24.416 1.00 11.12 O +ATOM 1946 CB THR A 204 -11.606 5.505 26.746 1.00 12.00 C +ATOM 1947 CG2 THR A 204 -12.699 4.709 27.450 1.00 10.56 C +ATOM 1948 OG1 THR A 204 -11.095 6.496 27.646 1.00 12.34 O +ATOM 1949 H THR A 204 -9.928 5.798 24.686 1.00 0.00 H +ATOM 1950 HG1 THR A 204 -10.366 6.959 27.220 1.00 0.00 H +ATOM 1951 N TRP A 205 -10.691 2.219 25.887 1.00 9.74 N +ATOM 1952 CA TRP A 205 -11.136 1.047 25.173 1.00 9.04 C +ATOM 1953 C TRP A 205 -12.485 0.593 25.660 1.00 9.20 C +ATOM 1954 O TRP A 205 -12.733 0.567 26.864 1.00 9.22 O +ATOM 1955 CB TRP A 205 -10.126 -0.086 25.333 1.00 8.84 C +ATOM 1956 CG TRP A 205 -9.037 -0.018 24.339 1.00 9.29 C +ATOM 1957 CD1 TRP A 205 -7.786 0.517 24.515 1.00 9.38 C +ATOM 1958 CD2 TRP A 205 -9.091 -0.485 22.984 1.00 9.98 C +ATOM 1959 CE2 TRP A 205 -7.835 -0.201 22.394 1.00 9.76 C +ATOM 1960 CE3 TRP A 205 -10.079 -1.117 22.211 1.00 9.32 C +ATOM 1961 NE1 TRP A 205 -7.062 0.412 23.347 1.00 9.25 N +ATOM 1962 CZ2 TRP A 205 -7.540 -0.527 21.066 1.00 9.52 C +ATOM 1963 CZ3 TRP A 205 -9.786 -1.439 20.894 1.00 10.61 C +ATOM 1964 CH2 TRP A 205 -8.521 -1.142 20.335 1.00 9.52 C +ATOM 1965 H TRP A 205 -10.166 2.102 26.707 1.00 0.00 H +ATOM 1966 HE1 TRP A 205 -6.174 0.797 23.157 1.00 0.00 H +ATOM 1967 N ILE A 206 -13.358 0.275 24.710 1.00 9.08 N +ATOM 1968 CA ILE A 206 -14.702 -0.214 24.995 1.00 9.40 C +ATOM 1969 C ILE A 206 -14.835 -1.490 24.170 1.00 9.48 C +ATOM 1970 O ILE A 206 -14.977 -1.447 22.955 1.00 9.11 O +ATOM 1971 CB ILE A 206 -15.794 0.824 24.612 1.00 9.28 C +ATOM 1972 CG1 ILE A 206 -15.576 2.121 25.400 1.00 11.19 C +ATOM 1973 CG2 ILE A 206 -17.167 0.287 24.963 1.00 9.70 C +ATOM 1974 CD1 ILE A 206 -16.458 3.281 24.996 1.00 12.34 C +ATOM 1975 H ILE A 206 -13.106 0.381 23.766 1.00 0.00 H +ATOM 1976 N VAL A 207 -14.687 -2.627 24.835 1.00 9.70 N +ATOM 1977 CA VAL A 207 -14.753 -3.921 24.177 1.00 10.36 C +ATOM 1978 C VAL A 207 -16.080 -4.602 24.452 1.00 11.58 C +ATOM 1979 O VAL A 207 -16.421 -4.890 25.601 1.00 12.79 O +ATOM 1980 CB VAL A 207 -13.596 -4.835 24.629 1.00 10.21 C +ATOM 1981 CG1 VAL A 207 -13.630 -6.147 23.861 1.00 7.53 C +ATOM 1982 CG2 VAL A 207 -12.250 -4.118 24.434 1.00 9.32 C +ATOM 1983 H VAL A 207 -14.557 -2.588 25.805 1.00 0.00 H +ATOM 1984 N LEU A 208 -16.821 -4.865 23.384 1.00 12.72 N +ATOM 1985 CA LEU A 208 -18.123 -5.495 23.492 1.00 12.35 C +ATOM 1986 C LEU A 208 -18.046 -6.963 23.888 1.00 13.80 C +ATOM 1987 O LEU A 208 -17.212 -7.722 23.399 1.00 12.86 O +ATOM 1988 CB LEU A 208 -18.911 -5.315 22.193 1.00 10.72 C +ATOM 1989 CG LEU A 208 -19.167 -3.854 21.829 1.00 11.66 C +ATOM 1990 CD1 LEU A 208 -20.146 -3.783 20.664 1.00 13.11 C +ATOM 1991 CD2 LEU A 208 -19.731 -3.087 23.034 1.00 12.96 C +ATOM 1992 H LEU A 208 -16.463 -4.653 22.496 1.00 0.00 H +ATOM 1993 N LYS A 209 -18.920 -7.331 24.811 1.00 13.99 N +ATOM 1994 CA LYS A 209 -19.020 -8.685 25.323 1.00 14.60 C +ATOM 1995 C LYS A 209 -19.453 -9.641 24.218 1.00 13.03 C +ATOM 1996 O LYS A 209 -18.878 -10.710 24.058 1.00 13.47 O +ATOM 1997 CB LYS A 209 -20.053 -8.704 26.459 1.00 17.38 C +ATOM 1998 CG LYS A 209 -20.457 -10.080 26.966 1.00 22.21 C +ATOM 1999 CD LYS A 209 -21.692 -9.997 27.865 1.00 25.50 C +ATOM 2000 CE LYS A 209 -22.998 -10.015 27.073 1.00 28.74 C +ATOM 2001 NZ LYS A 209 -23.059 -9.022 25.961 1.00 33.23 N1+ +ATOM 2002 H LYS A 209 -19.528 -6.638 25.149 1.00 0.00 H +ATOM 2003 HZ1 LYS A 209 -22.937 -8.063 26.344 1.00 0.00 H +ATOM 2004 HZ2 LYS A 209 -22.304 -9.218 25.273 1.00 0.00 H +ATOM 2005 HZ3 LYS A 209 -23.983 -9.089 25.487 1.00 0.00 H +ATOM 2006 N GLU A 210 -20.464 -9.247 23.455 1.00 12.75 N +ATOM 2007 CA GLU A 210 -21.002 -10.085 22.383 1.00 14.60 C +ATOM 2008 C GLU A 210 -20.282 -9.954 21.038 1.00 14.12 C +ATOM 2009 O GLU A 210 -20.204 -8.864 20.476 1.00 13.90 O +ATOM 2010 CB GLU A 210 -22.497 -9.789 22.186 1.00 13.80 C +ATOM 2011 CG GLU A 210 -23.123 -10.481 20.964 1.00 18.42 C +ATOM 2012 CD GLU A 210 -24.567 -10.067 20.704 1.00 20.76 C +ATOM 2013 OE1 GLU A 210 -25.215 -9.559 21.639 1.00 20.30 O +ATOM 2014 OE2 GLU A 210 -25.056 -10.250 19.562 1.00 22.03 O1- +ATOM 2015 H GLU A 210 -20.825 -8.356 23.584 1.00 0.00 H +ATOM 2016 N PRO A 211 -19.738 -11.062 20.513 1.00 14.54 N +ATOM 2017 CA PRO A 211 -19.053 -10.966 19.223 1.00 14.61 C +ATOM 2018 C PRO A 211 -20.042 -11.092 18.066 1.00 15.24 C +ATOM 2019 O PRO A 211 -21.214 -11.412 18.275 1.00 15.89 O +ATOM 2020 CB PRO A 211 -18.096 -12.157 19.266 1.00 14.57 C +ATOM 2021 CG PRO A 211 -18.860 -13.168 20.025 1.00 15.12 C +ATOM 2022 CD PRO A 211 -19.484 -12.368 21.149 1.00 13.46 C +ATOM 2023 N ILE A 212 -19.605 -10.719 16.868 1.00 15.24 N +ATOM 2024 CA ILE A 212 -20.438 -10.884 15.679 1.00 14.79 C +ATOM 2025 C ILE A 212 -19.810 -12.084 14.960 1.00 16.51 C +ATOM 2026 O ILE A 212 -18.625 -12.409 15.182 1.00 14.53 O +ATOM 2027 CB ILE A 212 -20.444 -9.641 14.732 1.00 13.21 C +ATOM 2028 CG1 ILE A 212 -19.028 -9.285 14.282 1.00 11.60 C +ATOM 2029 CG2 ILE A 212 -21.096 -8.455 15.415 1.00 13.41 C +ATOM 2030 CD1 ILE A 212 -18.984 -8.241 13.171 1.00 12.48 C +ATOM 2031 H ILE A 212 -18.696 -10.363 16.771 1.00 0.00 H +ATOM 2032 N SER A 213 -20.610 -12.804 14.185 1.00 17.54 N +ATOM 2033 CA SER A 213 -20.075 -13.945 13.464 1.00 20.57 C +ATOM 2034 C SER A 213 -19.936 -13.568 12.001 1.00 19.82 C +ATOM 2035 O SER A 213 -20.682 -12.731 11.494 1.00 21.98 O +ATOM 2036 CB SER A 213 -20.985 -15.164 13.610 1.00 21.58 C +ATOM 2037 OG SER A 213 -22.238 -14.932 13.001 1.00 25.95 O +ATOM 2038 H SER A 213 -21.548 -12.594 14.038 1.00 0.00 H +ATOM 2039 HG SER A 213 -22.104 -14.734 12.059 1.00 0.00 H +ATOM 2040 N VAL A 214 -18.931 -14.131 11.350 1.00 20.31 N +ATOM 2041 CA VAL A 214 -18.695 -13.897 9.932 1.00 19.57 C +ATOM 2042 C VAL A 214 -18.434 -15.270 9.325 1.00 19.80 C +ATOM 2043 O VAL A 214 -18.005 -16.190 10.028 1.00 19.95 O +ATOM 2044 CB VAL A 214 -17.481 -12.970 9.694 1.00 18.63 C +ATOM 2045 CG1 VAL A 214 -17.759 -11.600 10.293 1.00 18.87 C +ATOM 2046 CG2 VAL A 214 -16.214 -13.575 10.290 1.00 18.71 C +ATOM 2047 H VAL A 214 -18.324 -14.750 11.806 1.00 0.00 H +ATOM 2048 N SER A 215 -18.709 -15.438 8.038 1.00 19.66 N +ATOM 2049 CA SER A 215 -18.471 -16.741 7.431 1.00 19.63 C +ATOM 2050 C SER A 215 -16.993 -16.978 7.167 1.00 20.31 C +ATOM 2051 O SER A 215 -16.173 -16.046 7.163 1.00 18.75 O +ATOM 2052 CB SER A 215 -19.271 -16.917 6.137 1.00 18.47 C +ATOM 2053 OG SER A 215 -18.929 -15.941 5.172 1.00 19.02 O +ATOM 2054 H SER A 215 -19.038 -14.671 7.532 1.00 0.00 H +ATOM 2055 HG SER A 215 -19.368 -15.135 5.465 1.00 0.00 H +ATOM 2056 N SER A 216 -16.673 -18.242 6.930 1.00 20.96 N +ATOM 2057 CA SER A 216 -15.323 -18.687 6.632 1.00 22.41 C +ATOM 2058 C SER A 216 -14.808 -17.986 5.367 1.00 21.71 C +ATOM 2059 O SER A 216 -13.670 -17.506 5.324 1.00 21.98 O +ATOM 2060 CB SER A 216 -15.342 -20.208 6.434 1.00 21.83 C +ATOM 2061 OG SER A 216 -14.052 -20.705 6.164 1.00 29.28 O +ATOM 2062 H SER A 216 -17.383 -18.911 6.969 1.00 0.00 H +ATOM 2063 HG SER A 216 -13.417 -20.432 6.836 1.00 0.00 H +ATOM 2064 N GLU A 217 -15.674 -17.883 4.361 1.00 21.47 N +ATOM 2065 CA GLU A 217 -15.316 -17.243 3.100 1.00 21.76 C +ATOM 2066 C GLU A 217 -15.175 -15.730 3.208 1.00 20.49 C +ATOM 2067 O GLU A 217 -14.420 -15.132 2.439 1.00 19.12 O +ATOM 2068 CB GLU A 217 -16.282 -17.628 1.969 1.00 23.24 C +ATOM 2069 CG GLU A 217 -17.692 -17.969 2.400 1.00 29.75 C +ATOM 2070 CD GLU A 217 -17.830 -19.380 2.941 1.00 30.62 C +ATOM 2071 OE1 GLU A 217 -17.787 -20.333 2.137 1.00 34.64 O +ATOM 2072 OE2 GLU A 217 -17.994 -19.539 4.167 1.00 30.61 O1- +ATOM 2073 H GLU A 217 -16.564 -18.207 4.532 1.00 0.00 H +ATOM 2074 N GLN A 218 -15.889 -15.109 4.151 1.00 17.52 N +ATOM 2075 CA GLN A 218 -15.769 -13.667 4.343 1.00 16.52 C +ATOM 2076 C GLN A 218 -14.382 -13.346 4.900 1.00 16.72 C +ATOM 2077 O GLN A 218 -13.666 -12.528 4.340 1.00 15.33 O +ATOM 2078 CB GLN A 218 -16.849 -13.129 5.281 1.00 14.11 C +ATOM 2079 CG GLN A 218 -18.222 -13.063 4.645 1.00 14.56 C +ATOM 2080 CD GLN A 218 -19.285 -12.462 5.549 1.00 13.44 C +ATOM 2081 NE2 GLN A 218 -20.034 -11.508 5.017 1.00 13.13 N +ATOM 2082 OE1 GLN A 218 -19.437 -12.858 6.706 1.00 13.40 O +ATOM 2083 H GLN A 218 -16.495 -15.620 4.722 1.00 0.00 H +ATOM 2084 HE21 GLN A 218 -20.715 -11.076 5.568 1.00 0.00 H +ATOM 2085 HE22 GLN A 218 -19.862 -11.270 4.076 1.00 0.00 H +ATOM 2086 N VAL A 219 -13.982 -14.018 5.975 1.00 17.15 N +ATOM 2087 CA VAL A 219 -12.665 -13.760 6.549 1.00 19.78 C +ATOM 2088 C VAL A 219 -11.547 -14.241 5.602 1.00 19.86 C +ATOM 2089 O VAL A 219 -10.440 -13.702 5.605 1.00 18.95 O +ATOM 2090 CB VAL A 219 -12.519 -14.354 7.981 1.00 19.88 C +ATOM 2091 CG1 VAL A 219 -12.715 -15.854 7.972 1.00 20.76 C +ATOM 2092 CG2 VAL A 219 -11.159 -14.001 8.558 1.00 21.68 C +ATOM 2093 H VAL A 219 -14.573 -14.685 6.386 1.00 0.00 H +ATOM 2094 N LEU A 220 -11.861 -15.229 4.769 1.00 19.90 N +ATOM 2095 CA LEU A 220 -10.918 -15.762 3.785 1.00 19.85 C +ATOM 2096 C LEU A 220 -10.487 -14.649 2.819 1.00 19.24 C +ATOM 2097 O LEU A 220 -9.321 -14.561 2.425 1.00 18.82 O +ATOM 2098 CB LEU A 220 -11.593 -16.879 2.992 1.00 21.89 C +ATOM 2099 CG LEU A 220 -10.720 -17.789 2.142 1.00 24.72 C +ATOM 2100 CD1 LEU A 220 -9.715 -18.493 3.043 1.00 28.14 C +ATOM 2101 CD2 LEU A 220 -11.594 -18.808 1.426 1.00 26.46 C +ATOM 2102 H LEU A 220 -12.746 -15.642 4.833 1.00 0.00 H +ATOM 2103 N LYS A 221 -11.433 -13.791 2.452 1.00 18.55 N +ATOM 2104 CA LYS A 221 -11.155 -12.680 1.550 1.00 17.99 C +ATOM 2105 C LYS A 221 -10.147 -11.718 2.161 1.00 15.63 C +ATOM 2106 O LYS A 221 -9.346 -11.120 1.442 1.00 14.13 O +ATOM 2107 CB LYS A 221 -12.436 -11.923 1.233 1.00 20.81 C +ATOM 2108 CG LYS A 221 -13.536 -12.782 0.653 1.00 28.10 C +ATOM 2109 CD LYS A 221 -13.163 -13.363 -0.696 1.00 32.64 C +ATOM 2110 CE LYS A 221 -14.404 -13.909 -1.410 1.00 36.87 C +ATOM 2111 NZ LYS A 221 -15.187 -14.881 -0.588 1.00 40.55 N1+ +ATOM 2112 H LYS A 221 -12.349 -13.915 2.786 1.00 0.00 H +ATOM 2113 HZ1 LYS A 221 -14.585 -15.693 -0.345 1.00 0.00 H +ATOM 2114 HZ2 LYS A 221 -15.513 -14.420 0.285 1.00 0.00 H +ATOM 2115 HZ3 LYS A 221 -16.011 -15.209 -1.131 1.00 0.00 H +ATOM 2116 N PHE A 222 -10.213 -11.551 3.483 1.00 13.52 N +ATOM 2117 CA PHE A 222 -9.301 -10.665 4.219 1.00 12.48 C +ATOM 2118 C PHE A 222 -7.870 -11.103 3.980 1.00 11.54 C +ATOM 2119 O PHE A 222 -6.983 -10.286 3.756 1.00 12.31 O +ATOM 2120 CB PHE A 222 -9.527 -10.769 5.741 1.00 12.31 C +ATOM 2121 CG PHE A 222 -10.739 -10.036 6.255 1.00 13.21 C +ATOM 2122 CD1 PHE A 222 -11.734 -9.586 5.398 1.00 12.89 C +ATOM 2123 CD2 PHE A 222 -10.879 -9.805 7.620 1.00 13.35 C +ATOM 2124 CE1 PHE A 222 -12.841 -8.923 5.897 1.00 14.96 C +ATOM 2125 CE2 PHE A 222 -11.987 -9.141 8.123 1.00 14.01 C +ATOM 2126 CZ PHE A 222 -12.966 -8.701 7.263 1.00 13.46 C +ATOM 2127 H PHE A 222 -10.898 -12.042 3.982 1.00 0.00 H +ATOM 2128 N ARG A 223 -7.661 -12.410 4.071 1.00 11.06 N +ATOM 2129 CA ARG A 223 -6.344 -13.020 3.928 1.00 14.22 C +ATOM 2130 C ARG A 223 -5.694 -12.954 2.542 1.00 15.09 C +ATOM 2131 O ARG A 223 -4.534 -13.334 2.381 1.00 14.50 O +ATOM 2132 CB ARG A 223 -6.403 -14.462 4.431 1.00 12.88 C +ATOM 2133 CG ARG A 223 -6.914 -14.563 5.861 1.00 12.30 C +ATOM 2134 CD ARG A 223 -6.979 -15.995 6.332 1.00 13.39 C +ATOM 2135 NE ARG A 223 -7.498 -16.099 7.695 1.00 11.18 N +ATOM 2136 CZ ARG A 223 -8.366 -17.022 8.083 1.00 12.13 C +ATOM 2137 NH1 ARG A 223 -8.811 -17.915 7.211 1.00 12.71 N1+ +ATOM 2138 NH2 ARG A 223 -8.782 -17.057 9.342 1.00 12.44 N +ATOM 2139 H ARG A 223 -8.430 -12.993 4.245 1.00 0.00 H +ATOM 2140 HE ARG A 223 -7.218 -15.444 8.357 1.00 0.00 H +ATOM 2141 HH11 ARG A 223 -8.500 -17.901 6.260 1.00 0.00 H +ATOM 2142 HH12 ARG A 223 -9.464 -18.611 7.508 1.00 0.00 H +ATOM 2143 HH21 ARG A 223 -8.416 -16.390 9.973 1.00 0.00 H +ATOM 2144 HH22 ARG A 223 -9.425 -17.741 9.651 1.00 0.00 H +ATOM 2145 N LYS A 224 -6.429 -12.467 1.551 1.00 16.57 N +ATOM 2146 CA LYS A 224 -5.884 -12.349 0.209 1.00 18.57 C +ATOM 2147 C LYS A 224 -5.330 -10.952 -0.055 1.00 18.13 C +ATOM 2148 O LYS A 224 -4.888 -10.662 -1.165 1.00 18.17 O +ATOM 2149 CB LYS A 224 -6.924 -12.736 -0.843 1.00 21.83 C +ATOM 2150 CG LYS A 224 -7.253 -14.225 -0.847 1.00 26.52 C +ATOM 2151 CD LYS A 224 -8.433 -14.523 -1.760 1.00 33.18 C +ATOM 2152 CE LYS A 224 -8.777 -16.011 -1.760 1.00 36.96 C +ATOM 2153 NZ LYS A 224 -10.021 -16.311 -2.539 1.00 41.43 N1+ +ATOM 2154 H LYS A 224 -7.349 -12.173 1.714 1.00 0.00 H +ATOM 2155 HZ1 LYS A 224 -9.893 -16.009 -3.526 1.00 0.00 H +ATOM 2156 HZ2 LYS A 224 -10.211 -17.333 -2.509 1.00 0.00 H +ATOM 2157 HZ3 LYS A 224 -10.822 -15.797 -2.120 1.00 0.00 H +ATOM 2158 N LEU A 225 -5.376 -10.079 0.950 1.00 16.46 N +ATOM 2159 CA LEU A 225 -4.821 -8.739 0.792 1.00 15.63 C +ATOM 2160 C LEU A 225 -3.299 -8.852 0.811 1.00 14.13 C +ATOM 2161 O LEU A 225 -2.745 -9.870 1.222 1.00 13.17 O +ATOM 2162 CB LEU A 225 -5.255 -7.812 1.929 1.00 17.58 C +ATOM 2163 CG LEU A 225 -6.539 -6.977 1.849 1.00 20.84 C +ATOM 2164 CD1 LEU A 225 -6.942 -6.733 0.406 1.00 19.79 C +ATOM 2165 CD2 LEU A 225 -7.646 -7.663 2.604 1.00 23.08 C +ATOM 2166 H LEU A 225 -5.772 -10.335 1.809 1.00 0.00 H +ATOM 2167 N ASN A 226 -2.620 -7.801 0.383 1.00 13.69 N +ATOM 2168 CA ASN A 226 -1.168 -7.793 0.368 1.00 13.87 C +ATOM 2169 C ASN A 226 -0.621 -6.666 1.234 1.00 13.33 C +ATOM 2170 O ASN A 226 -1.170 -5.576 1.260 1.00 13.72 O +ATOM 2171 CB ASN A 226 -0.653 -7.567 -1.056 1.00 15.51 C +ATOM 2172 CG ASN A 226 -0.834 -8.766 -1.966 1.00 18.47 C +ATOM 2173 ND2 ASN A 226 -1.279 -9.896 -1.424 1.00 16.12 N +ATOM 2174 OD1 ASN A 226 -0.541 -8.674 -3.156 1.00 22.77 O +ATOM 2175 H ASN A 226 -3.078 -6.993 0.067 1.00 0.00 H +ATOM 2176 HD21 ASN A 226 -1.427 -10.615 -2.066 1.00 0.00 H +ATOM 2177 HD22 ASN A 226 -1.473 -10.002 -0.471 1.00 0.00 H +ATOM 2178 N PHE A 227 0.460 -6.936 1.947 1.00 14.02 N +ATOM 2179 CA PHE A 227 1.123 -5.920 2.757 1.00 15.97 C +ATOM 2180 C PHE A 227 1.946 -5.040 1.806 1.00 17.00 C +ATOM 2181 O PHE A 227 2.180 -3.856 2.055 1.00 18.55 O +ATOM 2182 CB PHE A 227 2.126 -6.577 3.703 1.00 14.84 C +ATOM 2183 CG PHE A 227 1.528 -7.146 4.956 1.00 15.37 C +ATOM 2184 CD1 PHE A 227 0.729 -6.363 5.785 1.00 16.15 C +ATOM 2185 CD2 PHE A 227 1.853 -8.438 5.363 1.00 13.92 C +ATOM 2186 CE1 PHE A 227 0.263 -6.852 7.018 1.00 16.74 C +ATOM 2187 CE2 PHE A 227 1.398 -8.938 6.588 1.00 17.00 C +ATOM 2188 CZ PHE A 227 0.600 -8.139 7.421 1.00 16.80 C +ATOM 2189 H PHE A 227 0.825 -7.842 1.919 1.00 0.00 H +ATOM 2190 N ASN A 228 2.468 -5.678 0.766 1.00 16.84 N +ATOM 2191 CA ASN A 228 3.327 -5.038 -0.234 1.00 17.92 C +ATOM 2192 C ASN A 228 2.599 -4.163 -1.244 1.00 17.17 C +ATOM 2193 O ASN A 228 1.387 -4.253 -1.428 1.00 17.33 O +ATOM 2194 CB ASN A 228 4.070 -6.118 -1.021 1.00 16.75 C +ATOM 2195 CG ASN A 228 3.110 -7.047 -1.756 1.00 19.53 C +ATOM 2196 ND2 ASN A 228 2.985 -6.866 -3.066 1.00 20.56 N +ATOM 2197 OD1 ASN A 228 2.447 -7.884 -1.135 1.00 18.41 O +ATOM 2198 H ASN A 228 2.239 -6.621 0.643 1.00 0.00 H +ATOM 2199 HD21 ASN A 228 2.358 -7.458 -3.532 1.00 0.00 H +ATOM 2200 HD22 ASN A 228 3.498 -6.166 -3.522 1.00 0.00 H +ATOM 2201 N GLY A 229 3.374 -3.346 -1.940 1.00 18.42 N +ATOM 2202 CA GLY A 229 2.808 -2.500 -2.964 1.00 17.06 C +ATOM 2203 C GLY A 229 2.812 -3.280 -4.263 1.00 17.36 C +ATOM 2204 O GLY A 229 3.415 -4.358 -4.350 1.00 15.80 O +ATOM 2205 H GLY A 229 4.321 -3.331 -1.759 1.00 0.00 H +ATOM 2206 N GLU A 230 2.124 -2.755 -5.268 1.00 18.65 N +ATOM 2207 CA GLU A 230 2.066 -3.410 -6.563 1.00 22.82 C +ATOM 2208 C GLU A 230 3.485 -3.459 -7.123 1.00 23.12 C +ATOM 2209 O GLU A 230 4.278 -2.560 -6.870 1.00 22.84 O +ATOM 2210 CB GLU A 230 1.166 -2.619 -7.504 1.00 23.40 C +ATOM 2211 CG GLU A 230 0.920 -3.318 -8.825 1.00 29.66 C +ATOM 2212 CD GLU A 230 0.136 -2.472 -9.802 1.00 31.47 C +ATOM 2213 OE1 GLU A 230 -0.597 -1.563 -9.359 1.00 33.03 O +ATOM 2214 OE2 GLU A 230 0.259 -2.713 -11.022 1.00 35.70 O1- +ATOM 2215 H GLU A 230 1.686 -1.894 -5.159 1.00 0.00 H +ATOM 2216 N GLY A 231 3.821 -4.531 -7.829 1.00 25.90 N +ATOM 2217 CA GLY A 231 5.154 -4.635 -8.401 1.00 28.63 C +ATOM 2218 C GLY A 231 6.223 -5.126 -7.437 1.00 30.81 C +ATOM 2219 O GLY A 231 7.366 -5.363 -7.840 1.00 32.14 O +ATOM 2220 H GLY A 231 3.185 -5.262 -7.947 1.00 0.00 H +ATOM 2221 N GLU A 232 5.876 -5.240 -6.158 1.00 30.80 N +ATOM 2222 CA GLU A 232 6.815 -5.724 -5.151 1.00 29.11 C +ATOM 2223 C GLU A 232 6.482 -7.197 -4.919 1.00 26.90 C +ATOM 2224 O GLU A 232 5.437 -7.680 -5.366 1.00 27.21 O +ATOM 2225 CB GLU A 232 6.632 -4.961 -3.835 1.00 31.18 C +ATOM 2226 CG GLU A 232 6.790 -3.452 -3.917 1.00 34.93 C +ATOM 2227 CD GLU A 232 6.437 -2.755 -2.604 1.00 38.57 C +ATOM 2228 OE1 GLU A 232 6.303 -3.435 -1.563 1.00 40.32 O +ATOM 2229 OE2 GLU A 232 6.284 -1.517 -2.606 1.00 43.09 O1- +ATOM 2230 H GLU A 232 4.970 -5.016 -5.869 1.00 0.00 H +ATOM 2231 N PRO A 233 7.392 -7.947 -4.279 1.00 25.22 N +ATOM 2232 CA PRO A 233 7.147 -9.365 -4.002 1.00 23.52 C +ATOM 2233 C PRO A 233 5.905 -9.455 -3.117 1.00 21.98 C +ATOM 2234 O PRO A 233 5.765 -8.712 -2.153 1.00 20.50 O +ATOM 2235 CB PRO A 233 8.388 -9.777 -3.218 1.00 24.98 C +ATOM 2236 CG PRO A 233 9.448 -8.899 -3.784 1.00 25.27 C +ATOM 2237 CD PRO A 233 8.755 -7.561 -3.878 1.00 25.38 C +ATOM 2238 N GLU A 234 5.011 -10.367 -3.446 1.00 21.71 N +ATOM 2239 CA GLU A 234 3.786 -10.515 -2.692 1.00 22.65 C +ATOM 2240 C GLU A 234 3.947 -11.101 -1.292 1.00 21.78 C +ATOM 2241 O GLU A 234 4.613 -12.120 -1.097 1.00 20.45 O +ATOM 2242 CB GLU A 234 2.773 -11.336 -3.496 1.00 23.25 C +ATOM 2243 CG GLU A 234 1.433 -11.513 -2.789 1.00 28.47 C +ATOM 2244 CD GLU A 234 0.378 -12.187 -3.647 1.00 29.51 C +ATOM 2245 OE1 GLU A 234 0.667 -12.541 -4.811 1.00 33.23 O +ATOM 2246 OE2 GLU A 234 -0.754 -12.352 -3.154 1.00 30.99 O1- +ATOM 2247 H GLU A 234 5.178 -10.947 -4.205 1.00 0.00 H +ATOM 2248 N GLU A 235 3.327 -10.427 -0.329 1.00 21.55 N +ATOM 2249 CA GLU A 235 3.302 -10.843 1.075 1.00 21.99 C +ATOM 2250 C GLU A 235 1.847 -10.742 1.504 1.00 19.53 C +ATOM 2251 O GLU A 235 1.272 -9.649 1.508 1.00 18.35 O +ATOM 2252 CB GLU A 235 4.127 -9.918 1.963 1.00 24.79 C +ATOM 2253 CG GLU A 235 5.608 -10.105 1.860 1.00 33.10 C +ATOM 2254 CD GLU A 235 6.333 -9.392 2.977 1.00 37.91 C +ATOM 2255 OE1 GLU A 235 6.318 -8.140 2.994 1.00 41.49 O +ATOM 2256 OE2 GLU A 235 6.903 -10.085 3.849 1.00 42.06 O1- +ATOM 2257 H GLU A 235 2.847 -9.610 -0.569 1.00 0.00 H +ATOM 2258 N LEU A 236 1.239 -11.874 1.829 1.00 16.04 N +ATOM 2259 CA LEU A 236 -0.149 -11.871 2.245 1.00 15.50 C +ATOM 2260 C LEU A 236 -0.356 -11.106 3.561 1.00 15.27 C +ATOM 2261 O LEU A 236 0.459 -11.193 4.488 1.00 14.11 O +ATOM 2262 CB LEU A 236 -0.667 -13.305 2.330 1.00 15.27 C +ATOM 2263 CG LEU A 236 -0.655 -13.994 0.963 1.00 16.92 C +ATOM 2264 CD1 LEU A 236 -1.118 -15.421 1.081 1.00 16.93 C +ATOM 2265 CD2 LEU A 236 -1.548 -13.235 -0.008 1.00 17.49 C +ATOM 2266 H LEU A 236 1.740 -12.711 1.811 1.00 0.00 H +ATOM 2267 N MET A 237 -1.406 -10.293 3.609 1.00 14.24 N +ATOM 2268 CA MET A 237 -1.709 -9.518 4.811 1.00 13.19 C +ATOM 2269 C MET A 237 -2.467 -10.414 5.775 1.00 11.61 C +ATOM 2270 O MET A 237 -3.662 -10.644 5.615 1.00 11.94 O +ATOM 2271 CB MET A 237 -2.552 -8.286 4.472 1.00 13.09 C +ATOM 2272 CG MET A 237 -2.802 -7.339 5.646 1.00 10.19 C +ATOM 2273 SD MET A 237 -3.765 -5.933 5.127 1.00 12.59 S +ATOM 2274 CE MET A 237 -2.480 -4.916 4.438 1.00 12.13 C +ATOM 2275 H MET A 237 -2.019 -10.263 2.854 1.00 0.00 H +ATOM 2276 N VAL A 238 -1.742 -10.993 6.718 1.00 11.66 N +ATOM 2277 CA VAL A 238 -2.340 -11.867 7.720 1.00 12.08 C +ATOM 2278 C VAL A 238 -1.594 -11.643 9.014 1.00 12.10 C +ATOM 2279 O VAL A 238 -0.463 -11.155 9.006 1.00 10.96 O +ATOM 2280 CB VAL A 238 -2.258 -13.385 7.339 1.00 11.24 C +ATOM 2281 CG1 VAL A 238 -3.234 -13.707 6.215 1.00 10.43 C +ATOM 2282 CG2 VAL A 238 -0.834 -13.780 6.952 1.00 9.30 C +ATOM 2283 H VAL A 238 -0.770 -10.840 6.759 1.00 0.00 H +ATOM 2284 N ASP A 239 -2.251 -11.958 10.124 1.00 12.00 N +ATOM 2285 CA ASP A 239 -1.655 -11.810 11.441 1.00 12.46 C +ATOM 2286 C ASP A 239 -1.155 -10.400 11.731 1.00 12.47 C +ATOM 2287 O ASP A 239 -0.072 -10.205 12.292 1.00 12.41 O +ATOM 2288 CB ASP A 239 -0.543 -12.852 11.649 1.00 13.07 C +ATOM 2289 CG ASP A 239 -1.086 -14.265 11.723 1.00 13.43 C +ATOM 2290 OD1 ASP A 239 -2.193 -14.446 12.264 1.00 14.33 O +ATOM 2291 OD2 ASP A 239 -0.425 -15.197 11.230 1.00 16.04 O1- +ATOM 2292 H ASP A 239 -3.184 -12.241 10.057 1.00 0.00 H +ATOM 2293 N ASN A 240 -1.976 -9.417 11.381 1.00 11.65 N +ATOM 2294 CA ASN A 240 -1.631 -8.024 11.620 1.00 11.33 C +ATOM 2295 C ASN A 240 -2.167 -7.624 13.006 1.00 12.86 C +ATOM 2296 O ASN A 240 -2.859 -6.622 13.148 1.00 13.40 O +ATOM 2297 CB ASN A 240 -2.205 -7.122 10.514 1.00 9.30 C +ATOM 2298 CG ASN A 240 -3.693 -7.319 10.297 1.00 9.36 C +ATOM 2299 ND2 ASN A 240 -4.284 -6.453 9.493 1.00 8.41 N +ATOM 2300 OD1 ASN A 240 -4.304 -8.244 10.841 1.00 9.74 O +ATOM 2301 H ASN A 240 -2.853 -9.641 11.001 1.00 0.00 H +ATOM 2302 HD21 ASN A 240 -5.248 -6.541 9.365 1.00 0.00 H +ATOM 2303 HD22 ASN A 240 -3.730 -5.752 9.086 1.00 0.00 H +ATOM 2304 N TRP A 241 -1.821 -8.412 14.024 1.00 11.13 N +ATOM 2305 CA TRP A 241 -2.270 -8.166 15.384 1.00 10.75 C +ATOM 2306 C TRP A 241 -1.111 -8.134 16.359 1.00 10.47 C +ATOM 2307 O TRP A 241 -0.074 -8.758 16.141 1.00 10.91 O +ATOM 2308 CB TRP A 241 -3.306 -9.216 15.825 1.00 9.27 C +ATOM 2309 CG TRP A 241 -2.895 -10.667 15.634 1.00 10.57 C +ATOM 2310 CD1 TRP A 241 -3.068 -11.423 14.510 1.00 9.30 C +ATOM 2311 CD2 TRP A 241 -2.286 -11.539 16.611 1.00 12.02 C +ATOM 2312 CE2 TRP A 241 -2.125 -12.802 16.000 1.00 11.35 C +ATOM 2313 CE3 TRP A 241 -1.870 -11.373 17.947 1.00 10.30 C +ATOM 2314 NE1 TRP A 241 -2.608 -12.701 14.721 1.00 11.24 N +ATOM 2315 CZ2 TRP A 241 -1.565 -13.899 16.676 1.00 12.01 C +ATOM 2316 CZ3 TRP A 241 -1.316 -12.461 18.617 1.00 11.31 C +ATOM 2317 CH2 TRP A 241 -1.168 -13.708 17.980 1.00 11.33 C +ATOM 2318 H TRP A 241 -1.202 -9.161 13.873 1.00 0.00 H +ATOM 2319 HE1 TRP A 241 -2.610 -13.411 14.057 1.00 0.00 H +ATOM 2320 N ARG A 242 -1.301 -7.385 17.434 1.00 9.94 N +ATOM 2321 CA ARG A 242 -0.307 -7.243 18.472 1.00 10.23 C +ATOM 2322 C ARG A 242 -0.678 -8.113 19.678 1.00 11.84 C +ATOM 2323 O ARG A 242 -1.851 -8.226 20.034 1.00 11.78 O +ATOM 2324 CB ARG A 242 -0.229 -5.778 18.906 1.00 9.57 C +ATOM 2325 CG ARG A 242 0.899 -5.487 19.868 1.00 9.80 C +ATOM 2326 CD ARG A 242 0.757 -4.123 20.505 1.00 9.50 C +ATOM 2327 NE ARG A 242 1.998 -3.773 21.176 1.00 10.68 N +ATOM 2328 CZ ARG A 242 2.128 -2.811 22.074 1.00 12.28 C +ATOM 2329 NH1 ARG A 242 1.077 -2.074 22.433 1.00 12.21 N1+ +ATOM 2330 NH2 ARG A 242 3.320 -2.580 22.601 1.00 10.52 N +ATOM 2331 H ARG A 242 -2.154 -6.932 17.559 1.00 0.00 H +ATOM 2332 HE ARG A 242 2.776 -4.295 20.925 1.00 0.00 H +ATOM 2333 HH11 ARG A 242 0.182 -2.241 22.022 1.00 0.00 H +ATOM 2334 HH12 ARG A 242 1.184 -1.352 23.115 1.00 0.00 H +ATOM 2335 HH21 ARG A 242 4.109 -3.126 22.321 1.00 0.00 H +ATOM 2336 HH22 ARG A 242 3.431 -1.854 23.280 1.00 0.00 H +ATOM 2337 N PRO A 243 0.319 -8.787 20.282 1.00 12.95 N +ATOM 2338 CA PRO A 243 0.130 -9.652 21.453 1.00 12.92 C +ATOM 2339 C PRO A 243 -0.348 -8.840 22.667 1.00 12.20 C +ATOM 2340 O PRO A 243 -0.056 -7.648 22.776 1.00 10.95 O +ATOM 2341 CB PRO A 243 1.543 -10.182 21.703 1.00 12.04 C +ATOM 2342 CG PRO A 243 2.140 -10.201 20.346 1.00 13.40 C +ATOM 2343 CD PRO A 243 1.706 -8.884 19.787 1.00 11.11 C +ATOM 2344 N ALA A 244 -1.041 -9.500 23.590 1.00 11.76 N +ATOM 2345 CA ALA A 244 -1.549 -8.849 24.803 1.00 13.28 C +ATOM 2346 C ALA A 244 -0.402 -8.283 25.640 1.00 12.96 C +ATOM 2347 O ALA A 244 0.660 -8.895 25.747 1.00 13.29 O +ATOM 2348 CB ALA A 244 -2.380 -9.834 25.631 1.00 11.20 C +ATOM 2349 H ALA A 244 -1.209 -10.448 23.457 1.00 0.00 H +ATOM 2350 N GLN A 245 -0.624 -7.110 26.221 1.00 12.15 N +ATOM 2351 CA GLN A 245 0.374 -6.433 27.034 1.00 12.82 C +ATOM 2352 C GLN A 245 -0.022 -6.555 28.503 1.00 15.40 C +ATOM 2353 O GLN A 245 -1.181 -6.826 28.814 1.00 16.44 O +ATOM 2354 CB GLN A 245 0.465 -4.963 26.616 1.00 11.74 C +ATOM 2355 CG GLN A 245 0.841 -4.772 25.148 1.00 11.57 C +ATOM 2356 CD GLN A 245 2.132 -5.494 24.782 1.00 14.64 C +ATOM 2357 NE2 GLN A 245 2.068 -6.376 23.793 1.00 12.39 N +ATOM 2358 OE1 GLN A 245 3.168 -5.269 25.395 1.00 15.93 O +ATOM 2359 H GLN A 245 -1.495 -6.702 26.164 1.00 0.00 H +ATOM 2360 HE21 GLN A 245 2.880 -6.861 23.563 1.00 0.00 H +ATOM 2361 HE22 GLN A 245 1.202 -6.487 23.359 1.00 0.00 H +ATOM 2362 N PRO A 246 0.942 -6.412 29.429 1.00 17.47 N +ATOM 2363 CA PRO A 246 0.596 -6.525 30.849 1.00 18.53 C +ATOM 2364 C PRO A 246 -0.348 -5.415 31.286 1.00 18.41 C +ATOM 2365 O PRO A 246 -0.157 -4.253 30.930 1.00 17.02 O +ATOM 2366 CB PRO A 246 1.957 -6.415 31.543 1.00 18.24 C +ATOM 2367 CG PRO A 246 2.715 -5.519 30.643 1.00 20.09 C +ATOM 2368 CD PRO A 246 2.369 -6.085 29.271 1.00 18.60 C +ATOM 2369 N LEU A 247 -1.360 -5.791 32.063 1.00 18.59 N +ATOM 2370 CA LEU A 247 -2.352 -4.847 32.566 1.00 19.78 C +ATOM 2371 C LEU A 247 -1.765 -3.815 33.530 1.00 20.34 C +ATOM 2372 O LEU A 247 -2.213 -2.675 33.569 1.00 19.28 O +ATOM 2373 CB LEU A 247 -3.499 -5.605 33.243 1.00 19.85 C +ATOM 2374 CG LEU A 247 -4.750 -4.805 33.614 1.00 20.62 C +ATOM 2375 CD1 LEU A 247 -5.391 -4.203 32.366 1.00 18.43 C +ATOM 2376 CD2 LEU A 247 -5.730 -5.713 34.347 1.00 20.70 C +ATOM 2377 H LEU A 247 -1.452 -6.738 32.278 1.00 0.00 H +ATOM 2378 N LYS A 248 -0.779 -4.227 34.319 1.00 22.11 N +ATOM 2379 CA LYS A 248 -0.130 -3.339 35.285 1.00 24.89 C +ATOM 2380 C LYS A 248 -1.103 -2.725 36.310 1.00 25.08 C +ATOM 2381 O LYS A 248 -1.905 -3.441 36.920 1.00 23.71 O +ATOM 2382 CB LYS A 248 0.664 -2.249 34.558 1.00 26.30 C +ATOM 2383 CG LYS A 248 1.779 -2.780 33.671 1.00 30.72 C +ATOM 2384 CD LYS A 248 2.650 -1.653 33.129 1.00 32.70 C +ATOM 2385 CE LYS A 248 3.911 -2.211 32.484 1.00 35.53 C +ATOM 2386 NZ LYS A 248 4.842 -1.152 32.003 1.00 37.95 N1+ +ATOM 2387 H LYS A 248 -0.512 -5.156 34.252 1.00 0.00 H +ATOM 2388 HZ1 LYS A 248 4.361 -0.561 31.299 1.00 0.00 H +ATOM 2389 HZ2 LYS A 248 5.137 -0.560 32.806 1.00 0.00 H +ATOM 2390 HZ3 LYS A 248 5.678 -1.595 31.571 1.00 0.00 H +ATOM 2391 N ASN A 249 -1.031 -1.408 36.497 1.00 25.68 N +ATOM 2392 CA ASN A 249 -1.890 -0.707 37.455 1.00 28.14 C +ATOM 2393 C ASN A 249 -3.208 -0.250 36.820 1.00 26.05 C +ATOM 2394 O ASN A 249 -3.529 0.945 36.812 1.00 26.68 O +ATOM 2395 CB ASN A 249 -1.138 0.495 38.054 1.00 32.29 C +ATOM 2396 CG ASN A 249 -1.921 1.190 39.160 1.00 37.00 C +ATOM 2397 ND2 ASN A 249 -2.390 2.405 38.886 1.00 38.73 N +ATOM 2398 OD1 ASN A 249 -2.097 0.641 40.250 1.00 40.27 O +ATOM 2399 H ASN A 249 -0.421 -0.850 35.985 1.00 0.00 H +ATOM 2400 HD21 ASN A 249 -2.889 2.841 39.604 1.00 0.00 H +ATOM 2401 HD22 ASN A 249 -2.227 2.797 38.010 1.00 0.00 H +ATOM 2402 N ARG A 250 -3.951 -1.202 36.266 1.00 23.05 N +ATOM 2403 CA ARG A 250 -5.227 -0.920 35.622 1.00 20.17 C +ATOM 2404 C ARG A 250 -6.251 -1.983 35.985 1.00 19.34 C +ATOM 2405 O ARG A 250 -5.909 -3.133 36.228 1.00 18.68 O +ATOM 2406 CB ARG A 250 -5.080 -0.904 34.098 1.00 18.11 C +ATOM 2407 CG ARG A 250 -4.335 0.272 33.530 1.00 17.83 C +ATOM 2408 CD ARG A 250 -4.241 0.155 32.019 1.00 16.18 C +ATOM 2409 NE ARG A 250 -3.312 -0.894 31.596 1.00 13.45 N +ATOM 2410 CZ ARG A 250 -3.126 -1.269 30.331 1.00 13.66 C +ATOM 2411 NH1 ARG A 250 -3.819 -0.690 29.352 1.00 9.96 N1+ +ATOM 2412 NH2 ARG A 250 -2.197 -2.176 30.038 1.00 10.06 N +ATOM 2413 H ARG A 250 -3.660 -2.144 36.307 1.00 0.00 H +ATOM 2414 HE ARG A 250 -2.782 -1.338 32.281 1.00 0.00 H +ATOM 2415 HH11 ARG A 250 -4.481 0.027 29.558 1.00 0.00 H +ATOM 2416 HH12 ARG A 250 -3.674 -0.977 28.405 1.00 0.00 H +ATOM 2417 HH21 ARG A 250 -1.642 -2.574 30.769 1.00 0.00 H +ATOM 2418 HH22 ARG A 250 -2.055 -2.463 29.092 1.00 0.00 H +ATOM 2419 N GLN A 251 -7.514 -1.593 36.024 1.00 20.13 N +ATOM 2420 CA GLN A 251 -8.563 -2.545 36.314 1.00 21.73 C +ATOM 2421 C GLN A 251 -9.573 -2.449 35.183 1.00 19.51 C +ATOM 2422 O GLN A 251 -9.807 -1.372 34.633 1.00 18.82 O +ATOM 2423 CB GLN A 251 -9.230 -2.243 37.661 1.00 27.50 C +ATOM 2424 CG GLN A 251 -10.189 -3.348 38.127 1.00 35.13 C +ATOM 2425 CD GLN A 251 -10.810 -3.061 39.487 1.00 41.05 C +ATOM 2426 NE2 GLN A 251 -10.924 -4.094 40.319 1.00 44.23 N +ATOM 2427 OE1 GLN A 251 -11.186 -1.924 39.782 1.00 44.77 O +ATOM 2428 H GLN A 251 -7.773 -0.670 35.822 1.00 0.00 H +ATOM 2429 HE21 GLN A 251 -11.310 -3.904 41.203 1.00 0.00 H +ATOM 2430 HE22 GLN A 251 -10.626 -4.981 40.037 1.00 0.00 H +ATOM 2431 N ILE A 252 -10.101 -3.592 34.784 1.00 17.42 N +ATOM 2432 CA ILE A 252 -11.086 -3.641 33.726 1.00 17.30 C +ATOM 2433 C ILE A 252 -12.457 -3.595 34.384 1.00 18.52 C +ATOM 2434 O ILE A 252 -12.725 -4.340 35.331 1.00 18.01 O +ATOM 2435 CB ILE A 252 -10.937 -4.930 32.898 1.00 17.08 C +ATOM 2436 CG1 ILE A 252 -9.556 -4.940 32.224 1.00 19.07 C +ATOM 2437 CG2 ILE A 252 -12.063 -5.032 31.879 1.00 14.55 C +ATOM 2438 CD1 ILE A 252 -9.219 -6.201 31.487 1.00 21.67 C +ATOM 2439 H ILE A 252 -9.862 -4.416 35.224 1.00 0.00 H +ATOM 2440 N LYS A 253 -13.300 -2.675 33.933 1.00 18.04 N +ATOM 2441 CA LYS A 253 -14.634 -2.565 34.491 1.00 17.96 C +ATOM 2442 C LYS A 253 -15.625 -3.155 33.503 1.00 16.86 C +ATOM 2443 O LYS A 253 -15.414 -3.101 32.291 1.00 16.77 O +ATOM 2444 CB LYS A 253 -14.951 -1.106 34.822 1.00 21.06 C +ATOM 2445 CG LYS A 253 -13.916 -0.492 35.780 1.00 26.00 C +ATOM 2446 CD LYS A 253 -14.313 0.883 36.327 1.00 32.43 C +ATOM 2447 CE LYS A 253 -13.990 2.042 35.374 1.00 35.38 C +ATOM 2448 NZ LYS A 253 -14.853 2.099 34.155 1.00 40.41 N1+ +ATOM 2449 H LYS A 253 -13.024 -2.071 33.211 1.00 0.00 H +ATOM 2450 HZ1 LYS A 253 -15.847 2.202 34.440 1.00 0.00 H +ATOM 2451 HZ2 LYS A 253 -14.573 2.911 33.568 1.00 0.00 H +ATOM 2452 HZ3 LYS A 253 -14.739 1.221 33.608 1.00 0.00 H +ATOM 2453 N ALA A 254 -16.655 -3.804 34.023 1.00 15.38 N +ATOM 2454 CA ALA A 254 -17.678 -4.411 33.191 1.00 15.11 C +ATOM 2455 C ALA A 254 -18.947 -3.631 33.405 1.00 14.45 C +ATOM 2456 O ALA A 254 -19.188 -3.132 34.500 1.00 16.51 O +ATOM 2457 CB ALA A 254 -17.889 -5.859 33.585 1.00 13.42 C +ATOM 2458 H ALA A 254 -16.767 -3.837 34.989 1.00 0.00 H +ATOM 2459 N SER A 255 -19.742 -3.495 32.356 1.00 15.70 N +ATOM 2460 CA SER A 255 -21.008 -2.773 32.445 1.00 17.15 C +ATOM 2461 C SER A 255 -22.101 -3.769 32.797 1.00 18.83 C +ATOM 2462 O SER A 255 -23.265 -3.403 32.935 1.00 19.12 O +ATOM 2463 CB SER A 255 -21.363 -2.149 31.090 1.00 16.57 C +ATOM 2464 OG SER A 255 -21.656 -3.161 30.130 1.00 13.00 O +ATOM 2465 H SER A 255 -19.442 -3.876 31.505 1.00 0.00 H +ATOM 2466 HG SER A 255 -20.899 -3.751 30.157 1.00 0.00 H +ATOM 2467 N PHE A 256 -21.725 -5.030 32.946 1.00 19.50 N +ATOM 2468 CA PHE A 256 -22.707 -6.054 33.207 1.00 23.02 C +ATOM 2469 C PHE A 256 -22.236 -6.998 34.288 1.00 26.28 C +ATOM 2470 O PHE A 256 -21.040 -7.130 34.532 1.00 26.24 O +ATOM 2471 CB PHE A 256 -22.965 -6.834 31.912 1.00 22.45 C +ATOM 2472 CG PHE A 256 -21.730 -7.487 31.347 1.00 22.90 C +ATOM 2473 CD1 PHE A 256 -20.837 -6.758 30.571 1.00 21.32 C +ATOM 2474 CD2 PHE A 256 -21.420 -8.811 31.661 1.00 23.49 C +ATOM 2475 CE1 PHE A 256 -19.651 -7.329 30.121 1.00 22.62 C +ATOM 2476 CE2 PHE A 256 -20.229 -9.395 31.214 1.00 24.95 C +ATOM 2477 CZ PHE A 256 -19.343 -8.648 30.444 1.00 22.38 C +ATOM 2478 H PHE A 256 -20.788 -5.302 32.934 1.00 0.00 H +ATOM 2479 N LYS A 257 -23.197 -7.653 34.930 1.00 31.57 N +ATOM 2480 CA LYS A 257 -22.919 -8.617 35.987 1.00 34.87 C +ATOM 2481 C LYS A 257 -23.456 -9.984 35.563 1.00 35.08 C +ATOM 2482 CB LYS A 257 -23.577 -8.173 37.299 1.00 37.79 C +ATOM 2483 CG LYS A 257 -23.282 -9.088 38.478 1.00 42.33 C +ATOM 2484 CD LYS A 257 -23.783 -8.498 39.783 1.00 46.38 C +ATOM 2485 CE LYS A 257 -25.285 -8.251 39.744 1.00 48.90 C +ATOM 2486 NZ LYS A 257 -25.791 -7.755 41.061 1.00 52.19 N1+ +ATOM 2487 H LYS A 257 -24.123 -7.470 34.676 1.00 15.00 H +ATOM 2488 HZ1 LYS A 257 -25.589 -8.462 41.797 1.00 0.00 H +ATOM 2489 HZ2 LYS A 257 -25.320 -6.859 41.301 1.00 0.00 H +ATOM 2490 HZ3 LYS A 257 -26.818 -7.602 41.002 1.00 0.00 H +TER +END diff --git a/tests/test_validation_metrics.py b/tests/test_validation_metrics.py new file mode 100644 index 0000000..c5cb6a3 --- /dev/null +++ b/tests/test_validation_metrics.py @@ -0,0 +1,173 @@ +import unittest +import torch +import numpy as np +from src.utils.validation_metrics import drmsd, gdt_ts, gdt_ha, lddt +from typing import Optional +from Bio.PDB import PDBParser +import random + + +class TestValidationMetricsBase(unittest.TestCase): + @classmethod + def setUpClass(cls): + # Load the PDB file + parser = PDBParser(QUIET=True) + structure = parser.get_structure("1bn1", "tests/test_data/1bn1.pdb") + + # Extract coordinates and create a mask + coords = [] + mask = [] + for model in structure: + for chain in model: + for residue in chain: + if residue.has_id("CA"): # Only consider CA atoms + coords.append(residue["CA"].coord) + mask.append(1) + else: + mask.append(0) + + # Create a batch of 3 identical structures + cls.coords = torch.tensor(coords).float().unsqueeze(0).repeat(3, 1, 1) + cls.mask = torch.tensor(mask).float().unsqueeze(0).repeat(3, 1) + + def test_print_shapes(self): + print("Shape of coords:", self.coords.shape) + print("Shape of mask:", self.mask.shape) + + +class TestDRMSD(TestValidationMetricsBase): + def test_drmsd_shape(self): + result = drmsd(self.coords, self.coords, self.mask) + self.assertEqual(result.shape, torch.Size([3])) + + def test_drmsd_identical_structures(self): + result = drmsd(self.coords, self.coords, self.mask) + self.assertTrue(torch.allclose(result, torch.zeros(3), atol=1e-6)) + + def test_drmsd_noisy_structures(self): + noisy_coords = self.coords + torch.randn_like(self.coords) * 0.1 + result = drmsd(self.coords, noisy_coords, self.mask) + self.assertTrue(torch.all(result > 0.0)) + + def test_drmsd_increases_with_noise(self): + noise_levels = [0.1, 0.5, 1.0, 2.0, 5.0] + drmsd_scores = [] + + for noise in noise_levels: + noisy_coords = self.coords + torch.randn_like(self.coords) * noise + drmsd_result = drmsd(self.coords, noisy_coords, self.mask) + drmsd_scores.append(drmsd_result.mean().item()) + + # Check if dRMSD scores are increasing + for i in range(1, len(drmsd_scores)): + self.assertGreater(drmsd_scores[i], drmsd_scores[i-1], + f"dRMSD score did not increase from noise level {noise_levels[i-1]} to {noise_levels[i]}") + + print("dRMSD scores for increasing noise levels:") + for noise, score in zip(noise_levels, drmsd_scores): + print(f"Noise: {noise}, dRMSD: {score:.4f}") + + +class TestLDDT(TestValidationMetricsBase): + def test_lddt_shape(self): + result = lddt(self.coords, self.coords, self.mask) + self.assertEqual(result.shape, self.mask.shape) + + def test_lddt_identical_structures(self): + result = lddt(self.coords, self.coords, self.mask) + self.assertTrue(torch.allclose(result, torch.ones_like(result))) + + def test_lddt_noisy_structures(self): + noisy_coords = self.coords + torch.randn_like(self.coords) * 0.5 + result = lddt(self.coords, noisy_coords, self.mask) + self.assertTrue(torch.all(result <= 1.0)) + self.assertTrue(torch.all(result >= 0.0)) + + def test_lddt_decreases_with_noise(self): + noise_levels = [0.1, 0.5, 1.0, 2.0, 5.0] + lddt_scores = [] + + for noise in noise_levels: + noisy_coords = self.coords + torch.randn_like(self.coords) * noise + lddt_result = lddt(self.coords, noisy_coords, self.mask) + lddt_scores.append(lddt_result.mean().item()) + + # Check if LDDT scores are decreasing + for i in range(1, len(lddt_scores)): + self.assertLess(lddt_scores[i], lddt_scores[i-1], + f"LDDT score did not decrease from noise level {noise_levels[i-1]} to {noise_levels[i]}") + + print("LDDT scores for increasing noise levels:") + for noise, score in zip(noise_levels, lddt_scores): + print(f"Noise: {noise}, LDDT: {score:.4f}") + + +class TestGDTMetrics(TestValidationMetricsBase): + def test_gdt_ts_shape(self): + result = gdt_ts(self.coords, self.coords, self.mask) + self.assertEqual(result.shape, torch.Size([3])) + + def test_gdt_ts_identical_structures(self): + result = gdt_ts(self.coords, self.coords, self.mask) + self.assertTrue(torch.allclose(result, torch.ones(3), atol=1e-6)) + + def test_gdt_ts_noisy_structures(self): + noisy_coords = self.coords + torch.randn_like(self.coords) * 0.5 + result = gdt_ts(self.coords, noisy_coords, self.mask) + self.assertTrue(torch.all(result < 1.0)) + self.assertTrue(torch.all(result > 0.0)) + + def test_gdt_ha_shape(self): + result = gdt_ha(self.coords, self.coords, self.mask) + self.assertEqual(result.shape, torch.Size([3])) + + def test_gdt_ha_identical_structures(self): + result = gdt_ha(self.coords, self.coords, self.mask) + self.assertTrue(torch.allclose(result, torch.ones(3), atol=1e-6)) + + def test_gdt_ha_noisy_structures(self): + noisy_coords = self.coords + torch.randn_like(self.coords) * 0.5 + result = gdt_ha(self.coords, noisy_coords, self.mask) + self.assertTrue(torch.all(result < 1.0)) + self.assertTrue(torch.all(result > 0.0)) + + def test_metrics_with_increasing_noise(self): + noise_levels = [0.1, 0.5, 1.0, 2.0, 5.0] + for noise in noise_levels: + noisy_coords = self.coords + torch.randn_like(self.coords) * noise + gdt_ts_result = gdt_ts(self.coords, noisy_coords, self.mask) + gdt_ha_result = gdt_ha(self.coords, noisy_coords, self.mask) + + print(f"Noise level: {noise}") + print(f"GDT-TS: {gdt_ts_result.mean().item():.4f}") + print(f"GDT-HA: {gdt_ha_result.mean().item():.4f}") + print() + + def test_metrics_with_random_perturbations(self): + def perturb_structure(coords, mask, fraction=0.1, max_displacement=2.0): + perturbed_coords = coords.clone() + num_residues = mask.sum(dim=1).int() + for i in range(coords.shape[0]): + num_to_perturb = int(fraction * num_residues[i].item()) + indices_to_perturb = random.sample(range(num_residues[i].item()), num_to_perturb) + + for idx in indices_to_perturb: + displacement = torch.randn(3) * max_displacement + perturbed_coords[i, idx] += displacement + + return perturbed_coords + + fractions = [0.1, 0.2, 0.5, 0.8] + for fraction in fractions: + perturbed_coords = perturb_structure(self.coords, self.mask, fraction) + gdt_ts_result = gdt_ts(self.coords, perturbed_coords, self.mask) + gdt_ha_result = gdt_ha(self.coords, perturbed_coords, self.mask) + + print(f"Fraction perturbed: {fraction}") + print(f"GDT-TS: {gdt_ts_result.mean().item():.4f}") + print(f"GDT-HA: {gdt_ha_result.mean().item():.4f}") + print() + + +if __name__ == '__main__': + unittest.main() \ No newline at end of file From b8549890d03da8621cb062d93e3789e7dadc128d Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:17:38 -0700 Subject: [PATCH 03/16] fix configs and improved checkpointing --- configs/loss/alphafold3_loss.yaml | 29 ----- configs/loss/proteus_loss.yaml | 9 -- configs/model/alphafold3.yaml | 6 +- configs/model/big-proteus.yaml | 6 +- configs/model/loss/alphafold3_loss.yaml | 28 +++++ configs/model/loss/proteus_loss.yaml | 8 ++ configs/model/mini-alphafold3.yaml | 6 +- configs/model/optimizer/adam.yaml | 9 ++ configs/model/optimizer/adamw.yaml | 6 + configs/model/optimizer/fused_adam.yaml | 5 + configs/model/proteus.yaml | 6 +- configs/model/scheduler/alphafold3_lr.yaml | 12 ++ configs/optimizer/adam.yaml | 10 -- configs/optimizer/adamw.yaml | 7 -- configs/optimizer/fused_adam.yaml | 6 - configs/scheduler/alphafold3_lr.yaml | 12 -- src/models/diffusion_conditioning.py | 17 +-- src/models/embedders.py | 25 +---- src/models/msa_module.py | 6 +- src/utils/checkpointing.py | 122 +++++++++------------ 20 files changed, 142 insertions(+), 193 deletions(-) delete mode 100644 configs/loss/alphafold3_loss.yaml delete mode 100644 configs/loss/proteus_loss.yaml create mode 100644 configs/model/loss/alphafold3_loss.yaml create mode 100644 configs/model/loss/proteus_loss.yaml create mode 100644 configs/model/optimizer/adam.yaml create mode 100644 configs/model/optimizer/adamw.yaml create mode 100644 configs/model/optimizer/fused_adam.yaml create mode 100644 configs/model/scheduler/alphafold3_lr.yaml delete mode 100644 configs/optimizer/adam.yaml delete mode 100644 configs/optimizer/adamw.yaml delete mode 100644 configs/optimizer/fused_adam.yaml delete mode 100644 configs/scheduler/alphafold3_lr.yaml diff --git a/configs/loss/alphafold3_loss.yaml b/configs/loss/alphafold3_loss.yaml deleted file mode 100644 index 286c2c4..0000000 --- a/configs/loss/alphafold3_loss.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# AlphaFold3 loss configs -loss: - mse_loss: - sd_data: 16.0 - weight: 4.0 - smooth_lddt_loss: - weight: 4.0 - epsilon: 1e-5 - - distogram: - min_bin: 0.0 - max_bin: 32.0 - no_bins: 64 - eps: 0.000006 # 1e-6 - weight: 0.03 - - experimentally_resolved: - eps: 0.00000001 # 1e-8, - # min_resolution: 0.1, - # max_resolution: 3.0, - weight: 0.0004 - - plddt_loss: - min_resolution: 0.1 - max_resolution: 3.0 - cutoff: 15.0 - no_bins": 50 - eps: 0.0000000001 # 1e-10, - weight: 0.0004 \ No newline at end of file diff --git a/configs/loss/proteus_loss.yaml b/configs/loss/proteus_loss.yaml deleted file mode 100644 index d318f25..0000000 --- a/configs/loss/proteus_loss.yaml +++ /dev/null @@ -1,9 +0,0 @@ - -# Loss configs -loss: - mse_loss: - sd_data: 16.0 - weight: 4.0 - smooth_lddt_loss: - weight: 4.0 - epsilon: 1e-5 diff --git a/configs/model/alphafold3.yaml b/configs/model/alphafold3.yaml index b90cd1c..b5a57c9 100644 --- a/configs/model/alphafold3.yaml +++ b/configs/model/alphafold3.yaml @@ -1,8 +1,8 @@ # AlphaFold3 configs defaults: - - /optimizer/fused_adam # The leading slash indicates that the path is relative to the config root directory. - - /scheduler/alphafold_lr - - /loss/alphafold3_loss + - optimizer: fused_adam + - scheduler: alphafold_lr + - loss: alphafold3_loss c_token: 384 # the token representation dim diff --git a/configs/model/big-proteus.yaml b/configs/model/big-proteus.yaml index b3390f5..fa39e27 100644 --- a/configs/model/big-proteus.yaml +++ b/configs/model/big-proteus.yaml @@ -1,9 +1,9 @@ _target_: src.models.proteus_module.ProteusLitModule defaults: - - /optimizer/fused_adam - - /scheduler/alphafold3_lr - - /loss/alphafold3_loss + - optimizer: fused_adam + - scheduler: alphafold3_lr + - loss: alphafold3_loss model: _target_: src.models.proteus_module.Proteus diff --git a/configs/model/loss/alphafold3_loss.yaml b/configs/model/loss/alphafold3_loss.yaml new file mode 100644 index 0000000..96ff2ea --- /dev/null +++ b/configs/model/loss/alphafold3_loss.yaml @@ -0,0 +1,28 @@ +# AlphaFold3 loss configs +mse_loss: + sd_data: 16.0 + weight: 4.0 +smooth_lddt_loss: + weight: 4.0 + epsilon: 1e-5 + +distogram: + min_bin: 0.0 + max_bin: 32.0 + no_bins: 64 + eps: 0.000006 # 1e-6 + weight: 0.03 + +experimentally_resolved: + eps: 0.00000001 # 1e-8, + # min_resolution: 0.1, + # max_resolution: 3.0, + weight: 0.0004 + +plddt_loss: + min_resolution: 0.1 + max_resolution: 3.0 + cutoff: 15.0 + no_bins": 50 + eps: 0.0000000001 # 1e-10, + weight: 0.0004 \ No newline at end of file diff --git a/configs/model/loss/proteus_loss.yaml b/configs/model/loss/proteus_loss.yaml new file mode 100644 index 0000000..02cf84a --- /dev/null +++ b/configs/model/loss/proteus_loss.yaml @@ -0,0 +1,8 @@ + +# Loss configs +mse_loss: + sd_data: 16.0 + weight: 4.0 +smooth_lddt_loss: + weight: 4.0 + epsilon: 1e-5 diff --git a/configs/model/mini-alphafold3.yaml b/configs/model/mini-alphafold3.yaml index 7b3a645..b9ab582 100644 --- a/configs/model/mini-alphafold3.yaml +++ b/configs/model/mini-alphafold3.yaml @@ -1,8 +1,8 @@ # Mini AlphaFold3 configs defaults: - - /model/alphafold3 - - /loss/alphafold3_loss - - /scheduler/alphafold3_lr + - model: alphafold3 + - loss: alphafold3_loss + - scheduler: alphafold3_lr model: c_token: 128 # Reduced from 384 diff --git a/configs/model/optimizer/adam.yaml b/configs/model/optimizer/adam.yaml new file mode 100644 index 0000000..c8e300b --- /dev/null +++ b/configs/model/optimizer/adam.yaml @@ -0,0 +1,9 @@ +# FusedAdam optimizer +_target_: torch.optim.Adam +_partial_: true +lr: 0.0018 +betas: + - 0.9 + - 0.95 +eps: 1e-08 +weight_decay: 0.0 diff --git a/configs/model/optimizer/adamw.yaml b/configs/model/optimizer/adamw.yaml new file mode 100644 index 0000000..6f54d28 --- /dev/null +++ b/configs/model/optimizer/adamw.yaml @@ -0,0 +1,6 @@ +# AdamW optimizer +defaults: + - adam + +_target_: torch.optim.AdamW +weight_decay: 1e-5 diff --git a/configs/model/optimizer/fused_adam.yaml b/configs/model/optimizer/fused_adam.yaml new file mode 100644 index 0000000..60c4b5c --- /dev/null +++ b/configs/model/optimizer/fused_adam.yaml @@ -0,0 +1,5 @@ +# FusedAdam optimizer +defaults: + - adam + +_target_: deepspeed.ops.adam.FusedAdam diff --git a/configs/model/proteus.yaml b/configs/model/proteus.yaml index 85c32bb..82b34c6 100644 --- a/configs/model/proteus.yaml +++ b/configs/model/proteus.yaml @@ -1,9 +1,9 @@ _target_: src.models.proteus_module.ProteusLitModule defaults: - - /optimizer/fused_adam - - /scheduler/alphafold_lr - - /loss/proteus_loss + - optimizer: fused_adam + - scheduler: alphafold3_lr + - loss: proteus_loss model: _target_: src.models.proteus_module.Proteus diff --git a/configs/model/scheduler/alphafold3_lr.yaml b/configs/model/scheduler/alphafold3_lr.yaml new file mode 100644 index 0000000..9b30f9d --- /dev/null +++ b/configs/model/scheduler/alphafold3_lr.yaml @@ -0,0 +1,12 @@ +# AlphaFold3 LR scheduler + +_target_: src.utils.lr_schedulers.AlphaFoldLRScheduler +_partial_: true +last_epoch: -1 +verbose: false +base_lr: 0.0 # the starting learning rate +max_lr: 0.0018 +warmup_no_steps: 1000 +start_decay_after_n_steps: 50_000 +decay_every_n_steps: 50_000 +decay_factor: 0.95 \ No newline at end of file diff --git a/configs/optimizer/adam.yaml b/configs/optimizer/adam.yaml deleted file mode 100644 index 6e28137..0000000 --- a/configs/optimizer/adam.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# FusedAdam optimizer -optimizer: - _target_: torch.optim.Adam # - _partial_: true - lr: 0.0018 - betas: - - 0.9 - - 0.95 - eps: 1e-08 - weight_decay: 0.0 diff --git a/configs/optimizer/adamw.yaml b/configs/optimizer/adamw.yaml deleted file mode 100644 index b394bfc..0000000 --- a/configs/optimizer/adamw.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# AdamW optimizer -defaults: - - adam - -optimizer: - _target_: torch.optim.AdamW - weight_decay: 1e-5 diff --git a/configs/optimizer/fused_adam.yaml b/configs/optimizer/fused_adam.yaml deleted file mode 100644 index da64149..0000000 --- a/configs/optimizer/fused_adam.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# FusedAdam optimizer -defaults: - - adam - -optimizer: - _target_: deepspeed.ops.adam.FusedAdam diff --git a/configs/scheduler/alphafold3_lr.yaml b/configs/scheduler/alphafold3_lr.yaml deleted file mode 100644 index 8d1af4b..0000000 --- a/configs/scheduler/alphafold3_lr.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# AlphaFold3 LR scheduler -scheduler: - _target_: src.utils.lr_schedulers.AlphaFoldLRScheduler - _partial_: true - last_epoch: -1 - verbose: false - base_lr: 0.0 # the starting learning rate - max_lr: 0.0018 - warmup_no_steps: 1000 - start_decay_after_n_steps: 50_000 - decay_every_n_steps: 50_000 - decay_factor: 0.95 \ No newline at end of file diff --git a/src/models/diffusion_conditioning.py b/src/models/diffusion_conditioning.py index 31e9e7c..cbeb68c 100644 --- a/src/models/diffusion_conditioning.py +++ b/src/models/diffusion_conditioning.py @@ -8,8 +8,7 @@ from src.models.components.relative_position_encoding import RelativePositionEncoding from src.models.components.transition import Transition from typing import Dict, Tuple -from src.utils.checkpointing import get_checkpoint_fn -checkpoint = get_checkpoint_fn() +from src.utils.checkpointing import checkpoint_wrapper class FourierEmbedding(nn.Module): @@ -68,7 +67,8 @@ def __init__( ) self.single_transitions = nn.ModuleList([Transition(input_dim=c_token, n=2) for _ in range(2)]) - def _forward( + @checkpoint_wrapper + def forward( self, timesteps: Tensor, # timestep (bs, S, 1) features: Dict[str, Tensor], # input feature dict @@ -131,14 +131,3 @@ def _forward( return token_repr, pair_repr - def forward( - self, - timesteps: Tensor, # timestep (bs, S, 1) - features: Dict[str, Tensor], # input feature dict - s_inputs: Tensor, # (bs, n_tokens, c_token) - s_trunk: Tensor, # (bs, n_tokens, c_token) - z_trunk: Tensor, # (bs, n_tokens, n_tokens, c_pair) - mask: Tensor = None, # (bs, n_tokens) - ) -> Tuple[Tensor, Tensor]: - return checkpoint(self._forward, timesteps, features, s_inputs, s_trunk, z_trunk, mask) - diff --git a/src/models/embedders.py b/src/models/embedders.py index 570e19d..90256c6 100644 --- a/src/models/embedders.py +++ b/src/models/embedders.py @@ -10,9 +10,8 @@ from src.models.components.relative_position_encoding import RelativePositionEncoding from src.models.template import TemplatePairStack from src.utils.tensor_utils import add -from src.utils.checkpointing import get_checkpoint_fn +from src.utils.checkpointing import checkpoint_wrapper from src.utils.geometry.vector import Vec3Array -checkpoint = get_checkpoint_fn() class InputFeatureEmbedder(nn.Module): @@ -459,7 +458,8 @@ def __init__( self.linear_z_row = LinearNoBias(c_token, c_trunk_pair) self.relative_pos_encoder = RelativePositionEncoding(c_trunk_pair) - def _forward( + @checkpoint_wrapper + def forward( self, features: Dict[str, torch.Tensor], atom_mask: torch.Tensor = None, @@ -496,22 +496,3 @@ def _forward( z_trunk = z_trunk + self.relative_pos_encoder(features, token_mask) return per_token_features, s_trunk, z_trunk - - def forward( - self, - features: Dict[str, torch.Tensor], - atom_mask: torch.Tensor = None, - token_mask: torch.Tensor = None, - ) -> Tuple[Tensor, Tensor, Tensor]: - """Forward pass of the Proteus feature embedder. - Args: - features: - Dictionary containing the input features - atom_mask: - [*, N_atoms] mask indicating which atoms are valid (non-padding). - token_mask: - [*, N_tokens] mask indicating which tokens are valid (non-padding). - Returns: - [*, N_tokens, c_token] Embedding of the input features. - """ - return self._forward(features, atom_mask, token_mask) # checkpoint() diff --git a/src/models/msa_module.py b/src/models/msa_module.py index 9e4ed3f..e500cd0 100644 --- a/src/models/msa_module.py +++ b/src/models/msa_module.py @@ -29,8 +29,7 @@ from src.utils.tensor_utils import add, flatten_final_dims from functools import partial from typing import Dict -from src.utils.checkpointing import checkpoint_blocks, get_checkpoint_fn -checkpoint = get_checkpoint_fn() +from src.utils.checkpointing import checkpoint_blocks, checkpoint_wrapper class MSAPairWeightedAveraging(nn.Module): @@ -397,6 +396,7 @@ def block_with_cache_clear(block, *args, **kwargs): return blocks + @checkpoint_wrapper def init_msa_repr( self, feats: Dict[str, Tensor], @@ -466,7 +466,7 @@ def forward( blocks_per_ckpt = None # Initialize the MSA embedding - m = checkpoint(self.init_msa_repr, feats, s_inputs, msa_mask, inplace_safe) + m = self.init_msa_repr(feats, s_inputs, msa_mask, inplace_safe) # Run with grad checkpointing m, z = checkpoint_blocks( diff --git a/src/utils/checkpointing.py b/src/utils/checkpointing.py index 71239d5..eef1a3b 100644 --- a/src/utils/checkpointing.py +++ b/src/utils/checkpointing.py @@ -1,95 +1,79 @@ -# Copyright 2021 AlQuraishi Laboratory -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. import importlib from typing import Any, Tuple, List, Callable, Optional import torch import torch.utils.checkpoint -from functools import partial +import functools -deepspeed_is_installed = importlib.util.find_spec("deepspeed") is not None -if deepspeed_is_installed: +try: import deepspeed - -BLOCK_ARG = Any -BLOCK_ARGS = Tuple[BLOCK_ARG, ...] # List[BLOCK_ARGS] + deepspeed_is_installed = True +except ImportError: + deepspeed_is_installed = False def get_checkpoint_fn(): - deepspeed_is_configured = ( - deepspeed_is_installed and - deepspeed.checkpointing.is_configured() - ) - if deepspeed_is_configured: - checkpoint = deepspeed.checkpointing.checkpoint - else: - checkpoint = partial(torch.utils.checkpoint.checkpoint, use_reentrant=False) + if deepspeed_is_installed and deepspeed.checkpointing.is_configured(): + return deepspeed.checkpointing.checkpoint + return functools.partial(torch.utils.checkpoint.checkpoint, use_reentrant=False) + + +def checkpoint_wrapper(func: Callable) -> Callable: + """ + A decorator that wraps a function with checkpointing during training. + If not in training mode, it acts as an identity function. + """ + checkpoint = get_checkpoint_fn() - return checkpoint + @functools.wraps(func) + def wrapper(*args, **kwargs): + if torch.is_grad_enabled(): + def wrapped_func(*inner_args, **inner_kwargs): + return func(*inner_args, **inner_kwargs) + return checkpoint(wrapped_func, *args, **kwargs) + else: + return func(*args, **kwargs) + + return wrapper -@torch.jit.ignore def checkpoint_blocks( - blocks: List[Callable], - args: BLOCK_ARGS, + blocks: List[torch.nn.Module], + args: Tuple[Any, ...], blocks_per_ckpt: Optional[int], -) -> BLOCK_ARGS: +) -> Tuple[Any, ...]: """ - Chunk a list of blocks and run each chunk with activation - checkpointing. We define a "block" as a callable whose only inputs are - the outputs of the previous block. - - Implements Subsection 1.11.8 + Chunk a list of blocks and run each chunk with activation checkpointing. + Each block is a torch.nn.Module whose inputs are the outputs of the previous block. + Checkpointing is only performed if training. Args: - blocks: - List of blocks - args: - Tuple of arguments for the first block. - blocks_per_ckpt: - Size of each chunk. A higher value corresponds to fewer - checkpoints, and trades memory for speed. If None, no checkpointing - is performed. + blocks: List of torch.nn.Module blocks. + args: Tuple of arguments for the first block. + blocks_per_ckpt: Number of blocks per checkpoint. If None, no checkpointing is performed. + Returns: - The output of the final block + The output of the final block. """ - def wrap(a): - return (a,) if type(a) is not tuple else a - - def exec(b, a): - for block in b: - a = wrap(block(*a)) - return a - - def chunker(s, e): - def exec_sliced(*a): - return exec(blocks[s:e], a) - - return exec_sliced - - # Avoids mishaps when the blocks take just one argument - args = wrap(args) + def execute_blocks(block_slice, inputs): + for block in block_slice: + inputs = block(*inputs) + inputs = inputs if isinstance(inputs, tuple) else (inputs,) + return inputs if blocks_per_ckpt is None or not torch.is_grad_enabled(): - return exec(blocks, args) - elif blocks_per_ckpt < 1 or blocks_per_ckpt > len(blocks): + return execute_blocks(blocks, args) + + if blocks_per_ckpt < 1 or blocks_per_ckpt > len(blocks): raise ValueError("blocks_per_ckpt must be between 1 and len(blocks)") checkpoint = get_checkpoint_fn() - - for s in range(0, len(blocks), blocks_per_ckpt): - e = s + blocks_per_ckpt - args = checkpoint(chunker(s, e), *args) - args = wrap(args) + + for start in range(0, len(blocks), blocks_per_ckpt): + end = start + blocks_per_ckpt + args = checkpoint( + lambda *inputs: execute_blocks(blocks[start:end], inputs), + *args + ) + args = args if isinstance(args, tuple) else (args,) return args From bf3279be7460f5e6d14758676af71e7a5a2394b2 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:34:36 -0700 Subject: [PATCH 04/16] Revert to old checkpointing --- src/models/components/atom_attention.py | 2 +- src/models/components/atom_attention_naive.py | 9 +++++++ src/models/components/attention_pair_bias.py | 2 +- src/models/diffusion_conditioning.py | 24 +++++++++++++++---- src/models/diffusion_module.py | 7 +----- src/models/embedders.py | 15 +++++++++--- src/models/proteus_module.py | 4 +--- src/utils/checkpointing.py | 23 +----------------- 8 files changed, 46 insertions(+), 40 deletions(-) create mode 100644 src/models/components/atom_attention_naive.py diff --git a/src/models/components/atom_attention.py b/src/models/components/atom_attention.py index 21f0e75..a978eda 100644 --- a/src/models/components/atom_attention.py +++ b/src/models/components/atom_attention.py @@ -41,7 +41,7 @@ def extract_locals( bias_tensor: Tensor, n_queries: int = 32, n_keys: int = 128, - pad_value: Optional[float] = -1e4 + pad_value: Optional[float] = -1e8 ) -> Tensor: """Extracts biases etc. that are local in the sequence space. Also pads the local biases with large negative values to mask the gaps during attention computation. diff --git a/src/models/components/atom_attention_naive.py b/src/models/components/atom_attention_naive.py new file mode 100644 index 0000000..5df6163 --- /dev/null +++ b/src/models/components/atom_attention_naive.py @@ -0,0 +1,9 @@ +"""This is a naive implementation of the atom attention components. + We did early experiments with a PyTorch-native implementation that is supposed to use memory more efficiently, + but they did not show much benefit since attention implementations in PyTorch were much slower despite + adding considerable clutter and complexity. We fall back to the Deepspeed4Science optimized attention kernel, which reduce + the memory consumption to linear anyway. + +However, this is not recommended for large scale training. +The smart move here will be to migrate to FlexAttention once there is bias gradient support. +""" diff --git a/src/models/components/attention_pair_bias.py b/src/models/components/attention_pair_bias.py index e73b447..9337c17 100644 --- a/src/models/components/attention_pair_bias.py +++ b/src/models/components/attention_pair_bias.py @@ -111,7 +111,7 @@ def _prep_biases( # Project pair biases per head from pair representation pair_bias = self.proj_pair_bias(pair_repr) # (bs, n_tokens, n_tokens, n_heads) - pair_bias = rearrange(pair_bias, 'b n1 n2 h -> b h n1 n2') # # (bs, h, n, n) + pair_bias = rearrange(pair_bias, 'b i j h -> b h i j') # # (bs, h, n, n) pair_bias = pair_bias.unsqueeze(-4) return mask_bias, pair_bias diff --git a/src/models/diffusion_conditioning.py b/src/models/diffusion_conditioning.py index cbeb68c..e829516 100644 --- a/src/models/diffusion_conditioning.py +++ b/src/models/diffusion_conditioning.py @@ -7,8 +7,9 @@ from src.models.components.primitives import LinearNoBias from src.models.components.relative_position_encoding import RelativePositionEncoding from src.models.components.transition import Transition -from typing import Dict, Tuple -from src.utils.checkpointing import checkpoint_wrapper +from typing import Dict, Tuple, Optional +from src.utils.checkpointing import get_checkpoint_fn +checkpoint = get_checkpoint_fn() class FourierEmbedding(nn.Module): @@ -67,8 +68,7 @@ def __init__( ) self.single_transitions = nn.ModuleList([Transition(input_dim=c_token, n=2) for _ in range(2)]) - @checkpoint_wrapper - def forward( + def _forward( self, timesteps: Tensor, # timestep (bs, S, 1) features: Dict[str, Tensor], # input feature dict @@ -130,4 +130,20 @@ def forward( pair_repr = pair_repr * pair_mask return token_repr, pair_repr + + + def forward_with_checkpointing( + self, + timesteps: torch.Tensor, + features: Dict[str, torch.Tensor], + s_inputs: torch.Tensor, + s_trunk: torch.Tensor, + z_trunk: torch.Tensor, + mask: Optional[torch.Tensor] = None, + ) -> Tuple[torch.Tensor, torch.Tensor]: + """ + Forward pass with gradient checkpointing. + """ + # TODO: inelegant solution + return checkpoint(self._forward, timesteps, features, s_inputs, s_trunk, z_trunk, mask) diff --git a/src/models/diffusion_module.py b/src/models/diffusion_module.py index 0484f4b..8475b00 100644 --- a/src/models/diffusion_module.py +++ b/src/models/diffusion_module.py @@ -234,12 +234,7 @@ def forward( # Conditioning token_repr, pair_repr = self.diffusion_conditioning( - timesteps=timesteps, - features=features, - s_inputs=s_inputs, - s_trunk=s_trunk, - z_trunk=z_trunk, - mask=token_mask + timesteps, features, s_inputs, s_trunk, z_trunk, token_mask ) # Scale positions to dimensionless vectors with approximately unit variance diff --git a/src/models/embedders.py b/src/models/embedders.py index 90256c6..bf05c26 100644 --- a/src/models/embedders.py +++ b/src/models/embedders.py @@ -10,8 +10,10 @@ from src.models.components.relative_position_encoding import RelativePositionEncoding from src.models.template import TemplatePairStack from src.utils.tensor_utils import add -from src.utils.checkpointing import checkpoint_wrapper from src.utils.geometry.vector import Vec3Array +from src.utils.checkpointing import get_checkpoint_fn +checkpoint = get_checkpoint_fn() + class InputFeatureEmbedder(nn.Module): @@ -458,8 +460,7 @@ def __init__( self.linear_z_row = LinearNoBias(c_token, c_trunk_pair) self.relative_pos_encoder = RelativePositionEncoding(c_trunk_pair) - @checkpoint_wrapper - def forward( + def _forward( self, features: Dict[str, torch.Tensor], atom_mask: torch.Tensor = None, @@ -496,3 +497,11 @@ def forward( z_trunk = z_trunk + self.relative_pos_encoder(features, token_mask) return per_token_features, s_trunk, z_trunk + + def forward( + self, + features: Dict[str, torch.Tensor], + atom_mask: torch.Tensor = None, + token_mask: torch.Tensor = None, + ) -> Tuple[Tensor, Tensor, Tensor]: + return checkpoint(self._forward, features, atom_mask, token_mask) diff --git a/src/models/proteus_module.py b/src/models/proteus_module.py index 7604879..6f1f2c3 100644 --- a/src/models/proteus_module.py +++ b/src/models/proteus_module.py @@ -55,9 +55,7 @@ def forward( token_mask = features["token_mask"] # Initial Features - s_inputs, s_trunk, z_trunk = self.feature_embedder( - features, atom_mask=atom_mask, token_mask=token_mask # use_deepspeed=use_flash - ) + s_inputs, s_trunk, z_trunk = self.feature_embedder(features, atom_mask, token_mask) # Diffusion module outputs = self.diffusion_module.train_step( diff --git a/src/utils/checkpointing.py b/src/utils/checkpointing.py index eef1a3b..c19e3ed 100644 --- a/src/utils/checkpointing.py +++ b/src/utils/checkpointing.py @@ -12,28 +12,7 @@ def get_checkpoint_fn(): - if deepspeed_is_installed and deepspeed.checkpointing.is_configured(): - return deepspeed.checkpointing.checkpoint - return functools.partial(torch.utils.checkpoint.checkpoint, use_reentrant=False) - - -def checkpoint_wrapper(func: Callable) -> Callable: - """ - A decorator that wraps a function with checkpointing during training. - If not in training mode, it acts as an identity function. - """ - checkpoint = get_checkpoint_fn() - - @functools.wraps(func) - def wrapper(*args, **kwargs): - if torch.is_grad_enabled(): - def wrapped_func(*inner_args, **inner_kwargs): - return func(*inner_args, **inner_kwargs) - return checkpoint(wrapped_func, *args, **kwargs) - else: - return func(*args, **kwargs) - - return wrapper + return deepspeed.checkpointing.checkpoint def checkpoint_blocks( From 15f13be5a2fb4ef9a40f16e7c2c0ab182b41fdd4 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:42:38 -0700 Subject: [PATCH 05/16] Revert back to original checkpointing file --- src/models/diffusion_conditioning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/diffusion_conditioning.py b/src/models/diffusion_conditioning.py index e829516..730868a 100644 --- a/src/models/diffusion_conditioning.py +++ b/src/models/diffusion_conditioning.py @@ -132,7 +132,7 @@ def _forward( return token_repr, pair_repr - def forward_with_checkpointing( + def forward( self, timesteps: torch.Tensor, features: Dict[str, torch.Tensor], From 8755daeb6c04e9867cc8afd32fbcda9ea544d779 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Wed, 28 Aug 2024 00:57:41 -0700 Subject: [PATCH 06/16] Implemented naive atom attention --- beta_matrix_visualization.png | Bin 0 -> 26135 bytes src/models/components/atom_attention_naive.py | 735 ++++++++++++++++++ src/models/components/attention_pair_bias.py | 14 +- src/models/diffusion_module.py | 4 +- src/models/embedders.py | 2 +- src/utils/checkpointing.py | 76 +- tests/test_atom_attention_naive.py | 180 +++++ 7 files changed, 977 insertions(+), 34 deletions(-) create mode 100644 beta_matrix_visualization.png create mode 100644 tests/test_atom_attention_naive.py diff --git a/beta_matrix_visualization.png b/beta_matrix_visualization.png new file mode 100644 index 0000000000000000000000000000000000000000..252c13aefbe89ff781d7fa807eae9da2f8831b84 GIT binary patch literal 26135 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 literal 0 HcmV?d00001 diff --git a/src/models/components/atom_attention_naive.py b/src/models/components/atom_attention_naive.py index 5df6163..e7f8289 100644 --- a/src/models/components/atom_attention_naive.py +++ b/src/models/components/atom_attention_naive.py @@ -6,4 +6,739 @@ However, this is not recommended for large scale training. The smart move here will be to migrate to FlexAttention once there is bias gradient support. + +AtomTransformer +AtomAttentionEncoder +AtomAttentionDecoder """ +import torch +from torch import Tensor +from torch import nn +from torch.nn import functional as F +from typing import Dict, NamedTuple, Optional, Tuple +from src.models.components.primitives import AdaLN, Linear, LinearNoBias, Attention +from src.models.components.attention_pair_bias import AttentionPairBias +from torch.nn import LayerNorm +from src.models.components.transition import ConditionedTransitionBlock +from functools import lru_cache, partial +from src.utils.checkpointing import checkpoint_blocks, get_checkpoint_fn +checkpoint = get_checkpoint_fn() + + +class AtomTransformerBlock(nn.Module): + def __init__( + self, + c_atom: int, + c_atompair: int = 16, + no_heads: int = 8, + dropout=0.0, + n_queries: int = 32, + n_keys: int = 128, + inf: float = 1e8 + ): + """Initialize a block within AtomTransformer module. + Args: + c_atom: + Total dimension of the model. + c_atompair: + The number of channels for the atom pair representation. Defaults to 16. + no_heads: + Number of parallel attention heads. Note that c_atom will be split across no_heads + (i.e. each head will have dimension c_atom // no_heads). + dropout: + Dropout probability on attn_output_weights. Default: 0.0 (no dropout). + n_queries: + The size of the atom window. Defaults to 32. + n_keys: + Number of atoms each atom attends to in local sequence space. Defaults to 128. + """ + super().__init__() + self.attention = AttentionPairBias( + dim=c_atom, + c_pair=c_atompair, + no_heads=no_heads, + dropout=dropout, + input_gating=True, + residual=False, + ) + self.transition = ConditionedTransitionBlock(c_atom) + self.inf = inf + self.n_queries = n_queries + self.n_keys = n_keys + + @lru_cache(maxsize=2) + def _prep_betas(self, n_atoms: int, device: torch.device) -> torch.Tensor: + """Prepare the betas that will be added to the attention scores for locality constraint.""" + # Create beta matrix filled with -inf + beta = torch.full((n_atoms, n_atoms), -self.inf, device=device) + + # Calculate centers + center_interval = 32 + centers = torch.arange(16.0, n_atoms, center_interval, device=device) + + # Vectorized operation to set valid attention regions to 0, invalid regions to -inf + for c in centers: + l_start = max(0, int(c - self.n_queries // 2)) + l_end = min(n_atoms, int(c + self.n_queries // 2)) + m_start = max(0, int(c - self.n_keys // 2)) + m_end = min(n_atoms, int(c + self.n_keys // 2)) + beta[l_start:l_end, m_start:m_end] = 0.0 + + return beta + + def forward( + self, + atom_single: Tensor, + atom_proj: Tensor, + atom_pair: Tensor, + mask: Optional[Tensor] = None, + use_deepspeed_evo_attention: bool = True + ) -> Tuple[Tensor, Tensor, Tensor]: + # Grab data about the input + *_, n_atoms, _ = atom_single.shape + + # Compute betas + betas = self._prep_betas(n_atoms, atom_single.device) # (1, n_atoms, n_atoms) + + # AttentionPairBias + atom_single = atom_single + self.attention( + atom_single, atom_proj, atom_pair, mask, betas, + use_deepspeed_evo_attention=use_deepspeed_evo_attention + ) + # ConditionedTransitionBlock + atom_single = atom_single + self.transition(atom_single, atom_proj) + return atom_single, atom_proj, atom_pair + + +class AtomTransformer(nn.Module): + """Implements the AtomTransformer""" + + def __init__( + self, + c_atom: int, + c_atompair: int = 16, + no_blocks: int = 3, + no_heads: int = 8, + dropout=0.0, + n_queries: int = 32, + n_keys: int = 128, + blocks_per_ckpt: int = 1, + clear_cache_between_blocks: bool = False, + ): + """ + Initialize the AtomTransformer module. + Args: + c_atom: + Total dimension of the model. + c_atompair: + The number of channels for the atom pair representation. Defaults to 16. + no_heads: + Number of parallel attention heads. Note that c_atom will be split across no_heads + (i.e. each head will have dimension c_atom // no_heads). + dropout: + Dropout probability on attn_output_weights. Default: 0.0 (no dropout). + n_queries: + The size of the atom window. Defaults to 32. + n_keys: + Number of atoms each atom attends to in local sequence space. Defaults to 128. + blocks_per_ckpt: + Number of AtomTransformer blocks in each activation checkpoint + clear_cache_between_blocks: + Whether to clear CUDA's GPU memory cache between blocks of the + stack. Slows down each block but can reduce fragmentation + """ + super().__init__() + self.c_atom = c_atom + self.c_atompair = c_atompair + self.no_heads = no_heads + self.no_blocks = no_blocks + self.dropout = dropout + self.n_queries = n_queries + self.n_keys = n_keys + self.blocks_per_ckpt = blocks_per_ckpt + self.clear_cache_between_blocks = clear_cache_between_blocks + + self.blocks = nn.ModuleList( + [AtomTransformerBlock(c_atom=c_atom, + no_heads=no_heads, + dropout=dropout, + n_queries=n_queries, + n_keys=n_keys, + c_atompair=c_atompair) + for _ in range(no_blocks)] + ) + + def _prep_blocks( + self, + atom_single: Tensor, + atom_proj: Tensor, + atom_pair_local: Tensor, + mask: Optional[Tensor] = None, + use_deepspeed_evo_attention: bool = True + ): + """Prepare the input tensors for each AtomTransformerBlock.""" + blocks = [ + partial( + block, + mask=mask, + use_deepspeed_evo_attention=use_deepspeed_evo_attention + ) + for block in self.blocks + ] + + # Clear CUDA's GPU memory cache between blocks + if self.clear_cache_between_blocks: + def block_with_cache_clear(block, *args, **kwargs): + torch.cuda.empty_cache() + return block(*args, **kwargs) + + blocks = [partial(block_with_cache_clear, b) for b in blocks] + + return blocks + + + def forward( + self, + atom_single: Tensor, + atom_proj: Tensor, + atom_pair_local: Tensor, + mask: Optional[Tensor] = None, + use_deepspeed_evo_attention: bool = True + ): + """ + Forward pass of the AtomTransformer module. Algorithm 23 in AlphaFold3 supplement. + Args: + atom_single: + [bs, S, n_atoms, c_atom] atom single representation where S is the samples per trunk dimension. + atom_proj: + [bs, n_atoms, c_atom] atom projection representation. + atom_pair_local: + [bs, n_atoms // n_queries, n_queries, n_keys, c_atompair] local atom pair representation tensor. + The pair representation is partitioned into n_atoms // n_queries for memory efficiency instead of + the full N_atoms x N_atoms + mask: + [bs, n_atoms] atom mask tensor where 1.0 indicates atom to be attended and + 0.0 indicates atom not to be attended. The mask is shared across the S dimension. + """ + # Expand atom_proj for proper broadcasting + atom_proj = atom_proj.unsqueeze(-3) + + blocks = self._prep_blocks( + atom_single=atom_single, + atom_proj=atom_proj, + atom_pair_local=atom_pair_local, + mask=mask, + use_deepspeed_evo_attention=use_deepspeed_evo_attention + ) + blocks_per_ckpt = self.blocks_per_ckpt + if not torch.is_grad_enabled(): + blocks_per_ckpt = None + + atom_single, atom_proj, atom_pair_local = checkpoint_blocks( + blocks, + args=(atom_single, atom_proj, atom_pair_local), + blocks_per_ckpt=blocks_per_ckpt, + ) + return atom_single + + + +def gather_token_repr( + token_repr: Tensor, # (bs, n_tokens, c_token) + tok_idx: Tensor # (bs, n_atoms) +) -> Tensor: + """ + Gather token representations based on indices from tok_idx. + + Args: + token_repr: + [*, n_tokens, c_token] token representation + tok_idx: + [*, n_atoms] token indices. + + Returns: + [batch_size, n_atoms, c_token] with gathered token embeddings. + """ + batch_size, n_atoms = tok_idx.shape + _, n_tokens, embed_dim = token_repr.shape + tok_idx = tok_idx.long() # convert to int for indexing + + # Expand tok_idx to have the same number of dimensions as token_repr + new_shape = token_repr.shape[:-2] + (n_atoms, embed_dim) + tok_idx_expanded = tok_idx.unsqueeze(-1).expand(new_shape) + + # Use torch.gather to gather embeddings from token_repr + gathered_embeddings = torch.gather( + token_repr, + dim=-2, + index=tok_idx_expanded + ) + return gathered_embeddings + + +def aggregate_atom_to_token( + atom_representation, # (bs, S, n_atoms, c_atom) + tok_idx: Tensor, # (bs, n_atoms) + n_tokens: int +) -> Tensor: + """ + Aggregates atom representations to token representations. + + Args: + atom_representation: + The atom representations tensor of shape (bs, S, n_atoms, c_atom). + tok_idx: + The index tensor of shape (bs, n_atoms) indicating which token each atom belongs to. + n_tokens (int): + The number of tokens. + Returns: + Aggregated token representations of shape (bs, S, n_tokens, c_atom). + Warning: this method is masking aware as long as tok_idx does not encode a mapping like + masked_atom -> legitimate_token + """ + bs, S, n_atoms, c_atom = atom_representation.shape + tok_idx = tok_idx.long() # convert to int for indexing + + # Initialize the token representation tensor with zeros + token_representation = torch.zeros((bs, S, n_tokens, c_atom), + device=atom_representation.device, + dtype=atom_representation.dtype) + + # Expand tok_idx to make it compatible for scattering with atom_representation + tok_idx_expanded = tok_idx[:, None, :, None].expand(-1, S, -1, c_atom) # (bs, S, n_atoms, c_atom) + + # Aggregate atom representations into token representations + token_representation = torch.scatter_reduce( + token_representation, + dim=-2, + index=tok_idx_expanded, + src=atom_representation, + reduce='mean', + include_self=False + ) + return token_representation + + +def map_token_pairs_to_atom_pairs( + token_pairs: torch.Tensor, # (bs, n_tokens, c_pair) + tok_idx: torch.Tensor # (bs, n_atoms) +) -> torch.Tensor: + """Given token pairs and token indices, map token pairs to atom pairs. + Args: + token_pairs (torch.Tensor): + Tensor of shape (bs, n_tokens, n_tokens, c_pair). + tok_idx (torch.Tensor): + Tensor of shape (bs, n_atoms) containing token indices per atom. + Returns: + torch.Tensor: Tensor of shape (bs, n_atoms, n_atoms, c_pair) containing atom pair embeddings + derived from token pair embeddings. For each atom pair (l, m), the corresponding token pair's + embeddings are extracted. + """ + bs, n_atoms = tok_idx.shape + _, n_tokens, _, c_pair = token_pairs.shape + + # Expand tok_idx for efficient gather operation + tok_idx_l = tok_idx.unsqueeze(2).expand(-1, -1, n_atoms) + tok_idx_m = tok_idx.unsqueeze(1).expand(-1, n_atoms, -1) + batch_index = torch.arange(bs, device=token_pairs.device).reshape(bs, 1, 1) + + # Gather token pair embeddings using advanced indexing + atom_pairs = token_pairs[batch_index, tok_idx_l, tok_idx_m, :] + + return atom_pairs + + +class AtomAttentionEncoderOutput(NamedTuple): + """Structured output class for AtomAttentionEncoder.""" + token_single: torch.Tensor # (bs, n_tokens, c_token) + atom_single_skip_repr: torch.Tensor # (bs, n_atoms, c_atom) + atom_single_skip_proj: torch.Tensor # (bs, n_atoms, c_atom) + atom_pair_skip_repr: torch.Tensor # (bs, n_atoms, n_atoms c_atompair) + + +class AtomAttentionEncoder(nn.Module): + def __init__( + self, + c_token: int, + c_atom: int = 128, + c_atompair: int = 16, + c_trunk_pair: int = 16, + no_blocks: int = 3, + no_heads: int = 4, + dropout=0.0, + n_queries: int = 32, + n_keys: int = 128, + trunk_conditioning: bool = False, + clear_cache_between_blocks: bool = False + ): + """Initialize the AtomAttentionEncoder module. + Args: + c_token: + The number of channels for the token representation. + c_atom: + The number of channels for the atom representation. Defaults to 128. + c_atompair: + The number of channels for the pair representation. Defaults to 16. + c_trunk_pair: + The number of channels for the trunk pair representation. Defaults to 16. + no_blocks: + Number of blocks in AtomTransformer. Defaults to 3. + no_heads: + Number of parallel attention heads. Note that c_atom will be split across no_heads + (i.e. each head will have dimension c_atom // no_heads). + dropout: + Dropout probability on attn_output_weights. Default: 0.0 (no dropout). + n_queries: + The size of the atom window. Defaults to 32. + n_keys: + Number of atoms each atom attends to in local sequence space. Defaults to 128. + trunk_conditioning: + Whether to condition the atom single and atom-pair representation on the trunk. + Defaults to False. + clear_cache_between_blocks: + Whether to clear CUDA's GPU memory cache between blocks of the + stack. Slows down each block but can reduce fragmentation + """ + super().__init__() + self.no_blocks = no_blocks + self.c_token = c_token + self.c_atom = c_atom + self.c_atompair = c_atompair + self.c_trunk_pair = c_trunk_pair + self.no_heads = no_heads + self.dropout = dropout + self.n_queries = n_queries + self.n_keys = n_keys + self.trunk_conditioning = trunk_conditioning + self.clear_cache_between_blocks = clear_cache_between_blocks + + # Embedding per-atom metadata, concat(ref_pos, ref_charge, ref_mask, ref_element, ref_atom_name_chars) + self.linear_atom_embedding = LinearNoBias(3 + 1 + 1 + 4 + 4, c_atom) # 128, * 64 + + # Embedding offsets between atom reference positions + self.linear_atom_offsets = LinearNoBias(3, c_atompair) + self.linear_atom_distances = LinearNoBias(1, c_atompair) + + # Embedding the valid mask + self.linear_mask = LinearNoBias(1, c_atompair) + + if trunk_conditioning: + self.proj_trunk_single = nn.Sequential( + LayerNorm(c_token), + LinearNoBias(c_token, c_atom) + ) + self.proj_trunk_pair = nn.Sequential( + LayerNorm(c_trunk_pair), + LinearNoBias(c_trunk_pair, c_atompair) + ) + + self.linear_noisy_pos = LinearNoBias(3, c_atom) + + # Adding the single conditioning to the pair representation + self.linear_single_to_pair_row = LinearNoBias(c_atom, c_atompair, init='relu') + self.linear_single_to_pair_col = LinearNoBias(c_atom, c_atompair, init='relu') + + # Small MLP on the pair activations + self.pair_mlp = nn.Sequential( + nn.ReLU(), + LinearNoBias(c_atompair, c_atompair, init='relu'), + nn.ReLU(), + LinearNoBias(c_atompair, c_atompair, init='final') + ) + + # Cross attention transformer + self.atom_transformer = AtomTransformer( + c_atom=c_atom, + c_atompair=c_atompair, + no_blocks=no_blocks, + no_heads=no_heads, + dropout=dropout, + n_queries=n_queries, + n_keys=n_keys, + clear_cache_between_blocks=clear_cache_between_blocks + ) + + # Final linear + self.output_proj = nn.Sequential( + LinearNoBias(c_atom, c_token, init='relu'), + nn.ReLU() + ) + + def init_pair_repr( + self, + features: Dict[str, Tensor], + atom_cond: Tensor, + z_trunk: Optional[Tensor], + ) -> Tensor: + """Compute the pair representation for the atom transformer. + This is done in a separate function for checkpointing. The intermediate activations due to the + atom pair representations are large and can be checkpointed to reduce memory usage. + Args: + features: + Dictionary of input features. + atom_cond: + [bs, n_atoms, c_atom] The single atom conditioning from init_single_repr + z_trunk: + [bs, n_tokens, n_tokens, c_trunk] the pair representation from the trunk + Returns: + [bs, n_atoms, n_atoms, c_atompair] The pair representation + """ + # Embed offsets between atom reference positions + offsets = features['ref_pos'][..., None, :] - features['ref_pos'][..., None, :, :] # (bs, n_atoms, n_atoms, 3) + valid_mask = features['ref_space_uid'][..., :, None] == features['ref_space_uid'][..., None, :] + valid_mask = valid_mask.unsqueeze(-1).to(offsets.dtype) # convert boolean to binary where 1.0 is True, 0.0 is False + atom_pair = self.linear_atom_offsets(offsets) * valid_mask + + # Embed pairwise inverse squared distances, and the valid mask + squared_distances = offsets.pow(2).sum(dim=-1, keepdim=True) # (bs, n_atoms, n_atoms, 1) + inverse_dists = torch.reciprocal(torch.add(squared_distances, 1)) + atom_pair = atom_pair + self.linear_atom_distances(inverse_dists) * valid_mask + atom_pair = atom_pair + self.linear_mask(valid_mask) * valid_mask + + # If provided, add trunk embeddings + if self.trunk_conditioning: + atom_pair = atom_pair + map_token_pairs_to_atom_pairs( + self.proj_trunk_pair(z_trunk), + features['atom_to_token'] + ) + + # Add the combined single conditioning to the pair representation + atom_pair = self.linear_single_to_pair_row(F.relu(atom_cond[:, None, :, :])) + \ + self.linear_single_to_pair_col(F.relu(atom_cond[:, :, None, :])) + atom_pair + + # Run a small MLP on the pair activations + atom_pair = self.pair_mlp(atom_pair) + return atom_pair + + def init_single_repr( + self, + features: Dict[str, Tensor], + s_trunk: Optional[Tensor], + noisy_pos: Optional[Tensor], + ) -> Tuple[Tensor, Tensor]: + """Compute the single representation for the atom transformer. + This is done in a separate function for checkpointing. + Args: + features: + Dictionary of input features. + s_trunk: + [*, n_tokens, c_token] the token representation from the trunk + noisy_pos: + [*, S, n_atoms, 3] the noisy atom positions where S is the + samples_per_trunk dimension. + Returns: + - atom_single: + [*, S, n_atoms, c_atom] atom single representation + - atom_single_conditioning: + [*, n_atoms, c_atom] atom single conditioning representation + """ + batch_size, n_atoms, _ = features['ref_pos'].size() + + # Embed atom metadata + atom_single_conditioning = self.linear_atom_embedding( + torch.cat( + [features['ref_pos'], + features['ref_charge'].unsqueeze(-1), + features['ref_mask'].unsqueeze(-1), + features['ref_element'], + features['ref_atom_name_chars'].reshape(batch_size, n_atoms, 4)], # * 64 + dim=2 + ) + ) + # Initialize the atom single representation as the single conditioning + atom_single = atom_single_conditioning.clone() + # atom_single_conditioning -> c_l in AF3 Supplement + # atom_single -> q_l in AF3 Supplement + + # Add the samples_per_trunk dimension + atom_single = atom_single.unsqueeze(-3) # [*, 1, n_atoms, c_atom] + + # If provided, add trunk embeddings and noisy positions + if self.trunk_conditioning: + atom_single_conditioning = atom_single_conditioning + gather_token_repr( + self.proj_trunk_single(s_trunk), + features['atom_to_token'] + ) + # Add the noisy positions + atom_single = atom_single + self.linear_noisy_pos(noisy_pos) # [*, S, n_atoms, c_atom] + + return atom_single, atom_single_conditioning + + def forward( + self, + features: Dict[str, Tensor], + n_tokens: int, + s_trunk: Optional[Tensor] = None, # (bs, n_tokens, c_token) + z_trunk: Optional[Tensor] = None, # (bs, n_tokens, c_trunk_pair) + noisy_pos: Optional[Tensor] = None, # (bs, S, n_atoms, 3) + mask: Optional[Tensor] = None, # (bs, n_atoms) + use_deepspeed_evo_attention: bool = True + ) -> AtomAttentionEncoderOutput: + """Forward pass for the AtomAttentionEncoder module. + Args: + features: + Dictionary containing the input features: + "ref_pos": + [*, N_atoms, 3] atom positions in the reference conformers, with + a random rotation and translation applied. Atom positions in Angstroms. + "ref_charge": + [*, N_atoms] Charge for each atom in the reference conformer. + "ref_mask": + [*, N_atoms] Mask indicating which atom slots are used in the reference + conformer. + "ref_element": + [*, N_atoms, 128] One-hot encoding of the element atomic number for each atom + in the reference conformer, up to atomic number 128. + "ref_atom_name_chars": + [*, N_atom, 4, 64] One-hot encoding of the unique atom names in the reference + conformer. Each character is encoded as ord(c - 32), and names are padded to + length 4. + "ref_space_uid": + [*, N_atoms] Numerical encoding of the chain id and residue index associated + with this reference conformer. Each (chain id, residue index) tuple is assigned + an integer on first appearance. + "atom_to_token": + [*, N_atoms] Token index for each atom in the flat atom representation. + n_tokens: + The number of tokens that will be in the output representation. + s_trunk: + [*, N_tokens, c_token] single representation of the Pairformer trunk + z_trunk: + [*, N_tokens, N_tokens, c_pair] pair representation of the Pairformer trunk + noisy_pos: + [*, S, N_atoms, 3] Tensor containing the noisy positions. Defaults to None. + mask: + [*, N_atoms] + Returns: + A namedtuple containing the following fields: + token_single: + [*, N_tokens, c_token] single representation + atom_single_skip_repr: + [*, S, N_atoms, c_atom] atom single representation (denoted q_l in AF3 Supplement) + atom_single_skip_proj: + [*, N_atoms, c_atom] atom single projection (denoted c_l in AF3 Supplement) + atom_pair_skip_repr: + [*, N_atoms // n_queries, n_queries, n_keys, c_atompair] atom pair representation + (denoted p_lm in AF3 Supplement) + """ + # Initialize representations + atom_single, atom_single_conditioning = checkpoint(self.init_single_repr, features, s_trunk, noisy_pos) + atom_pair = checkpoint(self.init_pair_repr, features, atom_single_conditioning, z_trunk) + + # Cross attention transformer + atom_single = self.atom_transformer(atom_single, atom_single_conditioning, atom_pair, mask, use_deepspeed_evo_attention) + + # Aggregate per-atom representation to per-token representation + token_repr = aggregate_atom_to_token( + atom_representation=self.output_proj(atom_single), + tok_idx=features['atom_to_token'], + n_tokens=n_tokens + ) # (*, S, N_tokens, c_atom) + + output = AtomAttentionEncoderOutput( + token_single=token_repr, # (*, S, N_tokens, c_atom) + atom_single_skip_repr=atom_single, # (*, N_atoms, c_atom) + atom_single_skip_proj=atom_single_conditioning, # (*, N_atoms, c_atom) + atom_pair_skip_repr=atom_pair, # (bs, n_atoms, n_atoms, c_atompair) + ) + return output + + +class AtomAttentionDecoder(nn.Module): + def __init__( + self, + c_token: int, + c_atom: int = 128, + c_atompair: int = 16, + no_blocks: int = 3, + no_heads: int = 8, + dropout=0.0, + n_queries: int = 32, + n_keys: int = 128, + ): + """Initialize the AtomAttentionDecoder module. + Args: + c_token: + The number of channels for the token representation. + c_atom: + The number of channels for the atom representation. Defaults to 128. + c_atompair: + The number of channels for the atom pair representation. Defaults to 16. + no_blocks: + Number of blocks. + no_heads: + Number of parallel attention heads. Note that c_atom will be split across num_heads + (i.e. each head will have dimension c_atom // num_heads). + dropout: + Dropout probability on attn_output_weights. Default: 0.0 (no dropout). + n_queries: + The size of the atom window. Defaults to 32. + n_keys: + Number of atoms each atom attends to in local sequence space. Defaults to 128. + """ + super().__init__() + self.c_token = c_token + self.c_atom = c_atom + self.c_atompair = c_atompair + self.no_blocks = no_blocks + self.no_heads = no_heads + self.dropout = dropout + self.n_queries = n_queries + self.n_keys = n_keys + + self.atom_transformer = AtomTransformer( + c_atom=c_atom, + c_atompair=c_atompair, + no_blocks=no_blocks, + no_heads=no_heads, + dropout=dropout, + n_queries=n_queries, + n_keys=n_keys, + ) + + self.linear_atom = Linear(c_token, c_atom, init='default', bias=False) + self.linear_update = Linear(c_atom, 3, init='final', bias=False) + self.layer_norm = nn.LayerNorm(c_atom) + + def forward( + self, + token_repr, # (bs, n_tokens, c_token) + atom_single_skip_repr, # (bs, n_atoms, c_atom) + atom_single_skip_proj, # (bs, n_atoms, c_atom) + atom_pair_skip_repr, # (bs, n_atoms, n_atoms, c_atom) + tok_idx, # (bs, n_atoms) + mask: Optional[Tensor] = None, # (bs, n_atoms) + use_deepspeed_evo_attention: bool = True + ): + """ + AtomAttentionDecoder. Algorithm 6 in AlphaFold3 supplement. + Args: + token_repr: + Per-token activations. Shape (bs, n_tokens, c_atom). + atom_single_skip_repr: + Per-atom activations added as the skip connection. Shape (bs, n_atoms, c_atom). + atom_single_skip_proj: + Per-atom activations provided to AtomTransformer. + atom_pair_skip_repr: + Pair activations provided to AtomTransformer. Shape (bs, n_atoms, n_atoms, c_atom). + tok_idx: + Token indices that encode which token each atom belongs to. Shape (bs, n_atoms). + mask: + Mask for the atom transformer. Shape (bs, n_atoms). + Returns: + a tensor of per-atom coordinate updates. Shape (bs, n_atoms, 3). + """ + # Broadcast per-token activations to per-atom activations and add the skip connection + bs, S, n_tokens, c_atom = token_repr.shape + atom_single = self.linear_atom( # vectorize to pretend S is the batch dimension for the gather op + torch.vmap(gather_token_repr)(token_repr, tok_idx.unsqueeze(-2).expand(-1, S, -1)) + ) + atom_single = atom_single + atom_single_skip_repr # (bs, S, n_atoms, c_atom) + + # Cross-attention transformer + atom_single_repr = self.atom_transformer(atom_single, atom_single_skip_proj, atom_pair_skip_repr, mask, use_deepspeed_evo_attention) + + # Map to positions update + r_atom_update = self.linear_update(self.layer_norm(atom_single_repr)) + return r_atom_update + diff --git a/src/models/components/attention_pair_bias.py b/src/models/components/attention_pair_bias.py index 9337c17..1049981 100644 --- a/src/models/components/attention_pair_bias.py +++ b/src/models/components/attention_pair_bias.py @@ -121,6 +121,7 @@ def forward( single_proj: Optional[torch.Tensor] = None, # (*, N, c_s) pair_repr: torch.Tensor = None, # (*, N, N, c_z) mask: Optional[torch.Tensor] = None, # (*, N) + betas: Optional[torch.Tensor] = None, # (*, N, N) use_deepspeed_evo_attention: bool = False, ) -> torch.Tensor: """Full self-attention at the token-level with pair bias. @@ -140,9 +141,11 @@ def forward( single_proj: [*, S, N, c_s] or [*, 1, N, c_s] single projection pair_repr: - [*, N, c_z] pair representation + [*, N, N, c_z] pair representation mask: [*, N] attention mask where 1.0 indicates valid token, 0.0 indicates invalid token. + betas: + [*, N, N] betas to add to the pair bias. use_deepspeed_evo_attention: Whether to use deepspeed attention or not. """ @@ -156,6 +159,11 @@ def forward( # Compute the biases mask_bias, pair_bias = self._prep_biases(single_repr, pair_repr, mask) + # Add betas to pair bias (used in naive AtomTransformer) + if betas is not None: + betas = betas[..., None, None, :, :] # (bs, 1, 1, n_tokens, n_tokens) + pair_bias = pair_bias + betas + # Attention output = self.attention( q_x=a, @@ -164,6 +172,10 @@ def forward( use_deepspeed_evo_attention=use_deepspeed_evo_attention ) # (bs, S, n_tokens, c_atom) + # Mask the output + if mask is not None: + output = output * mask.unsqueeze(-2).unsqueeze(-1) + # Output projection (from adaLN-Zero) if self.input_gating: output = F.sigmoid(self.output_proj_linear(single_proj)) * output diff --git a/src/models/diffusion_module.py b/src/models/diffusion_module.py index 8475b00..322f32c 100644 --- a/src/models/diffusion_module.py +++ b/src/models/diffusion_module.py @@ -15,7 +15,7 @@ from typing import Dict, Tuple from src.models.diffusion_conditioning import DiffusionConditioning from src.models.diffusion_transformer import DiffusionTransformer -from src.models.components.atom_attention import AtomAttentionEncoder, AtomAttentionDecoder +from src.models.components.atom_attention_naive import AtomAttentionEncoder, AtomAttentionDecoder from src.models.components.primitives import LinearNoBias from src.utils.geometry.vector import Vec3Array from src.diffusion.augmentation import centre_random_augmentation @@ -248,6 +248,7 @@ def forward( z_trunk=z_trunk, noisy_pos=r_noisy, mask=atom_mask, + use_deepspeed_evo_attention=use_deepspeed_evo_attention ) # Full self-attention on token level @@ -270,6 +271,7 @@ def forward( atom_pair_skip_repr=atom_encoder_output.atom_pair_skip_repr, # (bs, n_atoms, n_atoms, c_atom) tok_idx=features["atom_to_token"], # (bs, n_atoms) mask=atom_mask, # (bs, n_atoms) + use_deepspeed_evo_attention=use_deepspeed_evo_attention ) # (bs, S, n_atoms, 3) # Rescale updates to positions and combine with input positions diff --git a/src/models/embedders.py b/src/models/embedders.py index bf05c26..c389901 100644 --- a/src/models/embedders.py +++ b/src/models/embedders.py @@ -4,7 +4,7 @@ from torch import nn from torch.nn import functional as F from torch.nn import LayerNorm -from src.models.components.atom_attention import AtomAttentionEncoder +from src.models.components.atom_attention_naive import AtomAttentionEncoder from typing import Dict, NamedTuple, Tuple, Optional from src.models.components.primitives import LinearNoBias, Linear from src.models.components.relative_position_encoding import RelativePositionEncoding diff --git a/src/utils/checkpointing.py b/src/utils/checkpointing.py index c19e3ed..a0b59cb 100644 --- a/src/utils/checkpointing.py +++ b/src/utils/checkpointing.py @@ -10,49 +10,63 @@ except ImportError: deepspeed_is_installed = False +BLOCK_ARG = Any +BLOCK_ARGS = Tuple[BLOCK_ARG, ...] # List[BLOCK_ARGS] def get_checkpoint_fn(): - return deepspeed.checkpointing.checkpoint - + return deepspeed.checkpointing.checkpoint # torch.utils.checkpoint.checkpoint def checkpoint_blocks( - blocks: List[torch.nn.Module], - args: Tuple[Any, ...], + blocks: List[Callable], + args: BLOCK_ARGS, blocks_per_ckpt: Optional[int], -) -> Tuple[Any, ...]: +) -> BLOCK_ARGS: """ - Chunk a list of blocks and run each chunk with activation checkpointing. - Each block is a torch.nn.Module whose inputs are the outputs of the previous block. - Checkpointing is only performed if training. + Chunk a list of blocks and run each chunk with activation + checkpointing. We define a "block" as a callable whose only inputs are + the outputs of the previous block. - Args: - blocks: List of torch.nn.Module blocks. - args: Tuple of arguments for the first block. - blocks_per_ckpt: Number of blocks per checkpoint. If None, no checkpointing is performed. + Implements Subsection 1.11.8 + Args: + blocks: + List of blocks + args: + Tuple of arguments for the first block. + blocks_per_ckpt: + Size of each chunk. A higher value corresponds to fewer + checkpoints, and trades memory for speed. If None, no checkpointing + is performed. Returns: - The output of the final block. + The output of the final block """ - def execute_blocks(block_slice, inputs): - for block in block_slice: - inputs = block(*inputs) - inputs = inputs if isinstance(inputs, tuple) else (inputs,) - return inputs + def wrap(a): + return (a,) if type(a) is not tuple else a - if blocks_per_ckpt is None or not torch.is_grad_enabled(): - return execute_blocks(blocks, args) + def exec(b, a): + for block in b: + a = wrap(block(*a)) + return a + + def chunker(s, e): + def exec_sliced(*a): + return exec(blocks[s:e], a) - if blocks_per_ckpt < 1 or blocks_per_ckpt > len(blocks): + return exec_sliced + + # Avoids mishaps when the blocks take just one argument + args = wrap(args) + + if blocks_per_ckpt is None or not torch.is_grad_enabled(): + return exec(blocks, args) + elif blocks_per_ckpt < 1 or blocks_per_ckpt > len(blocks): raise ValueError("blocks_per_ckpt must be between 1 and len(blocks)") checkpoint = get_checkpoint_fn() - - for start in range(0, len(blocks), blocks_per_ckpt): - end = start + blocks_per_ckpt - args = checkpoint( - lambda *inputs: execute_blocks(blocks[start:end], inputs), - *args - ) - args = args if isinstance(args, tuple) else (args,) - - return args + + for s in range(0, len(blocks), blocks_per_ckpt): + e = s + blocks_per_ckpt + args = checkpoint(chunker(s, e), *args) + args = wrap(args) + + return args \ No newline at end of file diff --git a/tests/test_atom_attention_naive.py b/tests/test_atom_attention_naive.py new file mode 100644 index 0000000..906239b --- /dev/null +++ b/tests/test_atom_attention_naive.py @@ -0,0 +1,180 @@ +import unittest +import torch +import matplotlib.pyplot as plt +import numpy as np +from torch import nn +from src.models.components.atom_attention_naive import ( + AtomAttentionEncoder, + AtomAttentionDecoder, + AtomTransformerBlock +) + + +class TestAtomAttentionEncoder(unittest.TestCase): + def setUp(self): + self.batch_size = 2 + self.n_atoms = 1536 + self.n_seq = 2 + + # Model parameters + self.n_tokens = 384 + self.c_token = 64 + self.c_atom = 128 + self.c_atompair = 16 + self.c_trunk_pair = 16 + self.no_blocks = 3 + self.no_heads = 4 + self.dropout = 0.1 + self.n_queries = 32 + self.n_keys = 128 + self.trunk_conditioning = True + self.encoder = AtomAttentionEncoder( + c_token=self.c_token, + c_atom=self.c_atom, + c_atompair=self.c_atompair, + c_trunk_pair=self.c_trunk_pair, + no_blocks=self.no_blocks, + no_heads=self.no_heads, + dropout=self.dropout, + n_queries=self.n_queries, + n_keys=self.n_keys, + trunk_conditioning=self.trunk_conditioning + ) + + def test_initialization(self): + """Test whether the module initializes with the correct properties.""" + self.assertEqual(self.encoder.c_atom, self.c_atom) + self.assertTrue(isinstance(self.encoder.linear_atom_embedding, nn.Linear)) + # Add more assertions for other properties + + def test_forward_dimensions(self): + """Test the forward pass with mock data to ensure output dimensions.""" + features = { + 'ref_pos': torch.rand(self.batch_size, self.n_atoms, 3), + 'ref_charge': torch.rand(self.batch_size, self.n_atoms), + 'ref_mask': torch.ones(self.batch_size, self.n_atoms), + 'ref_element': torch.rand(self.batch_size, self.n_atoms, 4), + 'ref_atom_name_chars': torch.randint(0, 2, (self.batch_size, self.n_atoms, 4)), + 'ref_space_uid': torch.randint(0, self.n_atoms, (self.batch_size, self.n_atoms)), + 'atom_to_token': torch.randint(0, self.n_tokens, (self.batch_size, self.n_atoms)), + } + noisy_pos = torch.rand(self.batch_size, self.n_seq, self.n_atoms, 3) + + # Pairformer outputs (adjust as per actual module expectations) + s_trunk = torch.rand(self.batch_size, self.n_tokens, self.c_token) + z_trunk = torch.rand(self.batch_size, self.n_tokens, self.n_tokens, self.c_trunk_pair) + mask = torch.randint(0, 2, (self.batch_size, self.n_atoms)) + + output = self.encoder( + features=features, + n_tokens=self.n_tokens, + s_trunk=s_trunk, + z_trunk=z_trunk, + noisy_pos=noisy_pos, + mask=mask, + ) + self.assertEqual(output.token_single.shape, (self.batch_size, self.n_seq, self.n_tokens, self.c_token)) + self.assertEqual(output.atom_single_skip_repr.shape, (self.batch_size, self.n_seq, self.n_atoms, self.c_atom)) + self.assertEqual(output.atom_single_skip_proj.shape, (self.batch_size, self.n_atoms, self.c_atom)) + self.assertEqual(output.atom_pair_skip_repr.shape, (self.batch_size, + self.n_atoms, + self.n_atoms, + self.c_atompair)) + + +class TestAtomAttentionDecoder(unittest.TestCase): + def setUp(self): + self.c_atompair = 16 + self.c_atom = 128 + self.c_token = 64 + self.decoder = AtomAttentionDecoder( + c_token=self.c_token, + no_blocks=2, + no_heads=4, + dropout=0.1, + n_queries=32, + n_keys=128, + c_atom=self.c_atom, + c_atompair=self.c_atompair, + ) + self.bs = 3 # Batch size + self.n_tokens = 384 + self.n_atoms = 1024 + self.n_queries = 32 + self.n_keys = 128 + self.n_seq = 2 + + def test_forward_dimensions(self): + """Test the output dimensions from the forward pass.""" + token_repr = torch.randn(self.bs, self.n_seq, self.n_tokens, self.decoder.c_token) + atom_single_skip_repr = torch.randn(self.bs, self.n_seq, self.n_atoms, self.decoder.c_atom) + atom_single_skip_proj = torch.randn(self.bs, self.n_atoms, self.decoder.c_atom) + atom_pair_skip_repr = torch.randn( + (self.bs, self.n_atoms, self.n_atoms, self.c_atompair) + ) + tok_idx = torch.randint(0, self.n_tokens, (self.bs, self.n_atoms)) + mask = torch.randint(0, 2, (self.bs, self.n_atoms)) + + output = self.decoder( + token_repr, + atom_single_skip_repr, + atom_single_skip_proj, + atom_pair_skip_repr, + tok_idx, + mask, + ) + + self.assertEqual(output.shape, (self.bs, self.n_seq, self.n_atoms, 3)) + + +def test_prep_betas_visualization(): + # Set up parameters + n_atoms = 1024 + device = torch.device("cpu") # Use CPU for this test + + # Create an instance of AtomTransformerBlock + block = AtomTransformerBlock(c_atom=64) # Use default values for other parameters + + # Get the beta matrix + beta = block._prep_betas(n_atoms, device) + + # Convert to numpy for visualization + beta_np = beta.numpy() + + # Create a mask for 0 and -inf values + mask_zero = (beta_np == 0) + mask_inf = np.isinf(beta_np) + + # Create a custom colormap + cmap = plt.cm.colors.ListedColormap(['red', 'blue']) + bounds = [0, 0.5, 1] + norm = plt.cm.colors.BoundaryNorm(bounds, cmap.N) + + # Create the plot + fig, ax = plt.subplots(figsize=(10, 10)) + im = ax.imshow(mask_zero.astype(int), cmap=cmap, norm=norm, interpolation='nearest') + + # Add colorbar + cbar = ax.figure.colorbar(im, ax=ax) + cbar.set_ticks([0.25, 0.75]) + cbar.set_ticklabels(['-inf', '0']) + + # Set title and labels + ax.set_title(f"Beta Matrix Visualization (N_tokens={n_atoms})") + ax.set_xlabel("Column Index") + ax.set_ylabel("Row Index") + + # Save the plot + plt.savefig("beta_matrix_visualization.png") + plt.close() + + # Print some statistics + print(f"Total elements: {n_atoms * n_atoms}") + print(f"Number of 0s: {mask_zero.sum()}") + print(f"Number of -inf: {mask_inf.sum()}") + + # assert mask_zero.sum() + mask_inf.sum() == n_tokens * n_tokens, "All elements should be either 0 or -inf" + +if __name__ == "__main__": + test_prep_betas_visualization() + unittest.main() \ No newline at end of file From 2dfd8de511c76cd707bce2a4f4dc1a4fde52d04f Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Wed, 28 Aug 2024 01:00:56 -0700 Subject: [PATCH 07/16] Fix MSA module checkpointing --- src/models/msa_module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/models/msa_module.py b/src/models/msa_module.py index e500cd0..9e4ed3f 100644 --- a/src/models/msa_module.py +++ b/src/models/msa_module.py @@ -29,7 +29,8 @@ from src.utils.tensor_utils import add, flatten_final_dims from functools import partial from typing import Dict -from src.utils.checkpointing import checkpoint_blocks, checkpoint_wrapper +from src.utils.checkpointing import checkpoint_blocks, get_checkpoint_fn +checkpoint = get_checkpoint_fn() class MSAPairWeightedAveraging(nn.Module): @@ -396,7 +397,6 @@ def block_with_cache_clear(block, *args, **kwargs): return blocks - @checkpoint_wrapper def init_msa_repr( self, feats: Dict[str, Tensor], @@ -466,7 +466,7 @@ def forward( blocks_per_ckpt = None # Initialize the MSA embedding - m = self.init_msa_repr(feats, s_inputs, msa_mask, inplace_safe) + m = checkpoint(self.init_msa_repr, feats, s_inputs, msa_mask, inplace_safe) # Run with grad checkpointing m, z = checkpoint_blocks( From dc4bb872079d4027c14defc703326794431fccf3 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Wed, 28 Aug 2024 01:04:11 -0700 Subject: [PATCH 08/16] Config refactoring --- configs/model/small-alphafold3.yaml | 273 +++++++++++----------------- 1 file changed, 111 insertions(+), 162 deletions(-) diff --git a/configs/model/small-alphafold3.yaml b/configs/model/small-alphafold3.yaml index 6b5a244..e85c059 100644 --- a/configs/model/small-alphafold3.yaml +++ b/configs/model/small-alphafold3.yaml @@ -1,166 +1,115 @@ # AlphaFold3 configs -# _target_: src.models.model_wrapper.AlphaFoldWrapper -# config: -optimizer: - _target_: deepspeed.ops.adam.FusedAdam # torch.optim.Adam # - _partial_: true - lr: 0.0018 - betas: - - 0.9 - - 0.95 - eps: 1e-08 - weight_decay: 0.0 - -scheduler: - _target_: src.utils.lr_schedulers.AlphaFoldLRScheduler - _partial_: true - last_epoch: -1 - verbose: false - base_lr: 0.0 # the starting learning rate - max_lr: 0.0018 - warmup_no_steps: 1000 - start_decay_after_n_steps: 50_000 - decay_every_n_steps: 50_000 - decay_factor: 0.95 - -# Loss configs -loss: - mse_loss: - sd_data: 16.0 - weight: 4.0 - smooth_lddt_loss: - weight: 4.0 - epsilon: 1e-5 - - distogram: - min_bin: 0.0 - max_bin: 32.0 - no_bins: 64 - eps: 0.000006 # 1e-6 - weight: 0.03 - - experimentally_resolved: - eps: 0.00000001 # 1e-8, - # min_resolution: 0.1, - # max_resolution: 3.0, - weight: 0.0004 - - plddt_loss: - min_resolution: 0.1 - max_resolution: 3.0 - cutoff: 15.0 - no_bins": 50 - eps: 0.0000000001 # 1e-10, - weight: 0.0004 - - -# TODO: fix the model.model notation in interpolation -model: - c_token: 384 # the token representation dim - c_pair: 128 # the pair representation dim - c_atom: 128 # the atom representation dim - c_atompair: 16 # the atom pair representation dim - - # Pair stack parameters (used in Pairformer, MSA module, and Confidence head) - c_hidden_tri_mul: 128 # the hidden dim for the triangle multiplicative update - c_hidden_pair_attn: 32 # the hidden dim for the pair attention ${common.c_hidden_pair_attn} - no_heads_tri_attn: 4 - transition_n: 4 - pair_dropout: 0.25 - fuse_projection_weights: false - blocks_per_ckpt: 1 # number of blocks per checkpoint, if none, no checkpointing - clear_cache_between_blocks: false # whether to clear GPU memory cache between blocks - # Pairformer attention pair bias - no_heads_single_attn: 16 - - # Input Embedder - input_embedder: - c_token: ${model.model.c_token} - c_trunk_pair: ${model.model.c_pair} - c_atom: ${model.model.c_atom} - c_atompair: ${model.model.c_atompair} - - # MSA module - msa_module: - no_blocks: 4 - c_msa: 64 - c_token: ${model.model.c_token} - c_z: ${model.model.c_pair} - c_hidden: 32 - no_heads: 8 - c_hidden_tri_mul: ${model.model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.model.no_heads_tri_attn} - transition_n: ${model.model.transition_n} - pair_dropout: ${model.model.pair_dropout} - fuse_projection_weights: ${model.model.fuse_projection_weights} - clear_cache_between_blocks: ${model.model.clear_cache_between_blocks} - blocks_per_ckpt: ${model.model.blocks_per_ckpt} - inf: 1e8 - - # Template Embedder - template_embedder: - no_blocks: 2 - c_template: 64 - c_z: ${model.model.c_pair} - clear_cache_between_blocks: ${model.model.clear_cache_between_blocks} - - # PairformerStack - pairformer_stack: - c_s: ${model.model.c_token} - c_z: ${model.model.c_pair} - no_blocks: 24 - c_hidden_mul: ${model.model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.model.no_heads_tri_attn} - no_heads_single_attn: ${model.model.no_heads_single_attn} - transition_n: ${model.model.transition_n} - pair_dropout: ${model.model.pair_dropout} - fuse_projection_weights: ${model.model.fuse_projection_weights} - blocks_per_ckpt: ${model.model.blocks_per_ckpt} - clear_cache_between_blocks: false - inf: 1e8 - - # Diffusion module - diffusion_module: - c_atom: ${model.model.c_atom} - c_atompair: ${model.model.c_atompair} - c_token: ${model.model.c_token} - c_tokenpair: ${model.model.c_pair} - atom_encoder_blocks: 3 - atom_encoder_heads: 16 - dropout: 0.0 - atom_attention_n_queries: 32 - atom_attention_n_keys: 128 - atom_decoder_blocks: 3 - atom_decoder_heads: 16 - token_transformer_blocks: 12 - token_transformer_heads: 16 - sd_data: 16.0 - s_max: 160.0 - s_min: 0.0004 - p: 7.0 - clear_cache_between_blocks: ${model.model.clear_cache_between_blocks} - blocks_per_ckpt: ${model.model.blocks_per_ckpt} - - confidence_head: - c_s: 384 # ${model.c_token} - c_z: ${model.model.c_pair} - no_blocks: 4 - no_bins_pde: 64 - no_bins_plddt: 64 - no_bins_pae: 64 - c_hidden_mul: ${model.model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.model.no_heads_tri_attn} - no_heads_single_attn: ${model.model.no_heads_single_attn} - transition_n: ${model.model.transition_n} - pair_dropout: ${model.model.pair_dropout} - fuse_projection_weights: ${model.model.fuse_projection_weights} - - distogram_head: - c_z: ${model.model.c_pair} - no_bins: 64 +defaults: + - optimizer: fused_adam + - scheduler: alphafold_lr + - loss: alphafold3_loss + + +c_token: 384 # the token representation dim +c_pair: 128 # the pair representation dim +c_atom: 128 # the atom representation dim +c_atompair: 16 # the atom pair representation dim + +# Pair stack parameters (used in Pairformer, MSA module, and Confidence head) +c_hidden_tri_mul: 128 # the hidden dim for the triangle multiplicative update +c_hidden_pair_attn: 32 # the hidden dim for the pair attention ${common.c_hidden_pair_attn} +no_heads_tri_attn: 4 +transition_n: 4 +pair_dropout: 0.25 +fuse_projection_weights: false +blocks_per_ckpt: 1 # number of blocks per checkpoint, if none, no checkpointing +clear_cache_between_blocks: false # whether to clear GPU memory cache between blocks +# Pairformer attention pair bias +no_heads_single_attn: 16 + +# Input Embedder +input_embedder: + c_token: ${model.c_token} + c_trunk_pair: ${model.c_pair} + c_atom: ${model.c_atom} + c_atompair: ${model.c_atompair} + +# MSA module +msa_module: + no_blocks: 4 + c_msa: 64 + c_token: ${model.c_token} + c_z: ${model.c_pair} + c_hidden: 32 + no_heads: 8 + c_hidden_tri_mul: ${model.c_hidden_tri_mul} + c_hidden_pair_attn: ${model.c_hidden_pair_attn} + no_heads_tri_attn: ${model.no_heads_tri_attn} + transition_n: ${model.transition_n} + pair_dropout: ${model.pair_dropout} + fuse_projection_weights: ${model.fuse_projection_weights} + clear_cache_between_blocks: ${model.clear_cache_between_blocks} + blocks_per_ckpt: ${model.blocks_per_ckpt} + inf: 1e8 + +# Template Embedder +template_embedder: + no_blocks: 2 + c_template: 64 + c_z: ${model.c_pair} + clear_cache_between_blocks: ${model.clear_cache_between_blocks} + +# PairformerStack +pairformer_stack: + c_s: ${model.c_token} + c_z: ${model.c_pair} + no_blocks: 24 + c_hidden_mul: ${model.c_hidden_tri_mul} + c_hidden_pair_attn: ${model.c_hidden_pair_attn} + no_heads_tri_attn: ${model.no_heads_tri_attn} + no_heads_single_attn: ${model.no_heads_single_attn} + transition_n: ${model.transition_n} + pair_dropout: ${model.pair_dropout} + fuse_projection_weights: ${model.fuse_projection_weights} + blocks_per_ckpt: ${model.blocks_per_ckpt} + clear_cache_between_blocks: false + inf: 1e8 + +# Diffusion module +diffusion_module: + c_atom: ${model.c_atom} + c_atompair: ${model.c_atompair} + c_token: ${model.c_token} + c_tokenpair: ${model.c_pair} + atom_encoder_blocks: 3 + atom_encoder_heads: 16 + dropout: 0.0 + atom_attention_n_queries: 32 # TODO: with sliding window attention this is not used. + atom_attention_n_keys: 128 + atom_decoder_blocks: 3 + atom_decoder_heads: 16 + token_transformer_blocks: 12 + token_transformer_heads: 16 + sd_data: 16.0 + s_max: 160.0 + s_min: 0.0004 + p: 7.0 + clear_cache_between_blocks: ${model.clear_cache_between_blocks} + blocks_per_ckpt: ${model.blocks_per_ckpt} + +confidence_head: + c_s: 384 # ${model.c_token} + c_z: ${model.c_pair} + no_blocks: 4 + no_bins_pde: 64 + no_bins_plddt: 64 + no_bins_pae: 64 + c_hidden_mul: ${model.c_hidden_tri_mul} + c_hidden_pair_attn: ${model.c_hidden_pair_attn} + no_heads_tri_attn: ${model.no_heads_tri_attn} + no_heads_single_attn: ${model.no_heads_single_attn} + transition_n: ${model.transition_n} + pair_dropout: ${model.pair_dropout} + fuse_projection_weights: ${model.fuse_projection_weights} + +distogram_head: + c_z: ${model.c_pair} + no_bins: 64 # Exponential moving average decay rate ema_decay: 0.999 From 2cef8dbab55028409319c0f615087a5e8b62487c Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Wed, 28 Aug 2024 01:05:26 -0700 Subject: [PATCH 09/16] Fix scheduler typo --- configs/model/alphafold3.yaml | 2 +- configs/model/small-alphafold3.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/model/alphafold3.yaml b/configs/model/alphafold3.yaml index b5a57c9..c734c0d 100644 --- a/configs/model/alphafold3.yaml +++ b/configs/model/alphafold3.yaml @@ -1,7 +1,7 @@ # AlphaFold3 configs defaults: - optimizer: fused_adam - - scheduler: alphafold_lr + - scheduler: alphafold3_lr - loss: alphafold3_loss diff --git a/configs/model/small-alphafold3.yaml b/configs/model/small-alphafold3.yaml index e85c059..6674073 100644 --- a/configs/model/small-alphafold3.yaml +++ b/configs/model/small-alphafold3.yaml @@ -1,7 +1,7 @@ # AlphaFold3 configs defaults: - optimizer: fused_adam - - scheduler: alphafold_lr + - scheduler: alphafold3_lr - loss: alphafold3_loss From 10417ee8a5b54fce33d90ae1eda2bcdf9c27388e Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Wed, 28 Aug 2024 01:15:54 -0700 Subject: [PATCH 10/16] Fixed EMA bugs --- src/models/model_wrapper.py | 59 +++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/src/models/model_wrapper.py b/src/models/model_wrapper.py index 6754c49..324ca33 100644 --- a/src/models/model_wrapper.py +++ b/src/models/model_wrapper.py @@ -5,6 +5,7 @@ from lightning import LightningModule from lightning.pytorch.utilities import grad_norm from src.utils.tensor_utils import tensor_tree_map +from typing import Any, Dict, Optional from src.models.model import AlphaFold3 from src.utils.loss import AlphaFold3Loss from src.utils.exponential_moving_average import ExponentialMovingAverage @@ -25,7 +26,10 @@ def __init__(self, config): self.loss = AlphaFold3Loss(config.loss) - self.ema = ExponentialMovingAverage(model=self.model, decay=config.ema_decay) + self.ema = ExponentialMovingAverage( + model=self.model, decay=config.ema_decay + ) + self.cached_weights = None self.cached_weights = None self.last_lr_step = -1 @@ -101,10 +105,6 @@ def training_step(self, batch, batch_idx): ) return loss - def on_before_zero_grad(self, *args, **kwargs): - # Apply EMA to model - self.ema.update_parameters(self.model) - def validation_step(self, batch, batch_idx): batch = reshape_features(batch) # temporary @@ -202,6 +202,55 @@ def configure_optimizers(self): # norms = grad_norm(self.model, norm_type=2) # self.log_dict(norms) + def on_before_zero_grad(self, optimizer: torch.optim.Optimizer) -> None: + """ + Keeps an eye on weight norms during training. + """ + # Log weight norms + weight_norms = {} + for name, param in self.named_parameters(): + weight_norms[f"{name}_abs_mean"] = param.abs().mean().item() + self.log_dict(weight_norms) + + def on_before_optimizer_step(self, optimizer): + """Keeps an eye on gradient norms during training.""" + norms = grad_norm(self.model, norm_type=2) + self.log_dict(norms) + + def on_train_batch_end(self, outputs, batch, batch_idx): + # Update EMA after each training batch + self.ema.update(self.model) + + def on_train_batch_start(self, batch: Any, batch_idx: int): + # Fetch the EMA weights to the device + if self.ema.device != batch["residue_index"].device: + self.ema.to(batch["residue_index"].device) + + def on_validation_epoch_start(self): + # At the start of validation, load the EMA weights + if self.cached_weights is None: + # model.state_dict() contains references to model weights rather + # than copies. Therefore, we need to clone them before calling + # load_state_dict(). + clone_param = lambda t: t.detach().clone() + self.cached_weights = tensor_tree_map(clone_param, self.model.state_dict()) + self.model.load_state_dict(self.ema.params) + + def on_validation_epoch_end(self): + # Restore original model weights + if self.cached_weights is not None: + self.model.load_state_dict(self.cached_weights) + self.cached_weights = None + + def on_load_checkpoint(self, checkpoint: Dict[str, Any]): + """Lightning hook that is called when loading a checkpoint.""" + ema = checkpoint["ema"] + self.ema.load_state_dict(ema) + + def on_save_checkpoint(self, checkpoint: Dict[str, Any]): + """Lightning hook that is called when saving a checkpoint.""" + checkpoint["ema"] = self.ema.state_dict() + def resume_last_lr_step(self, lr_step): self.last_lr_step = lr_step From 729b62df58679275c0d8006566e59cc603c16146 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:05:11 -0700 Subject: [PATCH 11/16] AdamW configs and rotations for ref_pos --- configs/model/optimizer/fused_adamw.yaml | 7 +++++++ src/data/data_transforms.py | 11 +++++++++++ src/models/msa_module.py | 2 +- tests/test_data_transforms.py | 12 ++++++------ 4 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 configs/model/optimizer/fused_adamw.yaml diff --git a/configs/model/optimizer/fused_adamw.yaml b/configs/model/optimizer/fused_adamw.yaml new file mode 100644 index 0000000..740a0df --- /dev/null +++ b/configs/model/optimizer/fused_adamw.yaml @@ -0,0 +1,7 @@ +# FusedAdam optimizer +defaults: + - adam + +_target_: deepspeed.ops.adam.FusedAdam +adam_w_mode: true +weight_decay: 1e-5 \ No newline at end of file diff --git a/src/data/data_transforms.py b/src/data/data_transforms.py index b15d7e7..93be659 100644 --- a/src/data/data_transforms.py +++ b/src/data/data_transforms.py @@ -815,6 +815,17 @@ def make_atom_features(protein): repeats=num_res, dim=0 ) # (1, 4, ...) -> (num_res, 4, ...) + # Randomly rotate and translate the reference positions for each residue + if feat_name == "ref_pos": + # Generate random rotations for each residue + # Generate random rotations for each residue + random_rotations = Rot3Array.uniform_random(shape=(num_res, 1), device=per_res_atom_feat.device) + # Generate random translations for each residue + random_translations = torch.randn(num_res, 3, device=per_res_atom_feat.device) + # Apply rotations and translations + per_res_atom_feat = random_rotations.apply_to_point(Vec3Array.from_array(per_res_atom_feat)) + per_res_atom_feat = per_res_atom_feat.to_tensor() + random_translations.unsqueeze(1) + # Reshape to (num_res, 4, ...) -> (num_res * 4, ...) atom_feats[feat_name] = per_res_atom_feat # per_res_atom_feat.reshape( skip the reshape for now. # -1, *per_res_atom_feat.shape[2:] diff --git a/src/models/msa_module.py b/src/models/msa_module.py index 9e4ed3f..0dbb2ef 100644 --- a/src/models/msa_module.py +++ b/src/models/msa_module.py @@ -363,7 +363,7 @@ def __init__( # MSA featurization self.linear_msa_feat = LinearNoBias(49, c_msa) - self.proj_s_inputs = LinearNoBias(c_token, c_msa, init='final') + self.proj_s_inputs = LinearNoBias(c_token, c_msa, init='default') self.blocks_per_ckpt = blocks_per_ckpt self.clear_cache_between_blocks = clear_cache_between_blocks diff --git a/tests/test_data_transforms.py b/tests/test_data_transforms.py index 2b9c750..a5790ab 100644 --- a/tests/test_data_transforms.py +++ b/tests/test_data_transforms.py @@ -11,9 +11,9 @@ def setUp(self): def test_forward(self): atom_features = make_atom_features(self.protein) - self.assertEqual(atom_features["ref_pos"].shape, (100 * 4, 3)) - self.assertEqual(atom_features["ref_mask"].shape, (100 * 4,)) - self.assertEqual(atom_features["ref_element"].shape, (100 * 4, 4)) - self.assertEqual(atom_features["ref_charge"].shape, (100 * 4, )) - self.assertEqual(atom_features["ref_atom_name_chars"].shape, (100 * 4, 3)) - self.assertEqual(atom_features["ref_space_uid"].shape, (100 * 4, 4)) + self.assertEqual(atom_features["ref_pos"].shape, (100, 4, 3)) + self.assertEqual(atom_features["ref_mask"].shape, (100, 4,)) + self.assertEqual(atom_features["ref_element"].shape, (100, 4, 4)) + self.assertEqual(atom_features["ref_charge"].shape, (100, 4, )) + self.assertEqual(atom_features["ref_atom_name_chars"].shape, (100, 4, 4)) + self.assertEqual(atom_features["ref_space_uid"].shape, (100, 4)) From efb972c5d1937006f2754a01c5df23ebc51da592 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:17:49 -0700 Subject: [PATCH 12/16] proteus config --- configs/model/proteus.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/model/proteus.yaml b/configs/model/proteus.yaml index 82b34c6..d4156b7 100644 --- a/configs/model/proteus.yaml +++ b/configs/model/proteus.yaml @@ -1,7 +1,7 @@ _target_: src.models.proteus_module.ProteusLitModule defaults: - - optimizer: fused_adam + - optimizer: fused_adamw - scheduler: alphafold3_lr - loss: proteus_loss From 4c948028e7f5e4c8edbf240a5e6687c32faaed62 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:56:58 -0700 Subject: [PATCH 13/16] changed default config to adamw --- configs/model/alphafold3.yaml | 2 +- configs/model/small-alphafold3.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/model/alphafold3.yaml b/configs/model/alphafold3.yaml index c734c0d..a6ad7c7 100644 --- a/configs/model/alphafold3.yaml +++ b/configs/model/alphafold3.yaml @@ -1,6 +1,6 @@ # AlphaFold3 configs defaults: - - optimizer: fused_adam + - optimizer: fused_adamw - scheduler: alphafold3_lr - loss: alphafold3_loss diff --git a/configs/model/small-alphafold3.yaml b/configs/model/small-alphafold3.yaml index 6674073..b121f6f 100644 --- a/configs/model/small-alphafold3.yaml +++ b/configs/model/small-alphafold3.yaml @@ -1,6 +1,6 @@ # AlphaFold3 configs defaults: - - optimizer: fused_adam + - optimizer: fused_adamw - scheduler: alphafold3_lr - loss: alphafold3_loss From 1241af407d72c3380993cd8d8d96bd3eb7f15804 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:58:22 -0700 Subject: [PATCH 14/16] increase magnitude of random translation for ref_pos --- src/data/data_transforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/data_transforms.py b/src/data/data_transforms.py index 93be659..227b72e 100644 --- a/src/data/data_transforms.py +++ b/src/data/data_transforms.py @@ -821,7 +821,7 @@ def make_atom_features(protein): # Generate random rotations for each residue random_rotations = Rot3Array.uniform_random(shape=(num_res, 1), device=per_res_atom_feat.device) # Generate random translations for each residue - random_translations = torch.randn(num_res, 3, device=per_res_atom_feat.device) + random_translations = 16.0 * torch.randn(num_res, 3, device=per_res_atom_feat.device) # Apply rotations and translations per_res_atom_feat = random_rotations.apply_to_point(Vec3Array.from_array(per_res_atom_feat)) per_res_atom_feat = per_res_atom_feat.to_tensor() + random_translations.unsqueeze(1) From 456ae11d27b1779ac01d3279ae25829a1cd7c236 Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Thu, 29 Aug 2024 08:25:19 -0700 Subject: [PATCH 15/16] Bug fixes --- configs/model/alphafold3.yaml | 2 +- configs/model/proteus.yaml | 2 +- configs/model/small-alphafold3-copy.yaml | 260 +++++++++--------- configs/model/small-alphafold3.yaml | 2 +- src/models/components/atom_attention_naive.py | 17 +- src/models/components/transition.py | 6 +- src/models/diffusion_transformer.py | 4 +- src/models/embedders.py | 3 + src/models/msa_module.py | 7 +- src/utils/tensor_utils.py | 2 +- 10 files changed, 155 insertions(+), 150 deletions(-) diff --git a/configs/model/alphafold3.yaml b/configs/model/alphafold3.yaml index a6ad7c7..c734c0d 100644 --- a/configs/model/alphafold3.yaml +++ b/configs/model/alphafold3.yaml @@ -1,6 +1,6 @@ # AlphaFold3 configs defaults: - - optimizer: fused_adamw + - optimizer: fused_adam - scheduler: alphafold3_lr - loss: alphafold3_loss diff --git a/configs/model/proteus.yaml b/configs/model/proteus.yaml index d4156b7..82b34c6 100644 --- a/configs/model/proteus.yaml +++ b/configs/model/proteus.yaml @@ -1,7 +1,7 @@ _target_: src.models.proteus_module.ProteusLitModule defaults: - - optimizer: fused_adamw + - optimizer: fused_adam - scheduler: alphafold3_lr - loss: proteus_loss diff --git a/configs/model/small-alphafold3-copy.yaml b/configs/model/small-alphafold3-copy.yaml index 4aa35b6..267da48 100644 --- a/configs/model/small-alphafold3-copy.yaml +++ b/configs/model/small-alphafold3-copy.yaml @@ -1,29 +1,4 @@ # AlphaFold3 configs -# _target_: src.models.model_wrapper.AlphaFoldWrapper -# config: -optimizer: - _target_: torch.optim.Adam # deepspeed.ops.adam.FusedAdam - _partial_: true - lr: 0.00018 - betas: - - 0.9 - - 0.95 - eps: 1e-08 - weight_decay: 0.0 - -scheduler: - _target_: src.utils.lr_schedulers.AlphaFoldLRScheduler - _partial_: true - last_epoch: -1 - verbose: false - base_lr: 0.0 # the starting learning rate - max_lr: 0.00018 - warmup_no_steps: 1000 - start_decay_after_n_steps: 50_000 - decay_every_n_steps: 50_000 - decay_factor: 0.95 - -# Loss configs loss: mse_loss: sd_data: 16.0 @@ -53,114 +28,135 @@ loss: eps: 0.0000000001 # 1e-10, weight: 0.0004 +optimizer: + # FusedAdam optimizer + _target_: deepspeed.ops.adam.FusedAdam + adam_w_mode: true + weight_decay: 1e-5 + lr: 0.0018 + betas: + - 0.9 + - 0.95 + eps: 1e-08 -# TODO: fix the model.model notation in interpolation -model: - c_token: 384 # the token representation dim - c_pair: 128 # the pair representation dim - c_atom: 128 # the atom representation dim - c_atompair: 16 # the atom pair representation dim - - # Pair stack parameters (used in Pairformer, MSA module, and Confidence head) - c_hidden_tri_mul: 128 # the hidden dim for the triangle multiplicative update - c_hidden_pair_attn: 32 # the hidden dim for the pair attention ${common.c_hidden_pair_attn} - no_heads_tri_attn: 4 - transition_n: 4 - pair_dropout: 0.25 - fuse_projection_weights: false - blocks_per_ckpt: 1 # number of blocks per checkpoint, if none, no checkpointing - clear_cache_between_blocks: false # whether to clear GPU memory cache between blocks - # Pairformer attention pair bias - no_heads_single_attn: 16 - - # Input Embedder - input_embedder: - c_token: ${model.c_token} - c_trunk_pair: ${model.c_pair} - c_atom: ${model.c_atom} - c_atompair: ${model.c_atompair} - - # MSA module - msa_module: - no_blocks: 4 - c_msa: 64 - c_token: ${model.c_token} - c_z: ${model.c_pair} - c_hidden: 32 - no_heads: 8 - c_hidden_tri_mul: ${model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.no_heads_tri_attn} - transition_n: ${model.transition_n} - pair_dropout: ${model.pair_dropout} - fuse_projection_weights: ${model.fuse_projection_weights} - clear_cache_between_blocks: ${model.clear_cache_between_blocks} - blocks_per_ckpt: ${model.blocks_per_ckpt} - inf: 1e8 - - # Template Embedder - template_embedder: - no_blocks: 2 - c_template: 64 - c_z: ${model.c_pair} - clear_cache_between_blocks: ${model.clear_cache_between_blocks} - - # PairformerStack - pairformer_stack: - c_s: ${model.c_token} - c_z: ${model.c_pair} - no_blocks: 24 - c_hidden_mul: ${model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.no_heads_tri_attn} - no_heads_single_attn: ${model.no_heads_single_attn} - transition_n: ${model.transition_n} - pair_dropout: ${model.pair_dropout} - fuse_projection_weights: ${model.fuse_projection_weights} - blocks_per_ckpt: ${model.blocks_per_ckpt} - clear_cache_between_blocks: false - inf: 1e8 - - # Diffusion module - diffusion_module: - c_atom: ${model.c_atom} - c_atompair: ${model.c_atompair} - c_token: ${model.c_token} - c_tokenpair: ${model.c_pair} - atom_encoder_blocks: 3 - atom_encoder_heads: 16 - dropout: 0.0 - atom_attention_n_queries: 32 # TODO: with sliding window attention this is not used. - atom_attention_n_keys: 128 - atom_decoder_blocks: 3 - atom_decoder_heads: 16 - token_transformer_blocks: 12 - token_transformer_heads: 16 - sd_data: 16.0 - s_max: 160.0 - s_min: 0.0004 - p: 7.0 - clear_cache_between_blocks: ${model.clear_cache_between_blocks} - blocks_per_ckpt: ${model.blocks_per_ckpt} - - confidence_head: - c_s: 384 # ${model.c_token} - c_z: ${model.c_pair} - no_blocks: 4 - no_bins_pde: 64 - no_bins_plddt: 64 - no_bins_pae: 64 - c_hidden_mul: ${model.c_hidden_tri_mul} - c_hidden_pair_attn: ${model.c_hidden_pair_attn} - no_heads_tri_attn: ${model.no_heads_tri_attn} - no_heads_single_attn: ${model.no_heads_single_attn} - transition_n: ${model.transition_n} - pair_dropout: ${model.pair_dropout} - fuse_projection_weights: ${model.fuse_projection_weights} - - distogram_head: - c_z: ${model.c_pair} - no_bins: 64 +scheduler: + _target_: src.utils.lr_schedulers.AlphaFoldLRScheduler + _partial_: true + last_epoch: -1 + verbose: false + base_lr: 0.0 # the starting learning rate + max_lr: 0.0018 + warmup_no_steps: 1000 + start_decay_after_n_steps: 50_000 + decay_every_n_steps: 50_000 + decay_factor: 0.95 + + +c_token: 384 # the token representation dim +c_pair: 128 # the pair representation dim +c_atom: 128 # the atom representation dim +c_atompair: 16 # the atom pair representation dim + +# Pair stack parameters (used in Pairformer, MSA module, and Confidence head) +c_hidden_tri_mul: 128 # the hidden dim for the triangle multiplicative update +c_hidden_pair_attn: 32 # the hidden dim for the pair attention ${common.c_hidden_pair_attn} +no_heads_tri_attn: 4 +transition_n: 4 +pair_dropout: 0.25 +fuse_projection_weights: false +blocks_per_ckpt: 1 # number of blocks per checkpoint, if none, no checkpointing +clear_cache_between_blocks: false # whether to clear GPU memory cache between blocks +# Pairformer attention pair bias +no_heads_single_attn: 16 + +# Input Embedder +input_embedder: + c_token: ${c_token} + c_trunk_pair: ${c_pair} + c_atom: ${c_atom} + c_atompair: ${c_atompair} + +# MSA module +msa_module: + no_blocks: 4 + c_msa: 64 + c_token: ${c_token} + c_z: ${c_pair} + c_hidden: 32 + no_heads: 8 + c_hidden_tri_mul: ${c_hidden_tri_mul} + c_hidden_pair_attn: ${c_hidden_pair_attn} + no_heads_tri_attn: ${no_heads_tri_attn} + transition_n: ${transition_n} + pair_dropout: ${pair_dropout} + fuse_projection_weights: ${fuse_projection_weights} + clear_cache_between_blocks: ${clear_cache_between_blocks} + blocks_per_ckpt: ${blocks_per_ckpt} + inf: 1e8 + +# Template Embedder +template_embedder: + no_blocks: 2 + c_template: 64 + c_z: ${c_pair} + clear_cache_between_blocks: ${clear_cache_between_blocks} + +# PairformerStack +pairformer_stack: + c_s: ${c_token} + c_z: ${c_pair} + no_blocks: 24 + c_hidden_mul: ${c_hidden_tri_mul} + c_hidden_pair_attn: ${c_hidden_pair_attn} + no_heads_tri_attn: ${no_heads_tri_attn} + no_heads_single_attn: ${no_heads_single_attn} + transition_n: ${transition_n} + pair_dropout: ${pair_dropout} + fuse_projection_weights: ${fuse_projection_weights} + blocks_per_ckpt: ${blocks_per_ckpt} + clear_cache_between_blocks: false + inf: 1e8 + +# Diffusion module +diffusion_module: + c_atom: ${c_atom} + c_atompair: ${c_atompair} + c_token: ${c_token} + c_tokenpair: ${c_pair} + atom_encoder_blocks: 3 + atom_encoder_heads: 16 + dropout: 0.0 + atom_attention_n_queries: 32 # TODO: with sliding window attention this is not used. + atom_attention_n_keys: 128 + atom_decoder_blocks: 3 + atom_decoder_heads: 16 + token_transformer_blocks: 12 + token_transformer_heads: 16 + sd_data: 16.0 + s_max: 160.0 + s_min: 0.0004 + p: 7.0 + clear_cache_between_blocks: ${clear_cache_between_blocks} + blocks_per_ckpt: ${blocks_per_ckpt} + +confidence_head: + c_s: 384 # ${c_token} + c_z: ${c_pair} + no_blocks: 4 + no_bins_pde: 64 + no_bins_plddt: 64 + no_bins_pae: 64 + c_hidden_mul: ${c_hidden_tri_mul} + c_hidden_pair_attn: ${c_hidden_pair_attn} + no_heads_tri_attn: ${no_heads_tri_attn} + no_heads_single_attn: ${no_heads_single_attn} + transition_n: ${transition_n} + pair_dropout: ${pair_dropout} + fuse_projection_weights: ${fuse_projection_weights} + +distogram_head: + c_z: ${c_pair} + no_bins: 64 # Exponential moving average decay rate ema_decay: 0.999 diff --git a/configs/model/small-alphafold3.yaml b/configs/model/small-alphafold3.yaml index b121f6f..6674073 100644 --- a/configs/model/small-alphafold3.yaml +++ b/configs/model/small-alphafold3.yaml @@ -1,6 +1,6 @@ # AlphaFold3 configs defaults: - - optimizer: fused_adamw + - optimizer: fused_adam - scheduler: alphafold3_lr - loss: alphafold3_loss diff --git a/src/models/components/atom_attention_naive.py b/src/models/components/atom_attention_naive.py index e7f8289..c604572 100644 --- a/src/models/components/atom_attention_naive.py +++ b/src/models/components/atom_attention_naive.py @@ -34,6 +34,7 @@ def __init__( dropout=0.0, n_queries: int = 32, n_keys: int = 128, + trunk_conditioning: bool = False, inf: float = 1e8 ): """Initialize a block within AtomTransformer module. @@ -101,12 +102,12 @@ def forward( betas = self._prep_betas(n_atoms, atom_single.device) # (1, n_atoms, n_atoms) # AttentionPairBias - atom_single = atom_single + self.attention( + b = self.attention( atom_single, atom_proj, atom_pair, mask, betas, use_deepspeed_evo_attention=use_deepspeed_evo_attention ) # ConditionedTransitionBlock - atom_single = atom_single + self.transition(atom_single, atom_proj) + atom_single = b + self.transition(atom_single, atom_proj) return atom_single, atom_proj, atom_pair @@ -124,6 +125,7 @@ def __init__( n_keys: int = 128, blocks_per_ckpt: int = 1, clear_cache_between_blocks: bool = False, + trunk_conditioning: bool = False ): """ Initialize the AtomTransformer module. @@ -157,6 +159,7 @@ def __init__( self.n_keys = n_keys self.blocks_per_ckpt = blocks_per_ckpt self.clear_cache_between_blocks = clear_cache_between_blocks + self.trunk_conditioning = trunk_conditioning self.blocks = nn.ModuleList( [AtomTransformerBlock(c_atom=c_atom, @@ -164,7 +167,8 @@ def __init__( dropout=dropout, n_queries=n_queries, n_keys=n_keys, - c_atompair=c_atompair) + c_atompair=c_atompair, + trunk_conditioning=trunk_conditioning) for _ in range(no_blocks)] ) @@ -455,7 +459,8 @@ def __init__( dropout=dropout, n_queries=n_queries, n_keys=n_keys, - clear_cache_between_blocks=clear_cache_between_blocks + clear_cache_between_blocks=clear_cache_between_blocks, + trunk_conditioning=trunk_conditioning ) # Final linear @@ -507,7 +512,7 @@ def init_pair_repr( self.linear_single_to_pair_col(F.relu(atom_cond[:, :, None, :])) + atom_pair # Run a small MLP on the pair activations - atom_pair = self.pair_mlp(atom_pair) + atom_pair = atom_pair + self.pair_mlp(atom_pair) return atom_pair def init_single_repr( @@ -542,7 +547,7 @@ def init_single_repr( features['ref_mask'].unsqueeze(-1), features['ref_element'], features['ref_atom_name_chars'].reshape(batch_size, n_atoms, 4)], # * 64 - dim=2 + dim=-1 ) ) # Initialize the atom single representation as the single conditioning diff --git a/src/models/components/transition.py b/src/models/components/transition.py index b5cedbf..578c0f3 100644 --- a/src/models/components/transition.py +++ b/src/models/components/transition.py @@ -9,8 +9,7 @@ class Transition(nn.Module): - """A transition block for a residual update. - Warning: at initialization, the final output linear layer is initialized with zeros.""" + """A transition block for a residual update.""" def __init__(self, input_dim: int, n: int = 4): """ Args: @@ -23,7 +22,7 @@ def __init__(self, input_dim: int, n: int = 4): self.layer_norm = LayerNorm(input_dim) self.linear_1 = LinearNoBias(input_dim, n * input_dim, init='relu') self.linear_2 = LinearNoBias(input_dim, n * input_dim, init='default') - self.output_linear = LinearNoBias(input_dim * n, input_dim, init='final') + self.output_linear = LinearNoBias(input_dim * n, input_dim, init='default') def forward(self, x): x = self.layer_norm(x) @@ -48,7 +47,6 @@ def __init__(self, self.hidden_gating_linear = LinearNoBias(input_dim, n * input_dim, init='relu') self.hidden_linear = LinearNoBias(input_dim, n * input_dim, init='default') self.output_linear = Linear(input_dim * n, input_dim, init='default') - # TODO: check if this is in line with the adaLN-Zero initialization self.output_gating_linear = Linear(input_dim, input_dim, init='gating') self.output_gating_linear.bias = nn.Parameter(torch.ones(input_dim) * -2.0) # gate values will be ~0.11 diff --git a/src/models/diffusion_transformer.py b/src/models/diffusion_transformer.py index a5ee9cd..2c9091e 100644 --- a/src/models/diffusion_transformer.py +++ b/src/models/diffusion_transformer.py @@ -60,7 +60,7 @@ def forward( TODO: the single_proj and pair_repr do not actually change as a result of this function. Returning them here is a bit misleading. Also, saving them between blocks is unnecessary. """ - single_repr = single_repr + self.attention_block( + b = self.attention_block( single_repr=single_repr, single_proj=single_proj, pair_repr=pair_repr, @@ -69,7 +69,7 @@ def forward( ) single_repr = add( - single_repr, + b, self.conditioned_transition_block(single_repr, single_proj), inplace=False ) diff --git a/src/models/embedders.py b/src/models/embedders.py index c389901..e8cd705 100644 --- a/src/models/embedders.py +++ b/src/models/embedders.py @@ -22,6 +22,9 @@ class InputFeatureEmbedder(nn.Module): representing all the tokens. - Embed per-atom features - Concatenate the per-token features + TODO: during model training, this module is completely dead! + - encoder's output projection is learning + - output_ln is learning """ def __init__( diff --git a/src/models/msa_module.py b/src/models/msa_module.py index 0dbb2ef..af36afc 100644 --- a/src/models/msa_module.py +++ b/src/models/msa_module.py @@ -69,7 +69,7 @@ def __init__( ) # Output projection - self.output_proj = LinearNoBias(no_heads * c_hidden, c_msa, init='final') + self.output_proj = LinearNoBias(no_heads * c_hidden, c_msa, init='default') # final self.softmax = nn.Softmax(dim=-2) @@ -92,7 +92,6 @@ def forward( [*, N_res, N_res] pair mask Returns: [*, N_seq, N_res, C_m] updated MSA representation - TODo: use the optimized triton kernel from FastFold here! """ *_, n_seq, n_res, _ = m.shape @@ -343,6 +342,10 @@ def __init__( clear_cache_between_blocks: Whether to clear CUDA's GPU memory cache between blocks of the stack. Slows down each block but can reduce fragmentation + + TODO: MSAModule blocks 3 mysteriously dies (no parameter updates) + - msa_module msa stack dies + - outer product mean is still learning """ super(MSAModule, self).__init__() self.blocks = nn.ModuleList([ diff --git a/src/utils/tensor_utils.py b/src/utils/tensor_utils.py index c37eb9c..2553f26 100644 --- a/src/utils/tensor_utils.py +++ b/src/utils/tensor_utils.py @@ -22,7 +22,7 @@ def add(m1, m2, inplace): - # The first operation in a checkpoint can'timesteps be in-place, but it's + # The first operation in a checkpoint can't be in-place, but it's # nice to have in-place addition during inference. Thus... if not inplace: m1 = torch.add(m1, m2) From 6c7d5b034668a72cf90095084d8f193ba8ed6ecf Mon Sep 17 00:00:00 2001 From: ardagoreci <62720042+ardagoreci@users.noreply.github.com> Date: Thu, 29 Aug 2024 13:05:42 -0700 Subject: [PATCH 16/16] bug fixes --- configs/model/optimizer/fused_adamw.yaml | 2 +- configs/model/proteus.yaml | 2 +- src/models/components/atom_attention_naive.py | 28 +++++++------------ src/utils/loss.py | 6 ++-- 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/configs/model/optimizer/fused_adamw.yaml b/configs/model/optimizer/fused_adamw.yaml index 740a0df..ceb5feb 100644 --- a/configs/model/optimizer/fused_adamw.yaml +++ b/configs/model/optimizer/fused_adamw.yaml @@ -4,4 +4,4 @@ defaults: _target_: deepspeed.ops.adam.FusedAdam adam_w_mode: true -weight_decay: 1e-5 \ No newline at end of file +weight_decay: 1e-6 \ No newline at end of file diff --git a/configs/model/proteus.yaml b/configs/model/proteus.yaml index 82b34c6..d4156b7 100644 --- a/configs/model/proteus.yaml +++ b/configs/model/proteus.yaml @@ -1,7 +1,7 @@ _target_: src.models.proteus_module.ProteusLitModule defaults: - - optimizer: fused_adam + - optimizer: fused_adamw - scheduler: alphafold3_lr - loss: proteus_loss diff --git a/src/models/components/atom_attention_naive.py b/src/models/components/atom_attention_naive.py index c604572..f13ecc0 100644 --- a/src/models/components/atom_attention_naive.py +++ b/src/models/components/atom_attention_naive.py @@ -34,7 +34,6 @@ def __init__( dropout=0.0, n_queries: int = 32, n_keys: int = 128, - trunk_conditioning: bool = False, inf: float = 1e8 ): """Initialize a block within AtomTransformer module. @@ -125,7 +124,6 @@ def __init__( n_keys: int = 128, blocks_per_ckpt: int = 1, clear_cache_between_blocks: bool = False, - trunk_conditioning: bool = False ): """ Initialize the AtomTransformer module. @@ -159,7 +157,6 @@ def __init__( self.n_keys = n_keys self.blocks_per_ckpt = blocks_per_ckpt self.clear_cache_between_blocks = clear_cache_between_blocks - self.trunk_conditioning = trunk_conditioning self.blocks = nn.ModuleList( [AtomTransformerBlock(c_atom=c_atom, @@ -167,8 +164,7 @@ def __init__( dropout=dropout, n_queries=n_queries, n_keys=n_keys, - c_atompair=c_atompair, - trunk_conditioning=trunk_conditioning) + c_atompair=c_atompair) for _ in range(no_blocks)] ) @@ -176,7 +172,7 @@ def _prep_blocks( self, atom_single: Tensor, atom_proj: Tensor, - atom_pair_local: Tensor, + atom_pair: Tensor, mask: Optional[Tensor] = None, use_deepspeed_evo_attention: bool = True ): @@ -205,7 +201,7 @@ def forward( self, atom_single: Tensor, atom_proj: Tensor, - atom_pair_local: Tensor, + atom_pair: Tensor, mask: Optional[Tensor] = None, use_deepspeed_evo_attention: bool = True ): @@ -217,9 +213,7 @@ def forward( atom_proj: [bs, n_atoms, c_atom] atom projection representation. atom_pair_local: - [bs, n_atoms // n_queries, n_queries, n_keys, c_atompair] local atom pair representation tensor. - The pair representation is partitioned into n_atoms // n_queries for memory efficiency instead of - the full N_atoms x N_atoms + [bs, n_atoms, n_atoms, c_atompair] atom pair representation tensor. mask: [bs, n_atoms] atom mask tensor where 1.0 indicates atom to be attended and 0.0 indicates atom not to be attended. The mask is shared across the S dimension. @@ -230,7 +224,7 @@ def forward( blocks = self._prep_blocks( atom_single=atom_single, atom_proj=atom_proj, - atom_pair_local=atom_pair_local, + atom_pair=atom_pair, mask=mask, use_deepspeed_evo_attention=use_deepspeed_evo_attention ) @@ -238,9 +232,9 @@ def forward( if not torch.is_grad_enabled(): blocks_per_ckpt = None - atom_single, atom_proj, atom_pair_local = checkpoint_blocks( + atom_single, atom_proj, atom_pair = checkpoint_blocks( blocks, - args=(atom_single, atom_proj, atom_pair_local), + args=(atom_single, atom_proj, atom_pair), blocks_per_ckpt=blocks_per_ckpt, ) return atom_single @@ -459,8 +453,7 @@ def __init__( dropout=dropout, n_queries=n_queries, n_keys=n_keys, - clear_cache_between_blocks=clear_cache_between_blocks, - trunk_conditioning=trunk_conditioning + clear_cache_between_blocks=clear_cache_between_blocks ) # Final linear @@ -522,7 +515,6 @@ def init_single_repr( noisy_pos: Optional[Tensor], ) -> Tuple[Tensor, Tensor]: """Compute the single representation for the atom transformer. - This is done in a separate function for checkpointing. Args: features: Dictionary of input features. @@ -623,11 +615,11 @@ def forward( atom_single_skip_proj: [*, N_atoms, c_atom] atom single projection (denoted c_l in AF3 Supplement) atom_pair_skip_repr: - [*, N_atoms // n_queries, n_queries, n_keys, c_atompair] atom pair representation + [*, N_atoms, n_atoms, c_atompair] atom pair representation (denoted p_lm in AF3 Supplement) """ # Initialize representations - atom_single, atom_single_conditioning = checkpoint(self.init_single_repr, features, s_trunk, noisy_pos) + atom_single, atom_single_conditioning = self.init_single_repr(features, s_trunk, noisy_pos) atom_pair = checkpoint(self.init_pair_repr, features, atom_single_conditioning, z_trunk) # Cross attention transformer diff --git a/src/utils/loss.py b/src/utils/loss.py index 51fa345..b48f62f 100644 --- a/src/utils/loss.py +++ b/src/utils/loss.py @@ -128,13 +128,13 @@ def mse_loss( pred_atoms = Vec3Array.from_array(pred_atoms) gt_atoms = Vec3Array.from_array(gt_atoms) - # Align the gt_atoms to pred_atoms - aligned_gt_atoms = weighted_rigid_align(x=gt_atoms, x_gt=pred_atoms, weights=weights, mask=mask) + # Align the gt_atoms to pred_atoms, # TODO: add the alignment back in + aligned_gt_atoms = gt_atoms #weighted_rigid_align(x=gt_atoms, x_gt=pred_atoms, weights=weights, mask=mask) # MSE loss mse = mean_squared_error(pred_atoms, aligned_gt_atoms, weights, mask) - # Scale by (t**2 + σ**2) / (t + σ)**2 + # Scale by (t**2 + σ**2) / (t * σ)**2 scaling_factor = torch.add(timesteps ** 2, sd_data ** 2) / (torch.mul(timesteps, sd_data) ** 2 + epsilon) scaled_mse = scaling_factor.squeeze(-1) * mse # (bs,)