├── README.md ├── ag_pro └── AG_main.py ├── agbt_pro ├── __init__.py ├── eval_lm.py ├── fairseq │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── binarizer.cpython-36.pyc │ │ ├── binarizer.cpython-37.pyc │ │ ├── bleu.cpython-37.pyc │ │ ├── checkpoint_utils.cpython-37.pyc │ │ ├── distributed_utils.cpython-37.pyc │ │ ├── file_utils.cpython-37.pyc │ │ ├── hub_utils.cpython-37.pyc │ │ ├── iterative_refinement_generator.cpython-37.pyc │ │ ├── legacy_distributed_data_parallel.cpython-37.pyc │ │ ├── meters.cpython-37.pyc │ │ ├── options.cpython-37.pyc │ │ ├── pdb.cpython-37.pyc │ │ ├── progress_bar.cpython-37.pyc │ │ ├── registry.cpython-36.pyc │ │ ├── registry.cpython-37.pyc │ │ ├── search.cpython-37.pyc │ │ ├── sequence_generator.cpython-37.pyc │ │ ├── sequence_scorer.cpython-37.pyc │ │ ├── tokenizer.cpython-36.pyc │ │ ├── tokenizer.cpython-37.pyc │ │ ├── trainer.cpython-37.pyc │ │ ├── utils.cpython-36.pyc │ │ └── utils.cpython-37.pyc │ ├── binarizer.py │ ├── bleu.py │ ├── checkpoint_utils.py │ ├── clib │ │ ├── libbleu │ │ │ ├── libbleu.cpp │ │ │ └── module.cpp │ │ ├── libnat │ │ │ └── edit_dist.cpp │ │ └── libnat_cuda │ │ │ ├── binding.cpp │ │ │ ├── edit_dist.cu │ │ │ └── edit_dist.h │ ├── criterions │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-36.pyc │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── adaptive_loss.cpython-37.pyc │ │ │ ├── binary_cross_entropy.cpython-36.pyc │ │ │ ├── binary_cross_entropy.cpython-37.pyc │ │ │ ├── composite_loss.cpython-37.pyc │ │ │ ├── cross_entropy.cpython-37.pyc │ │ │ ├── fairseq_criterion.cpython-36.pyc │ │ │ ├── fairseq_criterion.cpython-37.pyc │ │ │ ├── label_smoothed_cross_entropy.cpython-37.pyc │ │ │ ├── label_smoothed_cross_entropy_with_alignment.cpython-37.pyc │ │ │ ├── legacy_masked_lm.cpython-37.pyc │ │ │ ├── masked_lm.cpython-37.pyc │ │ │ ├── nat_loss.cpython-37.pyc │ │ │ ├── sentence_prediction.cpython-37.pyc │ │ │ └── sentence_ranking.cpython-37.pyc │ │ ├── adaptive_loss.py │ │ ├── binary_cross_entropy.py │ │ ├── composite_loss.py │ │ ├── cross_entropy.py │ │ ├── fairseq_criterion.py │ │ ├── label_smoothed_cross_entropy.py │ │ ├── label_smoothed_cross_entropy_with_alignment.py │ │ ├── legacy_masked_lm.py │ │ ├── masked_lm.py │ │ ├── nat_loss.py │ │ ├── sentence_prediction.py │ │ └── sentence_ranking.py │ ├── data │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-36.pyc │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── append_token_dataset.cpython-37.pyc │ │ │ ├── backtranslation_dataset.cpython-37.pyc │ │ │ ├── base_wrapper_dataset.cpython-37.pyc │ │ │ ├── colorize_dataset.cpython-37.pyc │ │ │ ├── concat_dataset.cpython-37.pyc │ │ │ ├── concat_sentences_dataset.cpython-37.pyc │ │ │ ├── data_utils.cpython-36.pyc │ │ │ ├── data_utils.cpython-37.pyc │ │ │ ├── denoising_dataset.cpython-37.pyc │ │ │ ├── dictionary.cpython-36.pyc │ │ │ ├── dictionary.cpython-37.pyc │ │ │ ├── fairseq_dataset.cpython-36.pyc │ │ │ ├── fairseq_dataset.cpython-37.pyc │ │ │ ├── id_dataset.cpython-37.pyc │ │ │ ├── indexed_dataset.cpython-37.pyc │ │ │ ├── iterators.cpython-37.pyc │ │ │ ├── language_pair_dataset.cpython-37.pyc │ │ │ ├── list_dataset.cpython-37.pyc │ │ │ ├── lm_context_window_dataset.cpython-37.pyc │ │ │ ├── lru_cache_dataset.cpython-37.pyc │ │ │ ├── mask_tokens_dataset.cpython-37.pyc │ │ │ ├── monolingual_dataset.cpython-37.pyc │ │ │ ├── multi_corpus_sampled_dataset.cpython-37.pyc │ │ │ ├── nested_dictionary_dataset.cpython-37.pyc │ │ │ ├── noising.cpython-37.pyc │ │ │ ├── num_samples_dataset.cpython-37.pyc │ │ │ ├── numel_dataset.cpython-37.pyc │ │ │ ├── offset_tokens_dataset.cpython-37.pyc │ │ │ ├── pad_dataset.cpython-37.pyc │ │ │ ├── plasma_utils.cpython-37.pyc │ │ │ ├── prepend_dataset.cpython-37.pyc │ │ │ ├── prepend_token_dataset.cpython-37.pyc │ │ │ ├── raw_label_dataset.cpython-37.pyc │ │ │ ├── replace_dataset.cpython-37.pyc │ │ │ ├── resampling_dataset.cpython-37.pyc │ │ │ ├── roll_dataset.cpython-37.pyc │ │ │ ├── round_robin_zip_datasets.cpython-37.pyc │ │ │ ├── sharded_dataset.cpython-37.pyc │ │ │ ├── sort_dataset.cpython-37.pyc │ │ │ ├── strip_token_dataset.cpython-37.pyc │ │ │ ├── subsample_dataset.cpython-37.pyc │ │ │ ├── token_block_dataset.cpython-37.pyc │ │ │ ├── transform_eos_dataset.cpython-37.pyc │ │ │ ├── transform_eos_lang_pair_dataset.cpython-37.pyc │ │ │ └── truncate_dataset.cpython-37.pyc │ │ ├── append_token_dataset.py │ │ ├── audio │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ └── raw_audio_dataset.cpython-37.pyc │ │ │ └── raw_audio_dataset.py │ │ ├── backtranslation_dataset.py │ │ ├── base_wrapper_dataset.py │ │ ├── colorize_dataset.py │ │ ├── concat_dataset.py │ │ ├── concat_sentences_dataset.py │ │ ├── data_utils.py │ │ ├── data_utils_fast.c │ │ ├── data_utils_fast.cp37-win_amd64.pyd │ │ ├── data_utils_fast.cpython-37m-powerpc64le-linux-gnu.so │ │ ├── data_utils_fast.pyx │ │ ├── denoising_dataset.py │ │ ├── dictionary.py │ │ ├── encoders │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── fastbpe.cpython-37.pyc │ │ │ │ ├── gpt2_bpe.cpython-37.pyc │ │ │ │ ├── gpt2_bpe_utils.cpython-37.pyc │ │ │ │ ├── hf_bert_bpe.cpython-37.pyc │ │ │ │ ├── hf_smi_bpe.cpython-37.pyc │ │ │ │ ├── moses_tokenizer.cpython-37.pyc │ │ │ │ ├── nltk_tokenizer.cpython-37.pyc │ │ │ │ ├── sentencepiece_bpe.cpython-37.pyc │ │ │ │ ├── smi2_bpe.cpython-37.pyc │ │ │ │ ├── space_tokenizer.cpython-37.pyc │ │ │ │ ├── subword_nmt_bpe.cpython-37.pyc │ │ │ │ └── utils.cpython-37.pyc │ │ │ ├── fastbpe.py │ │ │ ├── gpt2_bpe.py │ │ │ ├── gpt2_bpe_utils.py │ │ │ ├── hf_bert_bpe.py │ │ │ ├── moses_tokenizer.py │ │ │ ├── nltk_tokenizer.py │ │ │ ├── sentencepiece_bpe.py │ │ │ ├── smi2_bpe.py │ │ │ ├── space_tokenizer.py │ │ │ ├── subword_nmt_bpe.py │ │ │ └── utils.py │ │ ├── fairseq_dataset.py │ │ ├── id_dataset.py │ │ ├── indexed_dataset.py │ │ ├── iterators.py │ │ ├── language_pair_dataset.py │ │ ├── legacy │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── block_pair_dataset.cpython-37.pyc │ │ │ │ ├── masked_lm_dataset.cpython-37.pyc │ │ │ │ └── masked_lm_dictionary.cpython-37.pyc │ │ │ ├── block_pair_dataset.py │ │ │ ├── masked_lm_dataset.py │ │ │ └── masked_lm_dictionary.py │ │ ├── list_dataset.py │ │ ├── lm_context_window_dataset.py │ │ ├── lru_cache_dataset.py │ │ ├── mask_tokens_dataset.py │ │ ├── monolingual_dataset.py │ │ ├── multi_corpus_sampled_dataset.py │ │ ├── nested_dictionary_dataset.py │ │ ├── noising.py │ │ ├── num_samples_dataset.py │ │ ├── numel_dataset.py │ │ ├── offset_tokens_dataset.py │ │ ├── pad_dataset.py │ │ ├── plasma_utils.py │ │ ├── prepend_dataset.py │ │ ├── prepend_token_dataset.py │ │ ├── raw_label_dataset.py │ │ ├── replace_dataset.py │ │ ├── resampling_dataset.py │ │ ├── roll_dataset.py │ │ ├── round_robin_zip_datasets.py │ │ ├── sharded_dataset.py │ │ ├── sort_dataset.py │ │ ├── strip_token_dataset.py │ │ ├── subsample_dataset.py │ │ ├── token_block_dataset.py │ │ ├── token_block_utils_fast.c │ │ ├── token_block_utils_fast.cp37-win_amd64.pyd │ │ ├── token_block_utils_fast.cpython-37m-powerpc64le-linux-gnu.so │ │ ├── token_block_utils_fast.pyx │ │ ├── transform_eos_dataset.py │ │ ├── transform_eos_lang_pair_dataset.py │ │ └── truncate_dataset.py │ ├── distributed_utils.py │ ├── file_utils.py │ ├── hub_utils.py │ ├── iterative_refinement_generator.py │ ├── legacy_distributed_data_parallel.py │ ├── libbleu.cp37-win_amd64.pyd │ ├── libbleu.cpython-37m-powerpc64le-linux-gnu.so │ ├── meters.py │ ├── models │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── cmlm_transformer.cpython-37.pyc │ │ │ ├── composite_encoder.cpython-37.pyc │ │ │ ├── distributed_fairseq_model.cpython-37.pyc │ │ │ ├── fairseq_decoder.cpython-37.pyc │ │ │ ├── fairseq_encoder.cpython-37.pyc │ │ │ ├── fairseq_incremental_decoder.cpython-37.pyc │ │ │ ├── fairseq_model.cpython-37.pyc │ │ │ ├── fconv.cpython-37.pyc │ │ │ ├── fconv_lm.cpython-37.pyc │ │ │ ├── fconv_self_att.cpython-37.pyc │ │ │ ├── insertion_transformer.cpython-37.pyc │ │ │ ├── iterative_nonautoregressive_transformer.cpython-37.pyc │ │ │ ├── levenshtein_transformer.cpython-37.pyc │ │ │ ├── lightconv.cpython-37.pyc │ │ │ ├── lightconv_lm.cpython-37.pyc │ │ │ ├── lstm.cpython-37.pyc │ │ │ ├── masked_lm.cpython-37.pyc │ │ │ ├── model_utils.cpython-37.pyc │ │ │ ├── multilingual_transformer.cpython-37.pyc │ │ │ ├── nonautoregressive_ensembles.cpython-37.pyc │ │ │ ├── nonautoregressive_transformer.cpython-37.pyc │ │ │ ├── transformer.cpython-37.pyc │ │ │ ├── transformer_from_pretrained_xlm.cpython-37.pyc │ │ │ ├── transformer_lm.cpython-37.pyc │ │ │ └── wav2vec.cpython-37.pyc │ │ ├── bart │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── hub_interface.cpython-37.pyc │ │ │ │ └── model.cpython-37.pyc │ │ │ ├── hub_interface.py │ │ │ └── model.py │ │ ├── cmlm_transformer.py │ │ ├── composite_encoder.py │ │ ├── distributed_fairseq_model.py │ │ ├── fairseq_decoder.py │ │ ├── fairseq_encoder.py │ │ ├── fairseq_incremental_decoder.py │ │ ├── fairseq_model.py │ │ ├── fconv.py │ │ ├── fconv_lm.py │ │ ├── fconv_self_att.py │ │ ├── insertion_transformer.py │ │ ├── iterative_nonautoregressive_transformer.py │ │ ├── levenshtein_transformer.py │ │ ├── lightconv.py │ │ ├── lightconv_lm.py │ │ ├── lstm.py │ │ ├── masked_lm.py │ │ ├── model_utils.py │ │ ├── multilingual_transformer.py │ │ ├── nonautoregressive_ensembles.py │ │ ├── nonautoregressive_transformer.py │ │ ├── roberta │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── alignment_utils.cpython-37.pyc │ │ │ │ ├── hub_interface.cpython-37.pyc │ │ │ │ └── model.cpython-37.pyc │ │ │ ├── alignment_utils.py │ │ │ ├── hub_interface.py │ │ │ └── model.py │ │ ├── transformer.py │ │ ├── transformer_from_pretrained_xlm.py │ │ ├── transformer_lm.py │ │ └── wav2vec.py │ ├── modules │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-36.pyc │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── adaptive_input.cpython-36.pyc │ │ │ ├── adaptive_input.cpython-37.pyc │ │ │ ├── adaptive_softmax.cpython-36.pyc │ │ │ ├── adaptive_softmax.cpython-37.pyc │ │ │ ├── beamable_mm.cpython-36.pyc │ │ │ ├── beamable_mm.cpython-37.pyc │ │ │ ├── character_token_embedder.cpython-36.pyc │ │ │ ├── character_token_embedder.cpython-37.pyc │ │ │ ├── conv_tbc.cpython-37.pyc │ │ │ ├── downsampled_multihead_attention.cpython-37.pyc │ │ │ ├── dynamic_convolution.cpython-37.pyc │ │ │ ├── gelu.cpython-37.pyc │ │ │ ├── grad_multiply.cpython-37.pyc │ │ │ ├── highway.cpython-36.pyc │ │ │ ├── highway.cpython-37.pyc │ │ │ ├── layer_norm.cpython-37.pyc │ │ │ ├── learned_positional_embedding.cpython-37.pyc │ │ │ ├── lightweight_convolution.cpython-37.pyc │ │ │ ├── linearized_convolution.cpython-37.pyc │ │ │ ├── logsumexp_moe.cpython-37.pyc │ │ │ ├── mean_pool_gating_network.cpython-37.pyc │ │ │ ├── multihead_attention.cpython-37.pyc │ │ │ ├── positional_embedding.cpython-37.pyc │ │ │ ├── scalar_bias.cpython-37.pyc │ │ │ ├── sinusoidal_positional_embedding.cpython-37.pyc │ │ │ ├── sparse_multihead_attention.cpython-37.pyc │ │ │ ├── sparse_transformer_sentence_encoder.cpython-37.pyc │ │ │ ├── sparse_transformer_sentence_encoder_layer.cpython-37.pyc │ │ │ ├── transformer_layer.cpython-37.pyc │ │ │ ├── transformer_sentence_encoder.cpython-37.pyc │ │ │ ├── transformer_sentence_encoder_layer.cpython-37.pyc │ │ │ ├── unfold.cpython-37.pyc │ │ │ └── vggblock.cpython-37.pyc │ │ ├── adaptive_input.py │ │ ├── adaptive_softmax.py │ │ ├── beamable_mm.py │ │ ├── character_token_embedder.py │ │ ├── conv_tbc.py │ │ ├── downsampled_multihead_attention.py │ │ ├── dynamic_convolution.py │ │ ├── dynamicconv_layer │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── cuda_function_gen.cpython-37.pyc │ │ │ │ ├── dynamicconv_layer.cpython-37.pyc │ │ │ │ └── setup.cpython-37.pyc │ │ │ ├── cuda_function_gen.py │ │ │ ├── dynamicconv_layer.py │ │ │ └── setup.py │ │ ├── gelu.py │ │ ├── grad_multiply.py │ │ ├── highway.py │ │ ├── layer_norm.py │ │ ├── learned_positional_embedding.py │ │ ├── lightconv_layer │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── cuda_function_gen.cpython-37.pyc │ │ │ │ ├── lightconv_layer.cpython-37.pyc │ │ │ │ └── setup.cpython-37.pyc │ │ │ ├── cuda_function_gen.py │ │ │ ├── lightconv_layer.py │ │ │ └── setup.py │ │ ├── lightweight_convolution.py │ │ ├── linearized_convolution.py │ │ ├── logsumexp_moe.py │ │ ├── mean_pool_gating_network.py │ │ ├── multihead_attention.py │ │ ├── positional_embedding.py │ │ ├── scalar_bias.py │ │ ├── sinusoidal_positional_embedding.py │ │ ├── sparse_multihead_attention.py │ │ ├── sparse_transformer_sentence_encoder.py │ │ ├── sparse_transformer_sentence_encoder_layer.py │ │ ├── transformer_layer.py │ │ ├── transformer_sentence_encoder.py │ │ ├── transformer_sentence_encoder_layer.py │ │ ├── unfold.py │ │ └── vggblock.py │ ├── optim │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── adadelta.cpython-37.pyc │ │ │ ├── adafactor.cpython-37.pyc │ │ │ ├── adagrad.cpython-37.pyc │ │ │ ├── adam.cpython-37.pyc │ │ │ ├── adamax.cpython-37.pyc │ │ │ ├── bmuf.cpython-37.pyc │ │ │ ├── fairseq_optimizer.cpython-37.pyc │ │ │ ├── fp16_optimizer.cpython-37.pyc │ │ │ ├── nag.cpython-37.pyc │ │ │ └── sgd.cpython-37.pyc │ │ ├── adadelta.py │ │ ├── adafactor.py │ │ ├── adagrad.py │ │ ├── adam.py │ │ ├── adamax.py │ │ ├── bmuf.py │ │ ├── fairseq_optimizer.py │ │ ├── fp16_optimizer.py │ │ ├── lr_scheduler │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ │ ├── __init__.cpython-37.pyc │ │ │ │ ├── cosine_lr_scheduler.cpython-37.pyc │ │ │ │ ├── fairseq_lr_scheduler.cpython-37.pyc │ │ │ │ ├── fixed_schedule.cpython-37.pyc │ │ │ │ ├── inverse_square_root_schedule.cpython-37.pyc │ │ │ │ ├── polynomial_decay_schedule.cpython-37.pyc │ │ │ │ ├── reduce_lr_on_plateau.cpython-37.pyc │ │ │ │ ├── tri_stage_lr_scheduler.cpython-37.pyc │ │ │ │ └── triangular_lr_scheduler.cpython-37.pyc │ │ │ ├── cosine_lr_scheduler.py │ │ │ ├── fairseq_lr_scheduler.py │ │ │ ├── fixed_schedule.py │ │ │ ├── inverse_square_root_schedule.py │ │ │ ├── polynomial_decay_schedule.py │ │ │ ├── reduce_lr_on_plateau.py │ │ │ ├── tri_stage_lr_scheduler.py │ │ │ └── triangular_lr_scheduler.py │ │ ├── nag.py │ │ └── sgd.py │ ├── options.py │ ├── pdb.py │ ├── progress_bar.py │ ├── registry.py │ ├── search.py │ ├── sequence_generator.py │ ├── sequence_scorer.py │ ├── tasks │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── audio_pretraining.cpython-37.pyc │ │ │ ├── cross_lingual_lm.cpython-37.pyc │ │ │ ├── denoising.cpython-37.pyc │ │ │ ├── fairseq_task.cpython-37.pyc │ │ │ ├── language_modeling.cpython-37.pyc │ │ │ ├── legacy_masked_lm.cpython-37.pyc │ │ │ ├── masked_lm.cpython-37.pyc │ │ │ ├── multilingual_masked_lm.cpython-37.pyc │ │ │ ├── multilingual_translation.cpython-37.pyc │ │ │ ├── semisupervised_translation.cpython-37.pyc │ │ │ ├── sentence_prediction.cpython-37.pyc │ │ │ ├── sentence_ranking.cpython-37.pyc │ │ │ ├── smiles_prediction.cpython-37.pyc │ │ │ ├── translation.cpython-37.pyc │ │ │ ├── translation_from_pretrained_xlm.cpython-37.pyc │ │ │ ├── translation_lev.cpython-37.pyc │ │ │ └── translation_moe.cpython-37.pyc │ │ ├── audio_pretraining.py │ │ ├── cross_lingual_lm.py │ │ ├── denoising.py │ │ ├── fairseq_task.py │ │ ├── language_modeling.py │ │ ├── legacy_masked_lm.py │ │ ├── masked_lm.py │ │ ├── multilingual_masked_lm.py │ │ ├── multilingual_translation.py │ │ ├── semisupervised_translation.py │ │ ├── sentence_prediction.py │ │ ├── sentence_ranking.py │ │ ├── smiles_prediction.py │ │ ├── translation.py │ │ ├── translation_from_pretrained_xlm.py │ │ ├── translation_lev.py │ │ └── translation_moe.py │ ├── tokenizer.py │ ├── trainer.py │ └── utils.py ├── feature_analysis.py ├── generate.py ├── generate_bt_fps.py ├── generate_bt_fps_new.py ├── interactive.py ├── preprocess.py ├── score.py ├── setup.py ├── setup_cd_self.py ├── test_temp.py ├── train.py └── utils_main.py ├── examples └── data │ ├── dict.txt │ ├── example_train.id │ ├── example_train.label │ ├── example_train_canonical.smi │ ├── example_train_x_mol2 │ ├── 100-00-5.mol2 │ ├── 100-02-7.mol2 │ ├── 100-41-4.mol2 │ ├── 100-42-5.mol2 │ ├── 100-52-7.mol2 │ ├── 100-61-8.mol2 │ ├── 101-20-2.mol2 │ ├── 101-55-3.mol2 │ ├── 101-84-8.mol2 │ ├── 1014-70-6.mol2 │ ├── 102-08-9.mol2 │ ├── 1024-57-3.mol2 │ ├── 10265-92-6.mol2 │ ├── 103-69-5.mol2 │ ├── 103-72-0.mol2 │ ├── 103-85-5.mol2 │ ├── 1031-07-8.mol2 │ ├── 104-94-9.mol2 │ ├── 105-55-5.mol2 │ ├── 105-67-9.mol2 │ ├── 106-41-2.mol2 │ ├── 106-42-3.mol2 │ ├── 106-44-5.mol2 │ ├── 106-46-7.mol2 │ ├── 106-47-8.mol2 │ ├── 106-89-8.mol2 │ ├── 10605-21-7.mol2 │ ├── 107-03-9.mol2 │ ├── 107-06-2.mol2 │ ├── 107-07-3.mol2 │ ├── 107-11-9.mol2 │ ├── 107-15-3.mol2 │ ├── 107-21-1.mol2 │ ├── 107-92-6.mol2 │ ├── 1071-83-6.mol2 │ ├── 108-18-9.mol2 │ ├── 108-38-3.mol2 │ ├── 108-39-4.mol2 │ ├── 108-42-9.mol2 │ ├── 108-44-1.mol2 │ ├── 108-85-0.mol2 │ ├── 108-88-3.mol2 │ ├── 108-90-7.mol2 │ ├── 108-95-2.mol2 │ ├── 109-89-7.mol2 │ ├── 110-02-1.mol2 │ ├── 110-86-1.mol2 │ ├── 111-42-2.mol2 │ ├── 111-70-6.mol2 │ ├── 111-90-0.mol2 │ ├── 111-91-1.mol2 │ ├── 11141-17-6.mol2 │ ├── 112410-23-8.mol2 │ ├── 114-26-1.mol2 │ ├── 115-20-8.mol2 │ ├── 115-29-7.mol2 │ ├── 115-86-6.mol2 │ ├── 116-06-3.mol2 │ ├── 116-29-0.mol2 │ ├── 117-81-7.mol2 │ ├── 118-79-6.mol2 │ ├── 118-96-7.mol2 │ ├── 120-72-9.mol2 │ ├── 120-83-2.mol2 │ ├── 120-93-4.mol2 │ ├── 121-29-9.mol2 │ ├── 121-73-3.mol2 │ ├── 121-75-5.mol2 │ ├── 121-87-9.mol2 │ ├── 122-14-5.mol2 │ ├── 122-66-7.mol2 │ ├── 124-18-5.mol2 │ ├── 124-40-3.mol2 │ ├── 1241-94-7.mol2 │ ├── 126-73-8.mol2 │ ├── 127-18-4.mol2 │ ├── 129-00-0.mol2 │ ├── 131-11-3.mol2 │ ├── 131860-33-8.mol2 │ ├── 132-65-0.mol2 │ ├── 13408-56-5.mol2 │ ├── 135-19-3.mol2 │ ├── 137-26-8.mol2 │ ├── 138-86-3.mol2 │ ├── 138261-41-3.mol2 │ ├── 139-13-9.mol2 │ ├── 140-66-9.mol2 │ ├── 141-78-6.mol2 │ ├── 142-28-9.mol2 │ ├── 142-96-1.mol2 │ ├── 143-50-0.mol2 │ ├── 14315-14-1.mol2 │ ├── 1455-18-1.mol2 │ ├── 148-01-6.mol2 │ ├── 149-30-4.mol2 │ ├── 150-19-6.mol2 │ ├── 1516-32-1.mol2 │ ├── 15263-53-3.mol2 │ ├── 156-60-5.mol2 │ ├── 1570-64-5.mol2 │ ├── 1570-65-6.mol2 │ ├── 1582-09-8.mol2 │ ├── 15862-07-4.mol2 │ ├── 1646-88-4.mol2 │ ├── 1836-77-7.mol2 │ ├── 1897-45-6.mol2 │ ├── 1918-02-1.mol2 │ ├── 1982-47-4.mol2 │ ├── 205-39-0.mol2 │ ├── 205-43-6.mol2 │ ├── 2051-61-8.mol2 │ ├── 2051-62-9.mol2 │ ├── 206-44-0.mol2 │ ├── 22431-62-5.mol2 │ ├── 2257-09-2.mol2 │ ├── 2303-17-5.mol2 │ ├── 23564-05-8.mol2 │ ├── 2437-79-8.mol2 │ ├── 2539-17-5.mol2 │ ├── 25875-51-8.mol2 │ ├── 2668-24-8.mol2 │ ├── 2741-06-2.mol2 │ ├── 2764-72-9.mol2 │ ├── 2921-88-2.mol2 │ ├── 29232-93-7.mol2 │ ├── 298-00-0.mol2 │ ├── 30125-65-6.mol2 │ ├── 3209-22-1.mol2 │ ├── 33213-65-9.mol2 │ ├── 333-41-5.mol2 │ ├── 33813-20-6.mol2 │ ├── 3483-12-3.mol2 │ ├── 35367-38-5.mol2 │ ├── 3547-04-4.mol2 │ ├── 35723-83-2.mol2 │ ├── 4044-65-9.mol2 │ ├── 40596-69-8.mol2 │ ├── 4104-75-0.mol2 │ ├── 4180-23-8.mol2 │ ├── 50-29-3.mol2 │ ├── 503-87-7.mol2 │ ├── 506-77-4.mol2 │ ├── 51-28-5.mol2 │ ├── 51218-45-2.mol2 │ ├── 51235-04-2.mol2 │ ├── 51630-58-1.mol2 │ ├── 52-68-6.mol2 │ ├── 52315-07-8.mol2 │ ├── 52645-53-1.mol2 │ ├── 5289-74-7.mol2 │ ├── 52918-63-5.mol2 │ ├── 532-55-8.mol2 │ ├── 534-13-4.mol2 │ ├── 534-52-1.mol2 │ ├── 536-90-3.mol2 │ ├── 542-75-6.mol2 │ ├── 542-85-8.mol2 │ ├── 55-63-0.mol2 │ ├── 554-00-7.mol2 │ ├── 56-23-5.mol2 │ ├── 56-38-2.mol2 │ ├── 56-53-1.mol2 │ ├── 56-55-3.mol2 │ ├── 57-74-9.mol2 │ ├── 57057-83-7.mol2 │ ├── 57157-80-9.mol2 │ ├── 576-26-1.mol2 │ ├── 578-54-1.mol2 │ ├── 57837-19-1.mol2 │ ├── 58-14-0.mol2 │ ├── 58-27-5.mol2 │ ├── 58-89-9.mol2 │ ├── 58-90-2.mol2 │ ├── 586-62-9.mol2 │ ├── 589-16-2.mol2 │ ├── 592-82-5.mol2 │ ├── 598-52-7.mol2 │ ├── 60-00-4.mol2 │ ├── 60-51-5.mol2 │ ├── 602-01-7.mol2 │ ├── 608-93-5.mol2 │ ├── 611-06-3.mol2 │ ├── 618-62-2.mol2 │ ├── 62-53-3.mol2 │ ├── 62-56-6.mol2 │ ├── 62-73-7.mol2 │ ├── 622-78-6.mol2 │ ├── 625-53-6.mol2 │ ├── 626-43-7.mol2 │ ├── 63-25-2.mol2 │ ├── 630-20-6.mol2 │ ├── 632-22-4.mol2 │ ├── 634-67-3.mol2 │ ├── 634-83-3.mol2 │ ├── 634-90-2.mol2 │ ├── 636-30-6.mol2 │ ├── 66230-04-4.mol2 │ ├── 66841-25-6.mol2 │ ├── 67-56-1.mol2 │ ├── 67-64-1.mol2 │ ├── 67-66-3.mol2 │ ├── 67-72-1.mol2 │ ├── 680-31-9.mol2 │ ├── 68085-85-8.mol2 │ ├── 68359-37-5.mol2 │ ├── 693-21-0.mol2 │ ├── 6972-05-0.mol2 │ ├── 70630-17-0.mol2 │ ├── 709-98-8.mol2 │ ├── 71-23-8.mol2 │ ├── 71-55-6.mol2 │ ├── 72-20-8.mol2 │ ├── 72-43-5.mol2 │ ├── 75-05-8.mol2 │ ├── 75-08-1.mol2 │ ├── 75-21-8.mol2 │ ├── 75-25-2.mol2 │ ├── 76-44-8.mol2 │ ├── 76738-62-0.mol2 │ ├── 77-73-6.mol2 │ ├── 78-59-1.mol2 │ ├── 78-83-1.mol2 │ ├── 78-87-5.mol2 │ ├── 78-99-9.mol2 │ ├── 79-00-5.mol2 │ ├── 79-01-6.mol2 │ ├── 79-06-1.mol2 │ ├── 79-34-5.mol2 │ ├── 80-05-7.mol2 │ ├── 80-56-8.mol2 │ ├── 825-44-5.mol2 │ ├── 82657-04-3.mol2 │ ├── 83-32-9.mol2 │ ├── 83-41-0.mol2 │ ├── 83-42-1.mol2 │ ├── 83-79-4.mol2 │ ├── 84-66-2.mol2 │ ├── 84-74-2.mol2 │ ├── 85-01-8.mol2 │ ├── 85-68-7.mol2 │ ├── 86-30-6.mol2 │ ├── 87-86-5.mol2 │ ├── 877-43-0.mol2 │ ├── 88-06-2.mol2 │ ├── 88-73-3.mol2 │ ├── 88-85-7.mol2 │ ├── 88-89-1.mol2 │ ├── 89-59-8.mol2 │ ├── 89-61-2.mol2 │ ├── 90-04-0.mol2 │ ├── 90-05-1.mol2 │ ├── 90-13-1.mol2 │ ├── 91-22-5.mol2 │ ├── 91465-08-6.mol2 │ ├── 92-52-4.mol2 │ ├── 92-69-3.mol2 │ ├── 92-83-1.mol2 │ ├── 935-95-5.mol2 │ ├── 95-15-8.mol2 │ ├── 95-47-6.mol2 │ ├── 95-48-7.mol2 │ ├── 95-50-1.mol2 │ ├── 95-51-2.mol2 │ ├── 95-53-4.mol2 │ ├── 95-57-8.mol2 │ ├── 95-82-9.mol2 │ ├── 95-95-4.mol2 │ ├── 959-98-8.mol2 │ ├── 96-45-7.mol2 │ ├── 960003-90-1.mol2 │ ├── 960003-91-2.mol2 │ ├── 960003-92-3.mol2 │ ├── 960003-93-4.mol2 │ ├── 97-00-7.mol2 │ ├── 97-74-5.mol2 │ ├── 97-77-8.mol2 │ ├── 98-82-8.mol2 │ ├── 98-95-3.mol2 │ ├── 98886-44-3.mol2 │ ├── 99-08-1.mol2 │ ├── 99-65-0.mol2 │ ├── 99-86-5.mol2 │ └── 99-99-0.mol2 │ ├── example_train_y.npy │ ├── example_valid.id │ ├── example_valid.label │ ├── example_valid_canonical.smi │ ├── example_valid_x_mol2 │ ├── 1013-23-6.mol2 │ ├── 103-23-1.mol2 │ ├── 105-37-3.mol2 │ ├── 106-48-9.mol2 │ ├── 107-02-8.mol2 │ ├── 107-13-1.mol2 │ ├── 109-46-6.mol2 │ ├── 109-52-4.mol2 │ ├── 110-83-8.mol2 │ ├── 111-44-4.mol2 │ ├── 112-27-6.mol2 │ ├── 115-31-1.mol2 │ ├── 119-65-3.mol2 │ ├── 120-82-1.mol2 │ ├── 121-14-2.mol2 │ ├── 123-54-6.mol2 │ ├── 132-64-9.mol2 │ ├── 141-90-2.mol2 │ ├── 1445-75-6.mol2 │ ├── 149-31-5.mol2 │ ├── 1740-19-8.mol2 │ ├── 1912-24-9.mol2 │ ├── 2008-58-4.mol2 │ ├── 2051-60-7.mol2 │ ├── 2489-77-2.mol2 │ ├── 2556-42-5.mol2 │ ├── 260-94-6.mol2 │ ├── 2782-91-4.mol2 │ ├── 28159-98-0.mol2 │ ├── 311-45-5.mol2 │ ├── 3689-24-5.mol2 │ ├── 470-90-6.mol2 │ ├── 50-28-2.mol2 │ ├── 51-03-6.mol2 │ ├── 541-73-1.mol2 │ ├── 55406-53-6.mol2 │ ├── 556-61-6.mol2 │ ├── 59-06-3.mol2 │ ├── 59-50-7.mol2 │ ├── 5964-62-5.mol2 │ ├── 598-16-3.mol2 │ ├── 5989-27-5.mol2 │ ├── 60207-90-1.mol2 │ ├── 609-19-8.mol2 │ ├── 62-55-5.mol2 │ ├── 6317-18-6.mol2 │ ├── 64-17-5.mol2 │ ├── 66-25-1.mol2 │ ├── 67-68-5.mol2 │ ├── 68-12-2.mol2 │ ├── 71-43-2.mol2 │ ├── 74-83-9.mol2 │ ├── 75-09-2.mol2 │ ├── 75-35-4.mol2 │ ├── 76-01-7.mol2 │ ├── 77-47-4.mol2 │ ├── 79-09-4.mol2 │ ├── 79-92-5.mol2 │ ├── 872-50-4.mol2 │ ├── 88-72-2.mol2 │ ├── 88-75-5.mol2 │ ├── 90-02-8.mol2 │ ├── 90-43-7.mol2 │ ├── 91-20-3.mol2 │ ├── 91-64-5.mol2 │ ├── 94-75-7.mol2 │ ├── 944-22-9.mol2 │ ├── 95-76-1.mol2 │ ├── 99-51-4.mol2 │ └── 99-87-6.mol2 │ ├── example_valid_y.npy │ └── input0 │ └── dict.txt └── model_framework.png /agbt_pro/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/__init__.py -------------------------------------------------------------------------------- /agbt_pro/fairseq/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | __all__ = ['pdb'] 7 | __version__ = '0.9.0' 8 | 9 | import fairseq.criterions # noqa 10 | import fairseq.models # noqa 11 | import fairseq.modules # noqa 12 | import fairseq.optim # noqa 13 | import fairseq.optim.lr_scheduler # noqa 14 | import fairseq.pdb # noqa 15 | import fairseq.tasks # noqa 16 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/binarizer.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/binarizer.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/binarizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/binarizer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/bleu.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/bleu.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/checkpoint_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/checkpoint_utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/distributed_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/distributed_utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/file_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/file_utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/hub_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/hub_utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/iterative_refinement_generator.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/iterative_refinement_generator.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/legacy_distributed_data_parallel.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/legacy_distributed_data_parallel.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/meters.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/meters.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/options.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/options.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/pdb.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/pdb.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/progress_bar.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/progress_bar.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/registry.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/registry.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/registry.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/registry.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/search.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/search.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/sequence_generator.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/sequence_generator.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/sequence_scorer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/sequence_scorer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/tokenizer.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/tokenizer.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/tokenizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/tokenizer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/trainer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/trainer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/utils.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/__pycache__/utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/__pycache__/utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/clib/libbleu/module.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2017-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include 10 | 11 | 12 | static PyMethodDef method_def[] = { 13 | {NULL, NULL, 0, NULL} 14 | }; 15 | 16 | static struct PyModuleDef module_def = { 17 | PyModuleDef_HEAD_INIT, 18 | "libbleu", /* name of module */ 19 | NULL, /* module documentation, may be NULL */ 20 | -1, /* size of per-interpreter state of the module, 21 | or -1 if the module keeps state in global variables. */ 22 | method_def 23 | }; 24 | 25 | 26 | #if PY_MAJOR_VERSION == 2 27 | PyMODINIT_FUNC init_libbleu() 28 | #else 29 | PyMODINIT_FUNC PyInit_libbleu() 30 | #endif 31 | { 32 | PyObject *m = PyModule_Create(&module_def); 33 | if (!m) { 34 | return NULL; 35 | } 36 | return m; 37 | } 38 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/clib/libnat_cuda/edit_dist.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2017-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | torch::Tensor LevenshteinDistanceCuda( 14 | torch::Tensor source, 15 | torch::Tensor target, 16 | torch::Tensor source_length, 17 | torch::Tensor target_length); 18 | 19 | torch::Tensor GenerateDeletionLabelCuda( 20 | torch::Tensor source, 21 | torch::Tensor operations); 22 | 23 | std::pair GenerateInsertionLabelCuda( 24 | torch::Tensor source, 25 | torch::Tensor operations); 26 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import importlib 7 | import os 8 | 9 | from fairseq import registry 10 | from fairseq.criterions.fairseq_criterion import FairseqCriterion 11 | 12 | 13 | build_criterion, register_criterion, CRITERION_REGISTRY = registry.setup_registry( 14 | '--criterion', 15 | base_class=FairseqCriterion, 16 | default='cross_entropy', 17 | ) 18 | 19 | 20 | # automatically import any Python files in the criterions/ directory 21 | for file in os.listdir(os.path.dirname(__file__)): 22 | if file.endswith('.py') and not file.startswith('_'): 23 | module = file[:file.find('.py')] 24 | importlib.import_module('fairseq.criterions.' + module) 25 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/adaptive_loss.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/adaptive_loss.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/binary_cross_entropy.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/binary_cross_entropy.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/binary_cross_entropy.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/binary_cross_entropy.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/composite_loss.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/composite_loss.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/cross_entropy.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/cross_entropy.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/fairseq_criterion.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/fairseq_criterion.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/fairseq_criterion.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/fairseq_criterion.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/label_smoothed_cross_entropy.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/label_smoothed_cross_entropy.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/label_smoothed_cross_entropy_with_alignment.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/label_smoothed_cross_entropy_with_alignment.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/legacy_masked_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/legacy_masked_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/masked_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/masked_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/nat_loss.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/nat_loss.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/sentence_prediction.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/sentence_prediction.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/__pycache__/sentence_ranking.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/criterions/__pycache__/sentence_ranking.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/criterions/fairseq_criterion.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from torch.nn.modules.loss import _Loss 7 | 8 | 9 | class FairseqCriterion(_Loss): 10 | 11 | def __init__(self, args, task): 12 | super().__init__() 13 | self.args = args 14 | self.task = task 15 | self.padding_idx = task.target_dictionary.pad() if task.target_dictionary is not None else -100 16 | 17 | @staticmethod 18 | def add_args(parser): 19 | """Add criterion-specific arguments to the parser.""" 20 | pass 21 | 22 | @classmethod 23 | def build_criterion(cls, args, task): 24 | return cls(args, task) 25 | 26 | def forward(self, model, sample, reduce=True): 27 | """Compute the loss for the given sample. 28 | 29 | Returns a tuple with three elements: 30 | 1) the loss 31 | 2) the sample size, which is used as the denominator for the gradient 32 | 3) logging outputs to display while training 33 | """ 34 | raise NotImplementedError 35 | 36 | @staticmethod 37 | def aggregate_logging_outputs(logging_outputs): 38 | """Aggregate logging outputs from data parallel training.""" 39 | raise NotImplementedError 40 | 41 | @staticmethod 42 | def grad_denom(sample_sizes): 43 | """Compute the gradient denominator for a set of sample sizes.""" 44 | return sum(sample_sizes) 45 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/append_token_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/append_token_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/backtranslation_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/backtranslation_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/base_wrapper_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/base_wrapper_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/colorize_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/colorize_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/concat_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/concat_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/concat_sentences_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/concat_sentences_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/data_utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/data_utils.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/data_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/data_utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/denoising_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/denoising_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/dictionary.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/dictionary.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/dictionary.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/dictionary.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/fairseq_dataset.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/fairseq_dataset.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/fairseq_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/fairseq_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/id_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/id_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/indexed_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/indexed_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/iterators.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/iterators.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/language_pair_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/language_pair_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/list_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/list_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/lm_context_window_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/lm_context_window_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/lru_cache_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/lru_cache_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/mask_tokens_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/mask_tokens_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/monolingual_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/monolingual_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/multi_corpus_sampled_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/multi_corpus_sampled_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/nested_dictionary_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/nested_dictionary_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/noising.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/noising.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/num_samples_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/num_samples_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/numel_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/numel_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/offset_tokens_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/offset_tokens_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/pad_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/pad_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/plasma_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/plasma_utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/prepend_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/prepend_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/prepend_token_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/prepend_token_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/raw_label_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/raw_label_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/replace_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/replace_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/resampling_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/resampling_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/roll_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/roll_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/round_robin_zip_datasets.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/round_robin_zip_datasets.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/sharded_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/sharded_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/sort_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/sort_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/strip_token_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/strip_token_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/subsample_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/subsample_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/token_block_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/token_block_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/transform_eos_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/transform_eos_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/transform_eos_lang_pair_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/transform_eos_lang_pair_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/__pycache__/truncate_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/__pycache__/truncate_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/append_token_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import numpy as np 7 | import torch 8 | 9 | from . import BaseWrapperDataset 10 | 11 | 12 | class AppendTokenDataset(BaseWrapperDataset): 13 | 14 | def __init__(self, dataset, token=None): 15 | super().__init__(dataset) 16 | self.token = token 17 | if token is not None: 18 | self._sizes = np.array(dataset.sizes) + 1 19 | else: 20 | self._sizes = dataset.sizes 21 | 22 | def __getitem__(self, idx): 23 | item = self.dataset[idx] 24 | if self.token is not None: 25 | item = torch.cat([item, item.new([self.token])]) 26 | return item 27 | 28 | @property 29 | def sizes(self): 30 | return self._sizes 31 | 32 | def num_tokens(self, index): 33 | n = self.dataset.num_tokens(index) 34 | if self.token is not None: 35 | n += 1 36 | return n 37 | 38 | def size(self, index): 39 | n = self.dataset.size(index) 40 | if self.token is not None: 41 | n += 1 42 | return n 43 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/audio/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/audio/__init__.py -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/audio/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/audio/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/audio/__pycache__/raw_audio_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/audio/__pycache__/raw_audio_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/base_wrapper_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from torch.utils.data.dataloader import default_collate 7 | 8 | from . import FairseqDataset 9 | 10 | 11 | class BaseWrapperDataset(FairseqDataset): 12 | 13 | def __init__(self, dataset): 14 | super().__init__() 15 | self.dataset = dataset 16 | 17 | def __getitem__(self, index): 18 | return self.dataset[index] 19 | 20 | def __len__(self): 21 | return len(self.dataset) 22 | 23 | def collater(self, samples): 24 | if hasattr(self.dataset, 'collater'): 25 | return self.dataset.collater(samples) 26 | else: 27 | return default_collate(samples) 28 | 29 | @property 30 | def sizes(self): 31 | return self.dataset.sizes 32 | 33 | def num_tokens(self, index): 34 | return self.dataset.num_tokens(index) 35 | 36 | def size(self, index): 37 | return self.dataset.size(index) 38 | 39 | def ordered_indices(self): 40 | return self.dataset.ordered_indices() 41 | 42 | @property 43 | def supports_prefetch(self): 44 | return getattr(self.dataset, 'supports_prefetch', False) 45 | 46 | def prefetch(self, indices): 47 | self.dataset.prefetch(indices) 48 | 49 | def set_epoch(self, epoch): 50 | super().set_epoch(epoch) 51 | if hasattr(self.dataset, 'set_epoch'): 52 | self.dataset.set_epoch(epoch) 53 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/colorize_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch 7 | 8 | from . import BaseWrapperDataset 9 | 10 | 11 | class ColorizeDataset(BaseWrapperDataset): 12 | """ Adds 'colors' property to net input that is obtained from the provided color getter for use by models """ 13 | def __init__(self, dataset, color_getter): 14 | super().__init__(dataset) 15 | self.color_getter = color_getter 16 | 17 | def collater(self, samples): 18 | base_collate = super().collater(samples) 19 | if len(base_collate) > 0: 20 | base_collate["net_input"]["colors"] = torch.tensor( 21 | list(self.color_getter(self.dataset, s["id"]) for s in samples), 22 | dtype=torch.long, 23 | ) 24 | return base_collate 25 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/data_utils_fast.cp37-win_amd64.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/data_utils_fast.cp37-win_amd64.pyd -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/data_utils_fast.cpython-37m-powerpc64le-linux-gnu.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/data_utils_fast.cpython-37m-powerpc64le-linux-gnu.so -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | 7 | import importlib 8 | import os 9 | 10 | from fairseq import registry 11 | 12 | 13 | build_tokenizer, register_tokenizer, TOKENIZER_REGISTRY = registry.setup_registry( 14 | '--tokenizer', 15 | default=None, 16 | ) 17 | 18 | 19 | build_bpe, register_bpe, BPE_REGISTRY = registry.setup_registry( 20 | '--bpe', 21 | default=None, 22 | ) 23 | 24 | 25 | # automatically import any Python files in the encoders/ directory 26 | for file in os.listdir(os.path.dirname(__file__)): 27 | if file.endswith('.py') and not file.startswith('_'): 28 | module = file[:file.find('.py')] 29 | importlib.import_module('fairseq.data.encoders.' + module) 30 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/fastbpe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/fastbpe.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/gpt2_bpe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/gpt2_bpe.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/gpt2_bpe_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/gpt2_bpe_utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/hf_bert_bpe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/hf_bert_bpe.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/hf_smi_bpe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/hf_smi_bpe.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/moses_tokenizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/moses_tokenizer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/nltk_tokenizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/nltk_tokenizer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/sentencepiece_bpe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/sentencepiece_bpe.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/smi2_bpe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/smi2_bpe.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/space_tokenizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/space_tokenizer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/subword_nmt_bpe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/subword_nmt_bpe.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/__pycache__/utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/encoders/__pycache__/utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/fastbpe.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from fairseq import file_utils 7 | from fairseq.data.encoders import register_bpe 8 | 9 | 10 | @register_bpe('fastbpe') 11 | class fastBPE(object): 12 | 13 | @staticmethod 14 | def add_args(parser): 15 | # fmt: off 16 | parser.add_argument('--bpe-codes', type=str, 17 | help='path to fastBPE BPE') 18 | # fmt: on 19 | 20 | def __init__(self, args): 21 | if args.bpe_codes is None: 22 | raise ValueError('--bpe-codes is required for --bpe=subword_nmt') 23 | codes = file_utils.cached_path(args.bpe_codes) 24 | try: 25 | import fastBPE 26 | self.bpe = fastBPE.fastBPE(codes) 27 | self.bpe_symbol = "@@ " 28 | except ImportError: 29 | raise ImportError('Please install fastBPE with: pip install fastBPE') 30 | 31 | def encode(self, x: str) -> str: 32 | return self.bpe.apply([x])[0] 33 | 34 | def decode(self, x: str) -> str: 35 | return (x + ' ').replace(self.bpe_symbol, '').rstrip() 36 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/nltk_tokenizer.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from fairseq.data.encoders import register_tokenizer 7 | 8 | 9 | @register_tokenizer('nltk') 10 | class NLTKTokenizer(object): 11 | 12 | def __init__(self, source_lang=None, target_lang=None): 13 | try: 14 | from nltk.tokenize import word_tokenize 15 | self.word_tokenize = word_tokenize 16 | except ImportError: 17 | raise ImportError('Please install nltk with: pip install nltk') 18 | 19 | def encode(self, x: str) -> str: 20 | return ' '.join(self.word_tokenize(x)) 21 | 22 | def decode(self, x: str) -> str: 23 | return x 24 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/smi2_bpe.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import os 7 | 8 | from fairseq.data.encoders import register_bpe 9 | from fairseq.tokenizer import tokenize_smiles 10 | from fairseq.data import Dictionary 11 | 12 | 13 | @register_bpe('smi') 14 | class SMI2BPE(object): 15 | def __init__(self, args): 16 | dict_file = os.path.join(args.data, 'dict.txt') 17 | assert os.path.exists(dict_file), f"dict.txt doesn't exists in {args.data}" 18 | self.vocab_dict = Dictionary.load(dict_file) 19 | 20 | def encode(self, x): 21 | return ' '.join(tokenize_smiles(x)) 22 | 23 | def decode(self, x): 24 | return x 25 | 26 | def is_beginning_of_word(self, x: str) -> bool: 27 | return self.decode(x).startswith(' ') 28 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/space_tokenizer.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import re 7 | 8 | from fairseq.data.encoders import register_tokenizer 9 | 10 | 11 | @register_tokenizer('space') 12 | class SpaceTokenizer(object): 13 | 14 | def __init__(self, source_lang=None, target_lang=None): 15 | self.space_tok = re.compile(r"\s+") 16 | 17 | def encode(self, x: str) -> str: 18 | return self.space_tok.sub(' ', x) 19 | 20 | def decode(self, x: str) -> str: 21 | return x 22 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/encoders/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch 7 | from fairseq.data import encoders 8 | 9 | 10 | def get_whole_word_mask(args, dictionary): 11 | bpe = encoders.build_bpe(args) 12 | if bpe is not None: 13 | def is_beginning_of_word(i): 14 | if i < dictionary.nspecial: 15 | # special elements are always considered beginnings 16 | return True 17 | tok = dictionary[i] 18 | if tok.startswith('madeupword'): 19 | return True 20 | try: 21 | return bpe.is_beginning_of_word(tok) 22 | except ValueError: 23 | return True 24 | mask_whole_words = torch.ByteTensor(list( 25 | map(is_beginning_of_word, range(len(dictionary))) 26 | )) 27 | return mask_whole_words 28 | return None 29 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/id_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch 7 | 8 | from . import FairseqDataset 9 | 10 | 11 | class IdDataset(FairseqDataset): 12 | 13 | def __getitem__(self, index): 14 | return index 15 | 16 | def __len__(self): 17 | return 0 18 | 19 | def collater(self, samples): 20 | return torch.tensor(samples) 21 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/legacy/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from .masked_lm_dictionary import BertDictionary, MaskedLMDictionary 7 | from .block_pair_dataset import BlockPairDataset 8 | from .masked_lm_dataset import MaskedLMDataset 9 | 10 | __all__ = [ 11 | 'BertDictionary', 12 | 'BlockPairDataset', 13 | 'MaskedLMDataset', 14 | 'MaskedLMDictionary', 15 | ] 16 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/legacy/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/legacy/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/legacy/__pycache__/block_pair_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/legacy/__pycache__/block_pair_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/legacy/__pycache__/masked_lm_dataset.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/legacy/__pycache__/masked_lm_dataset.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/legacy/__pycache__/masked_lm_dictionary.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/legacy/__pycache__/masked_lm_dictionary.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/list_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from . import BaseWrapperDataset 7 | 8 | 9 | class ListDataset(BaseWrapperDataset): 10 | 11 | def __init__(self, dataset, sizes=None): 12 | super().__init__(dataset) 13 | self._sizes = sizes 14 | 15 | def __iter__(self): 16 | for x in self.dataset: 17 | yield x 18 | 19 | def collater(self, samples): 20 | return samples 21 | 22 | @property 23 | def sizes(self): 24 | return self._sizes 25 | 26 | def num_tokens(self, index): 27 | return self.sizes[index] 28 | 29 | def size(self, index): 30 | return self.sizes[index] 31 | 32 | def set_epoch(self, epoch): 33 | pass 34 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/lru_cache_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from functools import lru_cache 7 | 8 | from . import BaseWrapperDataset 9 | 10 | 11 | class LRUCacheDataset(BaseWrapperDataset): 12 | 13 | def __init__(self, dataset, token=None): 14 | super().__init__(dataset) 15 | 16 | @lru_cache(maxsize=8) 17 | def __getitem__(self, index): 18 | return self.dataset[index] 19 | 20 | @lru_cache(maxsize=8) 21 | def collater(self, samples): 22 | return self.dataset.collater(samples) 23 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/num_samples_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from . import FairseqDataset 7 | 8 | 9 | class NumSamplesDataset(FairseqDataset): 10 | 11 | def __getitem__(self, index): 12 | return 1 13 | 14 | def __len__(self): 15 | return 0 16 | 17 | def collater(self, samples): 18 | return sum(samples) 19 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/numel_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import numpy as np 7 | import torch 8 | 9 | from . import BaseWrapperDataset 10 | 11 | 12 | class NumelDataset(BaseWrapperDataset): 13 | 14 | def __init__(self, dataset, reduce=False): 15 | super().__init__(dataset) 16 | self.reduce = reduce 17 | 18 | def __getitem__(self, index): 19 | item = self.dataset[index] 20 | if torch.is_tensor(item): 21 | return torch.numel(item) 22 | else: 23 | return np.size(item) 24 | 25 | def __len__(self): 26 | return len(self.dataset) 27 | 28 | def collater(self, samples): 29 | if self.reduce: 30 | return sum(samples) 31 | else: 32 | return torch.tensor(samples) 33 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/offset_tokens_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from . import BaseWrapperDataset 7 | 8 | 9 | class OffsetTokensDataset(BaseWrapperDataset): 10 | 11 | def __init__(self, dataset, offset): 12 | super().__init__(dataset) 13 | self.offset = offset 14 | 15 | def __getitem__(self, idx): 16 | return self.dataset[idx] + self.offset 17 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/pad_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from fairseq.data import data_utils 7 | 8 | from . import BaseWrapperDataset 9 | 10 | 11 | class PadDataset(BaseWrapperDataset): 12 | 13 | def __init__(self, dataset, pad_idx, left_pad): 14 | super().__init__(dataset) 15 | self.pad_idx = pad_idx 16 | self.left_pad = left_pad 17 | 18 | def collater(self, samples): 19 | return data_utils.collate_tokens(samples, self.pad_idx, left_pad=self.left_pad) 20 | 21 | 22 | class LeftPadDataset(PadDataset): 23 | 24 | def __init__(self, dataset, pad_idx): 25 | super().__init__(dataset, pad_idx, left_pad=True) 26 | 27 | 28 | class RightPadDataset(PadDataset): 29 | 30 | def __init__(self, dataset, pad_idx): 31 | super().__init__(dataset, pad_idx, left_pad=False) 32 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/prepend_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import numpy as np 7 | import torch 8 | 9 | from . import BaseWrapperDataset 10 | 11 | 12 | class PrependDataset(BaseWrapperDataset): 13 | def __init__(self, dataset, prepend_getter, ensure_first_token_is=None): 14 | super().__init__(dataset) 15 | self.prepend_getter = prepend_getter 16 | self.ensure_first_token = ensure_first_token_is 17 | 18 | def __getitem__(self, idx): 19 | item = self.dataset[idx] 20 | is_tuple = isinstance(item, tuple) 21 | src = item[0] if is_tuple else item 22 | 23 | assert self.ensure_first_token is None or src[0] == self.ensure_first_token 24 | prepend_idx = self.prepend_getter(self.dataset, idx) 25 | assert isinstance(prepend_idx, int) 26 | src[0] = prepend_idx 27 | item = tuple((src,) + item[1:]) if is_tuple else src 28 | return item 29 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/prepend_token_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import numpy as np 7 | import torch 8 | 9 | from . import BaseWrapperDataset 10 | 11 | 12 | class PrependTokenDataset(BaseWrapperDataset): 13 | 14 | def __init__(self, dataset, token=None): 15 | super().__init__(dataset) 16 | self.token = token 17 | if token is not None: 18 | self._sizes = np.array(dataset.sizes) + 1 19 | else: 20 | self._sizes = dataset.sizes 21 | 22 | def __getitem__(self, idx): 23 | item = self.dataset[idx] 24 | if self.token is not None: 25 | item = torch.cat([item.new([self.token]), item]) 26 | return item 27 | 28 | @property 29 | def sizes(self): 30 | return self._sizes 31 | 32 | def num_tokens(self, index): 33 | n = self.dataset.num_tokens(index) 34 | if self.token is not None: 35 | n += 1 36 | return n 37 | 38 | def size(self, index): 39 | n = self.dataset.size(index) 40 | if self.token is not None: 41 | n += 1 42 | return n 43 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/raw_label_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch 7 | 8 | from . import FairseqDataset 9 | 10 | 11 | class RawLabelDataset(FairseqDataset): 12 | 13 | def __init__(self, labels): 14 | super().__init__() 15 | self.labels = labels 16 | 17 | def __getitem__(self, index): 18 | return self.labels[index] 19 | 20 | def __len__(self): 21 | return len(self.labels) 22 | 23 | def collater(self, samples): 24 | return torch.tensor(samples) 25 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/replace_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from . import BaseWrapperDataset 7 | 8 | 9 | class ReplaceDataset(BaseWrapperDataset): 10 | """Replaces tokens found in the dataset by a specified replacement token 11 | 12 | Args: 13 | dataset (~torch.utils.data.Dataset): dataset to replace tokens in 14 | replace_map(Dictionary[int,int]): map of token to replace -> replacement token 15 | offsets (List[int]): do not replace tokens before (from left if pos, right if neg) this offset. should be 16 | as many as the number of objects returned by the underlying dataset __getitem__ method. 17 | """ 18 | 19 | def __init__(self, dataset, replace_map, offsets): 20 | super().__init__(dataset) 21 | assert len(replace_map) > 0 22 | self.replace_map = replace_map 23 | self.offsets = offsets 24 | 25 | def __getitem__(self, index): 26 | item = self.dataset[index] 27 | is_tuple = isinstance(item, tuple) 28 | srcs = item if is_tuple else [item] 29 | 30 | for offset, src in zip(self.offsets, srcs): 31 | for k, v in self.replace_map.items(): 32 | src_off = src[offset:] if offset >= 0 else src[:offset] 33 | src_off.masked_fill_(src_off == k, v) 34 | 35 | item = srcs if is_tuple else srcs[0] 36 | return item 37 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/roll_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch 7 | 8 | from . import BaseWrapperDataset 9 | 10 | 11 | class RollDataset(BaseWrapperDataset): 12 | 13 | def __init__(self, dataset, shifts): 14 | super().__init__(dataset) 15 | self.shifts = shifts 16 | 17 | def __getitem__(self, index): 18 | item = self.dataset[index] 19 | return torch.roll(item, self.shifts) 20 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/sort_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import numpy as np 7 | 8 | from . import BaseWrapperDataset 9 | 10 | 11 | class SortDataset(BaseWrapperDataset): 12 | 13 | def __init__(self, dataset, sort_order): 14 | super().__init__(dataset) 15 | if not isinstance(sort_order, (list, tuple)): 16 | sort_order = [sort_order] 17 | self.sort_order = sort_order 18 | 19 | assert all(len(so) == len(dataset) for so in sort_order) 20 | 21 | def ordered_indices(self): 22 | return np.lexsort(self.sort_order) 23 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/strip_token_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from . import BaseWrapperDataset 7 | 8 | 9 | class StripTokenDataset(BaseWrapperDataset): 10 | 11 | def __init__(self, dataset, id_to_strip): 12 | super().__init__(dataset) 13 | self.id_to_strip = id_to_strip 14 | 15 | def __getitem__(self, index): 16 | item = self.dataset[index] 17 | return item[item.ne(self.id_to_strip)] 18 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/token_block_utils_fast.cp37-win_amd64.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/token_block_utils_fast.cp37-win_amd64.pyd -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/token_block_utils_fast.cpython-37m-powerpc64le-linux-gnu.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/data/token_block_utils_fast.cpython-37m-powerpc64le-linux-gnu.so -------------------------------------------------------------------------------- /agbt_pro/fairseq/data/truncate_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import numpy as np 7 | 8 | from . import BaseWrapperDataset 9 | 10 | 11 | class TruncateDataset(BaseWrapperDataset): 12 | 13 | def __init__(self, dataset, truncation_length): 14 | super().__init__(dataset) 15 | assert truncation_length is not None 16 | self.truncation_length = truncation_length 17 | self.dataset = dataset 18 | 19 | def __getitem__(self, index): 20 | item = self.dataset[index] 21 | item_len = item.size(0) 22 | if item_len > self.truncation_length: 23 | item = item[:self.truncation_length] 24 | return item 25 | 26 | @property 27 | def sizes(self): 28 | return np.minimum(self.dataset.sizes, self.truncation_length) 29 | 30 | def __len__(self): 31 | return len(self.dataset) 32 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/libbleu.cp37-win_amd64.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/libbleu.cp37-win_amd64.pyd -------------------------------------------------------------------------------- /agbt_pro/fairseq/libbleu.cpython-37m-powerpc64le-linux-gnu.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/libbleu.cpython-37m-powerpc64le-linux-gnu.so -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/cmlm_transformer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/cmlm_transformer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/composite_encoder.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/composite_encoder.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/distributed_fairseq_model.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/distributed_fairseq_model.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/fairseq_decoder.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/fairseq_decoder.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/fairseq_encoder.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/fairseq_encoder.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/fairseq_incremental_decoder.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/fairseq_incremental_decoder.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/fairseq_model.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/fairseq_model.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/fconv.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/fconv.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/fconv_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/fconv_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/fconv_self_att.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/fconv_self_att.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/insertion_transformer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/insertion_transformer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/iterative_nonautoregressive_transformer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/iterative_nonautoregressive_transformer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/levenshtein_transformer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/levenshtein_transformer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/lightconv.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/lightconv.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/lightconv_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/lightconv_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/lstm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/lstm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/masked_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/masked_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/model_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/model_utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/multilingual_transformer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/multilingual_transformer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/nonautoregressive_ensembles.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/nonautoregressive_ensembles.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/nonautoregressive_transformer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/nonautoregressive_transformer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/transformer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/transformer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/transformer_from_pretrained_xlm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/transformer_from_pretrained_xlm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/transformer_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/transformer_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/__pycache__/wav2vec.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/__pycache__/wav2vec.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/bart/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from .hub_interface import * # noqa 7 | from .model import * # noqa 8 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/bart/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/bart/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/bart/__pycache__/hub_interface.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/bart/__pycache__/hub_interface.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/bart/__pycache__/model.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/bart/__pycache__/model.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/roberta/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from .hub_interface import * # noqa 7 | from .model import * # noqa 8 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/roberta/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/roberta/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/roberta/__pycache__/alignment_utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/roberta/__pycache__/alignment_utils.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/roberta/__pycache__/hub_interface.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/roberta/__pycache__/hub_interface.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/models/roberta/__pycache__/model.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/models/roberta/__pycache__/model.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/adaptive_input.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/adaptive_input.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/adaptive_input.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/adaptive_input.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/adaptive_softmax.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/adaptive_softmax.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/adaptive_softmax.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/adaptive_softmax.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/beamable_mm.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/beamable_mm.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/beamable_mm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/beamable_mm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/character_token_embedder.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/character_token_embedder.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/character_token_embedder.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/character_token_embedder.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/conv_tbc.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/conv_tbc.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/downsampled_multihead_attention.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/downsampled_multihead_attention.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/dynamic_convolution.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/dynamic_convolution.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/gelu.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/gelu.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/grad_multiply.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/grad_multiply.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/highway.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/highway.cpython-36.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/highway.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/highway.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/layer_norm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/layer_norm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/learned_positional_embedding.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/learned_positional_embedding.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/lightweight_convolution.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/lightweight_convolution.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/linearized_convolution.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/linearized_convolution.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/logsumexp_moe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/logsumexp_moe.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/mean_pool_gating_network.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/mean_pool_gating_network.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/multihead_attention.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/multihead_attention.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/positional_embedding.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/positional_embedding.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/scalar_bias.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/scalar_bias.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/sinusoidal_positional_embedding.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/sinusoidal_positional_embedding.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/sparse_multihead_attention.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/sparse_multihead_attention.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/sparse_transformer_sentence_encoder.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/sparse_transformer_sentence_encoder.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/sparse_transformer_sentence_encoder_layer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/sparse_transformer_sentence_encoder_layer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/transformer_layer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/transformer_layer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/transformer_sentence_encoder.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/transformer_sentence_encoder.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/transformer_sentence_encoder_layer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/transformer_sentence_encoder_layer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/unfold.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/unfold.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/__pycache__/vggblock.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/__pycache__/vggblock.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/conv_tbc.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch 7 | from torch.nn.modules.utils import _single 8 | 9 | 10 | class ConvTBC(torch.nn.Module): 11 | """1D convolution over an input of shape (time x batch x channel) 12 | 13 | The implementation uses gemm to perform the convolution. This implementation 14 | is faster than cuDNN for small kernel sizes. 15 | """ 16 | def __init__(self, in_channels, out_channels, kernel_size, padding=0): 17 | super(ConvTBC, self).__init__() 18 | self.in_channels = in_channels 19 | self.out_channels = out_channels 20 | self.kernel_size = _single(kernel_size) 21 | self.padding = _single(padding) 22 | 23 | self.weight = torch.nn.Parameter(torch.Tensor( 24 | self.kernel_size[0], in_channels, out_channels)) 25 | self.bias = torch.nn.Parameter(torch.Tensor(out_channels)) 26 | 27 | def forward(self, input): 28 | return torch.conv_tbc(input.contiguous(), self.weight, self.bias, self.padding[0]) 29 | 30 | def __repr__(self): 31 | s = ('{name}({in_channels}, {out_channels}, kernel_size={kernel_size}' 32 | ', padding={padding}') 33 | if self.bias is None: 34 | s += ', bias=False' 35 | s += ')' 36 | return s.format(name=self.__class__.__name__, **self.__dict__) 37 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/dynamicconv_layer/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from .dynamicconv_layer import DynamicconvLayer # noqa 7 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/dynamicconv_layer/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/dynamicconv_layer/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/dynamicconv_layer/__pycache__/cuda_function_gen.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/dynamicconv_layer/__pycache__/cuda_function_gen.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/dynamicconv_layer/__pycache__/dynamicconv_layer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/dynamicconv_layer/__pycache__/dynamicconv_layer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/dynamicconv_layer/__pycache__/setup.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/dynamicconv_layer/__pycache__/setup.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/dynamicconv_layer/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | # 4 | # This source code is licensed under the MIT license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | from setuptools import setup 8 | from torch.utils.cpp_extension import CUDAExtension, BuildExtension 9 | 10 | setup( 11 | name='dynamicconv_layer', 12 | ext_modules=[ 13 | CUDAExtension( 14 | name='dynamicconv_cuda', 15 | sources=[ 16 | 'dynamicconv_cuda.cpp', 17 | 'dynamicconv_cuda_kernel.cu', 18 | ], 19 | ), 20 | ], 21 | cmdclass={ 22 | 'build_ext': BuildExtension 23 | }) 24 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/gelu.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | """ 6 | See "Gaussian Error Linear Units (GELUs)" by Dan Hendrycks and Kevin Gimpel with 7 | the corresponding GitHub repo: https://github.com/hendrycks/GELUs 8 | """ 9 | 10 | import math 11 | 12 | import torch 13 | 14 | 15 | def gelu_accurate(x): 16 | if not hasattr(gelu_accurate, "_a"): 17 | gelu_accurate._a = math.sqrt(2 / math.pi) 18 | return 0.5 * x * (1 + torch.tanh(gelu_accurate._a * (x + 0.044715 * torch.pow(x, 3)))) 19 | 20 | 21 | def gelu(x: torch.Tensor) -> torch.Tensor: 22 | if hasattr(torch.nn.functional, 'gelu'): 23 | return torch.nn.functional.gelu(x.float()).type_as(x) 24 | else: 25 | return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) 26 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/grad_multiply.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch 7 | 8 | 9 | class GradMultiply(torch.autograd.Function): 10 | @staticmethod 11 | def forward(ctx, x, scale): 12 | ctx.scale = scale 13 | res = x.new(x) 14 | return res 15 | 16 | @staticmethod 17 | def backward(ctx, grad): 18 | return grad * ctx.scale, None 19 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/layer_norm.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch 7 | 8 | 9 | def LayerNorm(normalized_shape, eps=1e-5, elementwise_affine=True, export=False): 10 | if not export and torch.cuda.is_available(): 11 | try: 12 | from apex.normalization import FusedLayerNorm 13 | return FusedLayerNorm(normalized_shape, eps, elementwise_affine) 14 | except ImportError: 15 | pass 16 | return torch.nn.LayerNorm(normalized_shape, eps, elementwise_affine) 17 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/lightconv_layer/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from .lightconv_layer import LightconvLayer # noqa 7 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/lightconv_layer/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/lightconv_layer/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/lightconv_layer/__pycache__/cuda_function_gen.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/lightconv_layer/__pycache__/cuda_function_gen.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/lightconv_layer/__pycache__/lightconv_layer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/lightconv_layer/__pycache__/lightconv_layer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/lightconv_layer/__pycache__/setup.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/modules/lightconv_layer/__pycache__/setup.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/lightconv_layer/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | # 4 | # This source code is licensed under the MIT license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | from setuptools import setup 8 | from torch.utils.cpp_extension import CUDAExtension, BuildExtension 9 | 10 | setup( 11 | name='lightconv_layer', 12 | ext_modules=[ 13 | CUDAExtension('lightconv_cuda', [ 14 | 'lightconv_cuda.cpp', 15 | 'lightconv_cuda_kernel.cu', 16 | ]), 17 | ], 18 | cmdclass={ 19 | 'build_ext': BuildExtension 20 | }) 21 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/logsumexp_moe.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch 7 | 8 | 9 | class LogSumExpMoE(torch.autograd.Function): 10 | """Standard LogSumExp forward pass, but use *posterior* for the backward. 11 | 12 | See `"Mixture Models for Diverse Machine Translation: Tricks of the Trade" 13 | (Shen et al., 2019) `_. 14 | """ 15 | 16 | @staticmethod 17 | def forward(ctx, logp, posterior, dim=-1): 18 | ctx.save_for_backward(posterior) 19 | ctx.dim = dim 20 | return torch.logsumexp(logp, dim=dim) 21 | 22 | @staticmethod 23 | def backward(ctx, grad_output): 24 | posterior, = ctx.saved_tensors 25 | grad_logp = grad_output.unsqueeze(ctx.dim) * posterior 26 | return grad_logp, None, None 27 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/positional_embedding.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch.nn as nn 7 | 8 | from .learned_positional_embedding import LearnedPositionalEmbedding 9 | from .sinusoidal_positional_embedding import SinusoidalPositionalEmbedding 10 | 11 | 12 | def PositionalEmbedding( 13 | num_embeddings: int, 14 | embedding_dim: int, 15 | padding_idx: int, 16 | learned: bool = False, 17 | ): 18 | if learned: 19 | # if padding_idx is specified then offset the embedding ids by 20 | # this index and adjust num_embeddings appropriately 21 | # TODO: The right place for this offset would be inside 22 | # LearnedPositionalEmbedding. Move this there for a cleaner implementation. 23 | if padding_idx is not None: 24 | num_embeddings = num_embeddings + padding_idx + 1 25 | m = LearnedPositionalEmbedding(num_embeddings, embedding_dim, padding_idx) 26 | nn.init.normal_(m.weight, mean=0, std=embedding_dim ** -0.5) 27 | if padding_idx is not None: 28 | nn.init.constant_(m.weight[padding_idx], 0) 29 | else: 30 | m = SinusoidalPositionalEmbedding( 31 | embedding_dim, padding_idx, init_size=num_embeddings + padding_idx + 1, 32 | ) 33 | return m 34 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/scalar_bias.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | # 6 | 7 | import torch 8 | 9 | 10 | class ScalarBias(torch.autograd.Function): 11 | """ 12 | Adds a vector of scalars, used in self-attention mechanism to allow 13 | the model to optionally attend to this vector instead of the past 14 | """ 15 | 16 | @staticmethod 17 | def forward(ctx, input, dim, bias_init): 18 | size = list(input.size()) 19 | size[dim] += 1 20 | output = input.new(*size).fill_(bias_init) 21 | output.narrow(dim, 1, size[dim] - 1).copy_(input) 22 | ctx.dim = dim 23 | return output 24 | 25 | @staticmethod 26 | def backward(ctx, grad): 27 | return grad.narrow(ctx.dim, 1, grad.size(ctx.dim) - 1), None, None 28 | 29 | 30 | def scalar_bias(input, dim, bias_init=0): 31 | return ScalarBias.apply(input, dim, bias_init) 32 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/modules/unfold.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch.nn.functional as F 7 | 8 | 9 | def unfold1d(x, kernel_size, padding_l, pad_value=0): 10 | '''unfold T x B x C to T x B x C x K''' 11 | if kernel_size > 1: 12 | T, B, C = x.size() 13 | x = F.pad(x, (0, 0, 0, 0, padding_l, kernel_size - 1 - padding_l), value=pad_value) 14 | x = x.as_strided((T, B, C, kernel_size), (B*C, C, 1, B*C)) 15 | else: 16 | x = x.unsqueeze(3) 17 | return x 18 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import importlib 7 | import os 8 | 9 | from fairseq import registry 10 | from fairseq.optim.fairseq_optimizer import FairseqOptimizer 11 | from fairseq.optim.fp16_optimizer import FP16Optimizer, MemoryEfficientFP16Optimizer 12 | from fairseq.optim.bmuf import FairseqBMUF # noqa 13 | 14 | 15 | __all__ = [ 16 | 'FairseqOptimizer', 17 | 'FP16Optimizer', 18 | 'MemoryEfficientFP16Optimizer', 19 | ] 20 | 21 | 22 | build_optimizer, register_optimizer, OPTIMIZER_REGISTRY = registry.setup_registry( 23 | '--optimizer', 24 | base_class=FairseqOptimizer, 25 | default='nag', 26 | ) 27 | 28 | 29 | # automatically import any Python files in the optim/ directory 30 | for file in os.listdir(os.path.dirname(__file__)): 31 | if file.endswith('.py') and not file.startswith('_'): 32 | module = file[:file.find('.py')] 33 | importlib.import_module('fairseq.optim.' + module) 34 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/adadelta.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/adadelta.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/adafactor.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/adafactor.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/adagrad.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/adagrad.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/adam.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/adam.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/adamax.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/adamax.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/bmuf.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/bmuf.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/fairseq_optimizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/fairseq_optimizer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/fp16_optimizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/fp16_optimizer.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/nag.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/nag.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/__pycache__/sgd.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/__pycache__/sgd.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/adagrad.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch.optim 7 | 8 | from . import FairseqOptimizer, register_optimizer 9 | 10 | 11 | @register_optimizer('adagrad') 12 | class Adagrad(FairseqOptimizer): 13 | def __init__(self, args, params): 14 | super().__init__(args) 15 | self._optimizer = torch.optim.Adagrad(params, **self.optimizer_config) 16 | 17 | @staticmethod 18 | def add_args(parser): 19 | """Add optimizer-specific arguments to the parser.""" 20 | # fmt: off 21 | parser.add_argument('--weight-decay', '--wd', default=0.0, type=float, metavar='WD', 22 | help='weight decay') 23 | # fmt: on 24 | 25 | @property 26 | def optimizer_config(self): 27 | """ 28 | Return a kwarg dictionary that will be used to override optimizer 29 | args stored in checkpoints. This allows us to load a checkpoint and 30 | resume training using a different set of optimizer args, e.g., with a 31 | different learning rate. 32 | """ 33 | return { 34 | 'lr': self.args.lr[0], 35 | 'weight_decay': self.args.weight_decay, 36 | } 37 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import importlib 7 | import os 8 | 9 | from fairseq import registry 10 | from fairseq.optim.lr_scheduler.fairseq_lr_scheduler import FairseqLRScheduler 11 | 12 | 13 | build_lr_scheduler, register_lr_scheduler, LR_SCHEDULER_REGISTRY = registry.setup_registry( 14 | '--lr-scheduler', 15 | base_class=FairseqLRScheduler, 16 | default='fixed', 17 | ) 18 | 19 | # automatically import any Python files in the optim/lr_scheduler/ directory 20 | for file in os.listdir(os.path.dirname(__file__)): 21 | if file.endswith('.py') and not file.startswith('_'): 22 | module = file[:file.find('.py')] 23 | importlib.import_module('fairseq.optim.lr_scheduler.' + module) 24 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/lr_scheduler/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__pycache__/cosine_lr_scheduler.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/lr_scheduler/__pycache__/cosine_lr_scheduler.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__pycache__/fairseq_lr_scheduler.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/lr_scheduler/__pycache__/fairseq_lr_scheduler.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__pycache__/fixed_schedule.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/lr_scheduler/__pycache__/fixed_schedule.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__pycache__/inverse_square_root_schedule.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/lr_scheduler/__pycache__/inverse_square_root_schedule.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__pycache__/polynomial_decay_schedule.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/lr_scheduler/__pycache__/polynomial_decay_schedule.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__pycache__/reduce_lr_on_plateau.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/lr_scheduler/__pycache__/reduce_lr_on_plateau.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__pycache__/tri_stage_lr_scheduler.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/lr_scheduler/__pycache__/tri_stage_lr_scheduler.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/__pycache__/triangular_lr_scheduler.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/optim/lr_scheduler/__pycache__/triangular_lr_scheduler.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/lr_scheduler/fairseq_lr_scheduler.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from .. import FairseqOptimizer 7 | 8 | 9 | class FairseqLRScheduler(object): 10 | 11 | def __init__(self, args, optimizer): 12 | super().__init__() 13 | if not isinstance(optimizer, FairseqOptimizer): 14 | raise ValueError('optimizer must be an instance of FairseqOptimizer') 15 | self.args = args 16 | self.optimizer = optimizer 17 | self.best = None 18 | 19 | @staticmethod 20 | def add_args(parser): 21 | """Add arguments to the parser for this LR scheduler.""" 22 | pass 23 | 24 | def state_dict(self): 25 | """Return the LR scheduler state dict.""" 26 | return {'best': self.best} 27 | 28 | def load_state_dict(self, state_dict): 29 | """Load an LR scheduler state dict.""" 30 | self.best = state_dict['best'] 31 | 32 | def step(self, epoch, val_loss=None): 33 | """Update the learning rate at the end of the given epoch.""" 34 | if val_loss is not None: 35 | if self.best is None: 36 | self.best = val_loss 37 | else: 38 | self.best = min(self.best, val_loss) 39 | 40 | def step_update(self, num_updates): 41 | """Update the learning rate after each update.""" 42 | return self.optimizer.get_lr() 43 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/optim/sgd.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import torch.optim 7 | 8 | from . import FairseqOptimizer, register_optimizer 9 | 10 | 11 | @register_optimizer('sgd') 12 | class SGD(FairseqOptimizer): 13 | def __init__(self, args, params): 14 | super().__init__(args) 15 | self._optimizer = torch.optim.SGD(params, **self.optimizer_config) 16 | 17 | @staticmethod 18 | def add_args(parser): 19 | """Add optimizer-specific arguments to the parser.""" 20 | # fmt: off 21 | parser.add_argument('--momentum', default=0.0, type=float, metavar='M', 22 | help='momentum factor') 23 | parser.add_argument('--weight-decay', '--wd', default=0.0, type=float, metavar='WD', 24 | help='weight decay') 25 | # fmt: on 26 | 27 | @property 28 | def optimizer_config(self): 29 | """ 30 | Return a kwarg dictionary that will be used to override optimizer 31 | args stored in checkpoints. This allows us to load a checkpoint and 32 | resume training using a different set of optimizer args, e.g., with a 33 | different learning rate. 34 | """ 35 | return { 36 | 'lr': self.args.lr[0], 37 | 'momentum': self.args.momentum, 38 | 'weight_decay': self.args.weight_decay, 39 | } 40 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/pdb.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import multiprocessing 7 | import os 8 | import pdb 9 | import sys 10 | 11 | 12 | __all__ = ['set_trace'] 13 | 14 | 15 | _stdin = [None] 16 | _stdin_lock = multiprocessing.Lock() 17 | try: 18 | _stdin_fd = sys.stdin.fileno() 19 | except Exception: 20 | _stdin_fd = None 21 | 22 | 23 | class MultiprocessingPdb(pdb.Pdb): 24 | """A Pdb wrapper that works in a multiprocessing environment. 25 | 26 | Usage: `from fairseq import pdb; pdb.set_trace()` 27 | """ 28 | 29 | def __init__(self): 30 | pdb.Pdb.__init__(self, nosigint=True) 31 | 32 | def _cmdloop(self): 33 | stdin_bak = sys.stdin 34 | with _stdin_lock: 35 | try: 36 | if _stdin_fd is not None: 37 | if not _stdin[0]: 38 | _stdin[0] = os.fdopen(_stdin_fd) 39 | sys.stdin = _stdin[0] 40 | self.cmdloop() 41 | finally: 42 | sys.stdin = stdin_bak 43 | 44 | 45 | def set_trace(): 46 | pdb = MultiprocessingPdb() 47 | pdb.set_trace(sys._getframe().f_back) 48 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/audio_pretraining.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/audio_pretraining.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/cross_lingual_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/cross_lingual_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/denoising.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/denoising.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/fairseq_task.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/fairseq_task.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/language_modeling.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/language_modeling.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/legacy_masked_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/legacy_masked_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/masked_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/masked_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/multilingual_masked_lm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/multilingual_masked_lm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/multilingual_translation.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/multilingual_translation.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/semisupervised_translation.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/semisupervised_translation.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/sentence_prediction.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/sentence_prediction.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/sentence_ranking.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/sentence_ranking.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/smiles_prediction.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/smiles_prediction.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/translation.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/translation.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/translation_from_pretrained_xlm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/translation_from_pretrained_xlm.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/translation_lev.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/translation_lev.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/__pycache__/translation_moe.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/agbt_pro/fairseq/tasks/__pycache__/translation_moe.cpython-37.pyc -------------------------------------------------------------------------------- /agbt_pro/fairseq/tasks/translation_from_pretrained_xlm.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from fairseq.data.legacy.masked_lm_dictionary import MaskedLMDictionary 7 | from fairseq.tasks.translation import TranslationTask 8 | 9 | from . import register_task 10 | 11 | 12 | @register_task("translation_from_pretrained_xlm") 13 | class TranslationFromPretrainedXLMTask(TranslationTask): 14 | """ 15 | Same as TranslationTask except use the MaskedLMDictionary class so that 16 | we can load data that was binarized with the MaskedLMDictionary class. 17 | 18 | This task should be used for the entire training pipeline when we want to 19 | train an NMT model from a pretrained XLM checkpoint: binarizing NMT data, 20 | training NMT with the pretrained XLM checkpoint, and subsequent evaluation 21 | of that trained model. 22 | """ 23 | 24 | @classmethod 25 | def load_dictionary(cls, filename): 26 | """Load the masked LM dictionary from the filename 27 | 28 | Args: 29 | filename (str): the filename 30 | """ 31 | return MaskedLMDictionary.load(filename) 32 | -------------------------------------------------------------------------------- /agbt_pro/fairseq/tokenizer.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | import re 7 | 8 | SPACE_NORMALIZER = re.compile(r"\s+") 9 | SMI_SYMBOLS = r"Li|Be|Na|Mg|Al|Si|Cl|Ca|Zn|As|Se|se|Br|Rb|Sr|Ag|Sn|Te|te|Cs|Ba|Bi|[\d]|" + \ 10 | r"[HBCNOFPSKIbcnops#%\)\(\+\-\\\/\.=@\[\]]" 11 | 12 | 13 | def tokenize_line(line): 14 | line = SPACE_NORMALIZER.sub(" ", line) 15 | line = line.strip() 16 | return line.split() 17 | 18 | 19 | def tokenize_smiles(line): 20 | line = re.findall(SMI_SYMBOLS, line.strip()) 21 | return line 22 | 23 | 24 | if __name__ == "__main__": 25 | print('End!') 26 | -------------------------------------------------------------------------------- /agbt_pro/setup.py: -------------------------------------------------------------------------------- 1 | # setup file 2 | # run: python setup.py build_ext --inplace 3 | 4 | 5 | from distutils.core import setup, Extension 6 | import sys 7 | import numpy as np 8 | from Cython.Build import cythonize 9 | 10 | 11 | if sys.platform == 'darwin': 12 | extra_compile_args = ['-stdlib=libc++', '-O3'] 13 | else: 14 | extra_compile_args = ['-std=c++11', '-O3'] 15 | 16 | extensions = [ 17 | Extension( 18 | 'fairseq.libbleu', 19 | sources=[ 20 | 'fairseq/clib/libbleu/libbleu.cpp', 21 | 'fairseq/clib/libbleu/module.cpp', 22 | ], 23 | extra_compile_args=extra_compile_args 24 | ) 25 | ] 26 | 27 | extensions = extensions \ 28 | + cythonize('fairseq/data/data_utils_fast.pyx') \ 29 | + cythonize('fairseq/data/token_block_utils_fast.pyx') 30 | 31 | 32 | setup( 33 | name="necessary_modules", 34 | ext_modules=extensions, 35 | include_dirs=[np.get_include()]*3, 36 | ) 37 | -------------------------------------------------------------------------------- /agbt_pro/test_temp.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | from fairseq.models.roberta import RobertaModel 4 | 5 | 6 | def load_pretrain_model(model_name_or_path, checkpoint_file, data_name_or_path, bpe='smi'): 7 | '''Currently only load to cpu()''' 8 | 9 | # load model 10 | pretrain_model = RobertaModel.from_pretrained( 11 | model_name_or_path, 12 | checkpoint_file, 13 | data_name_or_path, # dict_dir, 14 | bpe='smi', 15 | ) 16 | pretrain_model.eval() 17 | return pretrain_model 18 | 19 | 20 | def main(): 21 | '''estimate memory usage''' 22 | model_name_or_path = "/gpfs/wscgpfs02/chendo11/workspace/chembl27_pubchem_zinc_pretrain/Result/Model_chembl27_pubchem_zinc_embed_512/" 23 | checkpoint_file = 'checkpoint_best.pt' 24 | data_name_or_path = "/gpfs/wscgpfs02/chendo11/workspace/chembl27_pubchem_zinc_pretrain/Dataset/pubchem_chembl27_zinc_combine/" 25 | 26 | pretrain_model = load_pretrain_model( 27 | model_name_or_path, checkpoint_file, data_name_or_path) 28 | 29 | pretrain_model.cuda() 30 | tokens = pretrain_model.encode('CCCCCCCC').cuda() 31 | _, all_layer_hiddens = pretrain_model.model( 32 | tokens.unsqueeze(0), features_only=True, return_all_hiddens=True) 33 | 34 | print(f'predict result: {tokens}') 35 | print(f'gpu memory usage: {torch.cuda.memory_allocated()}') 36 | print(f'gpu max memory usage: {torch.cuda.max_memory_allocated()}') 37 | 38 | 39 | if __name__ == "__main__": 40 | main() 41 | print('End!') 42 | -------------------------------------------------------------------------------- /examples/data/dict.txt: -------------------------------------------------------------------------------- 1 | c 23448678 2 | C 19691323 3 | ( 10563644 4 | ) 10563644 5 | O 6702959 6 | 1 5781106 7 | 2 4539428 8 | = 4338302 9 | N 4035699 10 | @ 3091178 11 | [ 2650595 12 | ] 2650595 13 | n 2579655 14 | 3 2342587 15 | H 2095167 16 | F 807014 17 | 4 795803 18 | - 746074 19 | S 535951 20 | Cl 488138 21 | / 452099 22 | s 226056 23 | o 218015 24 | 5 210447 25 | + 162460 26 | # 125574 27 | . 125055 28 | \ 102859 29 | Br 100554 30 | 6 52154 31 | P 48606 32 | I 18135 33 | 7 16129 34 | Na 13130 35 | % 11788 36 | 8 8046 37 | B 4056 38 | 9 3918 39 | Si 3537 40 | 0 2813 41 | Se 1587 42 | K 1494 43 | se 887 44 | Li 533 45 | As 247 46 | Zn 155 47 | Ca 147 48 | Mg 122 49 | Al 111 50 | Te 87 51 | te 65 52 | madeupword0000 0 53 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/106-46-7.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 5.9081 -1.0075 0.1497 Cl 1 UNK -0.1800 10 | 2 C2 4.1830 -1.0131 0.1186 C.ar 1 UNK 0.1800 11 | 3 C3 3.4747 0.2046 0.0905 C.ar 1 UNK -0.1150 12 | 4 C4 3.4821 -2.2355 0.1213 C.ar 1 UNK -0.1150 13 | 5 C5 2.0660 0.2000 0.0651 C.ar 1 UNK -0.1150 14 | 6 C6 2.0735 -2.2401 0.0959 C.ar 1 UNK -0.1150 15 | 7 C7 1.3651 -1.0224 0.0678 C.ar 1 UNK 0.1800 16 | 8 Cl8 -0.3599 -1.0280 0.0367 Cl 1 UNK -0.1800 17 | 9 H9 4.0104 1.1425 0.0884 H 1 UNK 0.1150 18 | 10 H10 4.0235 -3.1699 0.1428 H 1 UNK 0.1150 19 | 11 H11 1.5246 1.1344 0.0436 H 1 UNK 0.1150 20 | 12 H12 1.5378 -3.1780 0.0980 H 1 UNK 0.1150 21 | @BOND 22 | 1 1 2 1 23 | 2 2 3 ar 24 | 3 2 4 ar 25 | 4 3 5 ar 26 | 5 3 9 1 27 | 6 4 6 ar 28 | 7 4 10 1 29 | 8 5 7 ar 30 | 9 5 11 1 31 | 10 6 7 ar 32 | 11 6 12 1 33 | 12 7 8 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/106-89-8.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 10 10 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 0.1528 -2.0527 -0.3386 Cl 1 UNK -0.2000 10 | 2 C2 1.2284 -1.0872 0.7029 C.3 1 UNK -0.0060 11 | 3 C3 2.2921 -0.4008 -0.1253 C.3 1 UNK 0.1162 12 | 4 C4 3.6421 -0.0410 0.4355 C.3 1 UNK 0.0562 13 | 5 O5 3.4596 -1.1828 -0.4128 O.3 1 UNK -0.3524 14 | 6 H6 1.6792 -1.7500 1.4422 H 1 UNK 0.1030 15 | 7 H7 0.6201 -0.3452 1.2200 H 1 UNK 0.1030 16 | 8 H8 1.9309 0.1932 -0.9626 H 1 UNK 0.0600 17 | 9 H9 3.8680 -0.2792 1.4730 H 1 UNK 0.0600 18 | 10 H10 4.2020 0.7745 -0.0178 H 1 UNK 0.0600 19 | @BOND 20 | 1 1 2 1 21 | 2 2 3 1 22 | 3 2 6 1 23 | 4 2 7 1 24 | 5 3 4 1 25 | 6 3 5 1 26 | 7 3 8 1 27 | 8 4 5 1 28 | 9 4 9 1 29 | 10 4 10 1 30 | @SUBSTRUCTURE 31 | 1 UNK 1 GROUP 0 **** 0 ROOT 32 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/107-03-9.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 11 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 1.5065 0.2782 0.0803 C.3 1 UNK 0.0600 10 | 2 C2 2.1222 -1.1274 0.0882 C.3 1 UNK -0.1200 11 | 3 S3 -0.2997 0.1414 0.0302 S.3 1 UNK -0.3350 12 | 4 C4 3.6539 -1.0959 0.1301 C.3 1 UNK -0.1800 13 | 5 H5 1.7978 0.8339 0.9721 H 1 UNK 0.0600 14 | 6 H6 1.8458 0.8451 -0.7872 H 1 UNK 0.0600 15 | 7 H7 1.7521 -1.6860 0.9487 H 1 UNK 0.0600 16 | 8 H8 1.7997 -1.6749 -0.7983 H 1 UNK 0.0600 17 | 9 H9 -0.5409 1.4556 0.0319 H 1 UNK 0.1550 18 | 10 H10 4.0632 -2.1063 0.1349 H 1 UNK 0.0600 19 | 11 H11 4.0611 -0.5762 -0.7376 H 1 UNK 0.0600 20 | 12 H12 4.0130 -0.5874 1.0253 H 1 UNK 0.0600 21 | @BOND 22 | 1 1 2 1 23 | 2 1 3 1 24 | 3 1 5 1 25 | 4 1 6 1 26 | 5 2 4 1 27 | 6 2 7 1 28 | 7 2 8 1 29 | 8 3 9 1 30 | 9 4 10 1 31 | 10 4 11 1 32 | 11 4 12 1 33 | @SUBSTRUCTURE 34 | 1 UNK 1 GROUP 0 **** 0 ROOT 35 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/107-06-2.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 8 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 -0.3042 0.1835 0.1025 Cl 1 UNK -0.2000 10 | 2 C2 1.2512 -0.6853 0.0953 C.3 1 UNK -0.0060 11 | 3 C3 2.4139 0.3109 0.0722 C.3 1 UNK -0.0060 12 | 4 Cl4 3.9693 -0.5580 0.0650 Cl 1 UNK -0.2000 13 | 5 H5 1.2670 -1.3337 -0.7812 H 1 UNK 0.1030 14 | 6 H6 1.2858 -1.3148 0.9849 H 1 UNK 0.1030 15 | 7 H7 2.3793 0.9403 -0.8174 H 1 UNK 0.1030 16 | 8 H8 2.3981 0.9592 0.9487 H 1 UNK 0.1030 17 | @BOND 18 | 1 1 2 1 19 | 2 2 3 1 20 | 3 2 5 1 21 | 4 2 6 1 22 | 5 3 4 1 23 | 6 3 7 1 24 | 7 3 8 1 25 | @SUBSTRUCTURE 26 | 1 UNK 1 GROUP 0 **** 0 ROOT 27 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/107-07-3.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 9 8 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 -0.1938 0.2079 0.1043 Cl 1 UNK -0.2000 10 | 2 C2 1.3276 -0.7196 0.0962 C.3 1 UNK -0.0060 11 | 3 C3 2.5284 0.2317 0.0763 C.3 1 UNK 0.1450 12 | 4 O4 3.7259 -0.5149 0.0701 O.3 1 UNK -0.6830 13 | 5 H5 1.3183 -1.3664 -0.7817 H 1 UNK 0.1030 14 | 6 H6 1.3363 -1.3523 0.9843 H 1 UNK 0.1030 15 | 7 H7 2.4990 0.8688 -0.8081 H 1 UNK 0.0600 16 | 8 H8 2.5170 0.8828 0.9510 H 1 UNK 0.0600 17 | 9 H9 4.4560 0.0854 0.0578 H 1 UNK 0.4180 18 | @BOND 19 | 1 1 2 1 20 | 2 2 3 1 21 | 3 2 5 1 22 | 4 2 6 1 23 | 5 3 4 1 24 | 6 3 7 1 25 | 7 3 8 1 26 | 8 4 9 1 27 | @SUBSTRUCTURE 28 | 1 UNK 1 GROUP 0 **** 0 ROOT 29 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/107-11-9.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 11 10 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 N1 0.1197 0.2481 0.3454 N.3 1 UNK -0.9000 10 | 2 C2 1.1594 -0.6307 -0.1494 C.3 1 UNK 0.0600 11 | 3 C3 2.4929 0.0828 -0.1788 C.2 1 UNK -0.1150 12 | 4 C4 3.6214 -0.4022 0.3599 C.2 1 UNK -0.2300 13 | 5 H5 -0.7687 -0.2324 0.3238 H 1 UNK 0.3600 14 | 6 H6 0.2988 0.4694 1.3146 H 1 UNK 0.3600 15 | 7 H7 1.2162 -1.5250 0.4722 H 1 UNK 0.0600 16 | 8 H8 0.9046 -0.9464 -1.1613 H 1 UNK 0.0600 17 | 9 H9 2.5161 1.0394 -0.6808 H 1 UNK 0.1150 18 | 10 H10 4.5464 0.1524 0.3025 H 1 UNK 0.1150 19 | 11 H11 3.6373 -1.3571 0.8645 H 1 UNK 0.1150 20 | @BOND 21 | 1 1 2 1 22 | 2 1 5 1 23 | 3 1 6 1 24 | 4 2 3 1 25 | 5 2 7 1 26 | 6 2 8 1 27 | 7 3 4 2 28 | 8 3 9 1 29 | 9 4 10 1 30 | 10 4 11 1 31 | @SUBSTRUCTURE 32 | 1 UNK 1 GROUP 0 **** 0 ROOT 33 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/107-15-3.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 11 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 N1 -0.0097 0.1974 0.0641 N.3 1 UNK -0.9000 10 | 2 C2 1.2094 -0.6222 0.0704 C.3 1 UNK 0.0600 11 | 3 C3 2.4816 0.2316 0.1015 C.3 1 UNK 0.0600 12 | 4 N4 3.7005 -0.5881 0.1174 N.3 1 UNK -0.9000 13 | 5 H5 -0.8380 -0.3962 0.0716 H 1 UNK 0.3600 14 | 6 H6 -0.0532 0.7790 0.8997 H 1 UNK 0.3600 15 | 7 H7 1.1972 -1.2881 0.9339 H 1 UNK 0.0600 16 | 8 H8 1.2237 -1.2633 -0.8117 H 1 UNK 0.0600 17 | 9 H9 2.4967 0.8926 -0.7658 H 1 UNK 0.0600 18 | 10 H10 2.4646 0.8777 0.9798 H 1 UNK 0.0600 19 | 11 H11 4.5279 0.0049 0.1661 H 1 UNK 0.3600 20 | 12 H12 3.7162 -1.1886 0.9405 H 1 UNK 0.3600 21 | @BOND 22 | 1 1 2 1 23 | 2 1 5 1 24 | 3 1 6 1 25 | 4 2 3 1 26 | 5 2 7 1 27 | 6 2 8 1 28 | 7 3 4 1 29 | 8 3 9 1 30 | 9 3 10 1 31 | 10 4 11 1 32 | 11 4 12 1 33 | @SUBSTRUCTURE 34 | 1 UNK 1 GROUP 0 **** 0 ROOT 35 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/107-21-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 10 9 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 1.1401 -0.4813 -0.4422 C.3 1 UNK 0.1450 10 | 2 C2 2.5597 0.1033 -0.4415 C.3 1 UNK 0.1450 11 | 3 O3 0.3493 0.1501 0.5432 O.3 1 UNK -0.6830 12 | 4 O4 3.3306 -0.4817 0.5874 O.3 1 UNK -0.6830 13 | 5 H5 0.6687 -0.3012 -1.4087 H 1 UNK 0.0600 14 | 6 H6 1.1524 -1.5609 -0.2873 H 1 UNK 0.0600 15 | 7 H7 3.0501 -0.1210 -1.3892 H 1 UNK 0.0600 16 | 8 H8 2.5449 1.1889 -0.3368 H 1 UNK 0.0600 17 | 9 H9 -0.5121 -0.2384 0.5330 H 1 UNK 0.4180 18 | 10 H10 4.1922 -0.0937 0.5764 H 1 UNK 0.4180 19 | @BOND 20 | 1 1 2 1 21 | 2 1 3 1 22 | 3 1 5 1 23 | 4 1 6 1 24 | 5 2 4 1 25 | 6 2 7 1 26 | 7 2 8 1 27 | 8 3 9 1 28 | 9 4 10 1 29 | @SUBSTRUCTURE 30 | 1 UNK 1 GROUP 0 **** 0 ROOT 31 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/108-90-7.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 -0.3032 -0.9922 0.1159 Cl 1 UNK -0.1800 10 | 2 C2 1.4221 -1.0055 0.1032 C.ar 1 UNK 0.1800 11 | 3 C3 2.1362 0.2091 0.0821 C.ar 1 UNK -0.1150 12 | 4 C4 2.1176 -2.2309 0.1139 C.ar 1 UNK -0.1150 13 | 5 C5 3.5449 0.1982 0.0717 C.ar 1 UNK -0.1150 14 | 6 C6 3.5264 -2.2417 0.1035 C.ar 1 UNK -0.1150 15 | 7 C7 4.2400 -1.0272 0.0824 C.ar 1 UNK -0.1150 16 | 8 H8 1.6046 1.1494 0.0739 H 1 UNK 0.1150 17 | 9 H9 1.5718 -3.1629 0.1301 H 1 UNK 0.1150 18 | 10 H10 4.0920 1.1294 0.0555 H 1 UNK 0.1150 19 | 11 H11 4.0593 -3.1812 0.1117 H 1 UNK 0.1150 20 | 12 H12 5.3201 -1.0355 0.0745 H 1 UNK 0.1150 21 | @BOND 22 | 1 1 2 1 23 | 2 2 3 ar 24 | 3 2 4 ar 25 | 4 3 5 ar 26 | 5 3 8 1 27 | 6 4 6 ar 28 | 7 4 9 1 29 | 8 5 7 ar 30 | 9 5 10 1 31 | 10 6 7 ar 32 | 11 6 11 1 33 | 12 7 12 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/110-02-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 9 9 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 1.9377 0.1782 0.0690 C.2 1 UNK -0.0738 10 | 2 C2 2.4380 -1.0972 0.1016 C.2 1 UNK -0.3255 11 | 3 C3 0.5119 0.2130 0.0638 C.2 1 UNK -0.0738 12 | 4 S4 1.1640 -2.2869 0.1268 S.3 1 UNK 0.0328 13 | 5 C5 -0.0502 -1.0364 0.0926 C.2 1 UNK -0.3255 14 | 6 H6 2.5374 1.0763 0.0489 H 1 UNK 0.1211 15 | 7 H7 3.4718 -1.4097 0.1124 H 1 UNK 0.2618 16 | 8 H8 -0.0431 1.1393 0.0394 H 1 UNK 0.1211 17 | 9 H9 -1.0981 -1.2981 0.0958 H 1 UNK 0.2618 18 | @BOND 19 | 1 1 2 2 20 | 2 1 3 1 21 | 3 1 6 1 22 | 4 2 4 1 23 | 5 2 7 1 24 | 6 3 5 2 25 | 7 3 8 1 26 | 8 4 5 1 27 | 9 5 9 1 28 | @SUBSTRUCTURE 29 | 1 UNK 1 GROUP 0 **** 0 ROOT 30 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/110-86-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 11 11 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 N1 2.4806 -1.8991 0.0696 N.ar 1 UNK -0.6780 10 | 2 C2 1.2952 -2.5459 0.0859 C.ar 1 UNK 0.4730 11 | 3 C3 2.4630 -0.5487 0.0707 C.ar 1 UNK 0.4730 12 | 4 C4 0.0521 -1.8823 0.1039 C.ar 1 UNK -0.4470 13 | 5 C5 1.2753 0.2095 0.0880 C.ar 1 UNK -0.4470 14 | 6 C6 0.0443 -0.4742 0.1049 C.ar 1 UNK 0.2270 15 | 7 H7 1.3384 -3.6250 0.0846 H 1 UNK 0.0120 16 | 8 H8 3.4246 -0.0572 0.0575 H 1 UNK 0.0120 17 | 9 H9 -0.8720 -2.4410 0.1166 H 1 UNK 0.1550 18 | 10 H10 1.3090 1.2888 0.0882 H 1 UNK 0.1550 19 | 11 H11 -0.8879 0.0710 0.1184 H 1 UNK 0.0650 20 | @BOND 21 | 1 1 2 ar 22 | 2 1 3 ar 23 | 3 2 4 ar 24 | 4 2 7 1 25 | 5 3 5 ar 26 | 6 3 8 1 27 | 7 4 6 ar 28 | 8 4 9 1 29 | 9 5 6 ar 30 | 10 5 10 1 31 | 11 6 11 1 32 | @SUBSTRUCTURE 33 | 1 UNK 1 GROUP 0 **** 0 ROOT 34 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/115-20-8.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 9 8 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 1.2925 -0.9463 -0.0297 C.3 1 UNK -0.2944 10 | 2 Cl2 1.5273 -2.1828 -1.2945 Cl 1 UNK 0.0120 11 | 3 Cl3 0.5988 -1.6989 1.4317 Cl 1 UNK 0.0120 12 | 4 Cl4 0.1695 0.2989 -0.6332 Cl 1 UNK 0.0120 13 | 5 C5 2.6356 -0.2775 0.3090 C.3 1 UNK 0.4034 14 | 6 O6 3.5714 -1.2186 0.7948 O.3 1 UNK -0.6830 15 | 7 H7 3.0528 0.2068 -0.5746 H 1 UNK 0.0600 16 | 8 H8 2.4949 0.4975 1.0633 H 1 UNK 0.0600 17 | 9 H9 4.3786 -0.7677 0.9897 H 1 UNK 0.4180 18 | @BOND 19 | 1 1 2 1 20 | 2 1 3 1 21 | 3 1 4 1 22 | 4 1 5 1 23 | 5 5 6 1 24 | 6 5 7 1 25 | 7 5 8 1 26 | 8 6 9 1 27 | @SUBSTRUCTURE 28 | 1 UNK 1 GROUP 0 **** 0 ROOT 29 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/124-40-3.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 10 9 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 0.0567 -0.9668 0.1069 C.3 1 UNK 0.0200 10 | 2 N2 1.5022 -1.1076 0.0977 N.3 1 UNK -0.7800 11 | 3 C3 2.1200 0.2063 0.0648 C.3 1 UNK 0.0200 12 | 4 H4 -0.4122 -1.9507 0.1284 H 1 UNK 0.0600 13 | 5 H5 -0.2763 -0.4124 0.9852 H 1 UNK 0.0600 14 | 6 H6 -0.2896 -0.4458 -0.7865 H 1 UNK 0.0600 15 | 7 H7 1.8009 -1.6032 0.9261 H 1 UNK 0.3800 16 | 8 H8 3.2054 0.1063 0.0545 H 1 UNK 0.0600 17 | 9 H9 1.8218 0.7547 -0.8296 H 1 UNK 0.0600 18 | 10 H10 1.8410 0.7914 0.9420 H 1 UNK 0.0600 19 | @BOND 20 | 1 1 2 1 21 | 2 1 4 1 22 | 3 1 5 1 23 | 4 1 6 1 24 | 5 2 3 1 25 | 6 2 7 1 26 | 7 3 8 1 27 | 8 3 9 1 28 | 9 3 10 1 29 | @SUBSTRUCTURE 30 | 1 UNK 1 GROUP 0 **** 0 ROOT 31 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/127-18-4.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 6 5 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 1.2746 0.5257 0.1601 Cl 1 UNK -0.0600 10 | 2 C2 2.0839 -0.9996 0.1316 C.2 1 UNK 0.1200 11 | 3 C3 1.4457 -2.1811 0.0780 C.2 1 UNK 0.1200 12 | 4 Cl4 3.8028 -0.8408 0.1794 Cl 1 UNK -0.0600 13 | 5 Cl5 2.2549 -3.7064 0.0495 Cl 1 UNK -0.0600 14 | 6 Cl6 -0.2733 -2.3399 0.0302 Cl 1 UNK -0.0600 15 | @BOND 16 | 1 1 2 1 17 | 2 2 3 2 18 | 3 2 4 1 19 | 4 3 5 1 20 | 5 3 6 1 21 | @SUBSTRUCTURE 22 | 1 UNK 1 GROUP 0 **** 0 ROOT 23 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/142-28-9.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 11 10 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 5.1455 -0.7123 0.1057 Cl 1 UNK -0.2000 10 | 2 C2 3.7005 0.3300 0.0905 C.3 1 UNK -0.0060 11 | 3 C3 2.4284 -0.5260 0.0955 C.3 1 UNK -0.1200 12 | 4 C4 1.1509 0.3219 0.0828 C.3 1 UNK -0.0060 13 | 5 Cl5 -0.2875 -0.7294 0.0893 Cl 1 UNK -0.2000 14 | 6 H6 3.7540 0.9583 -0.7990 H 1 UNK 0.1030 15 | 7 H7 3.7487 0.9766 0.9671 H 1 UNK 0.1030 16 | 8 H8 2.4331 -1.1874 -0.7717 H 1 UNK 0.0600 17 | 9 H9 2.4278 -1.1693 0.9762 H 1 UNK 0.0600 18 | 10 H10 1.0934 0.9682 0.9591 H 1 UNK 0.1030 19 | 11 H11 1.0988 0.9499 -0.8070 H 1 UNK 0.1030 20 | @BOND 21 | 1 1 2 1 22 | 2 2 3 1 23 | 3 2 6 1 24 | 4 2 7 1 25 | 5 3 4 1 26 | 6 3 8 1 27 | 7 3 9 1 28 | 8 4 5 1 29 | 9 4 10 1 30 | 10 4 11 1 31 | @SUBSTRUCTURE 32 | 1 UNK 1 GROUP 0 **** 0 ROOT 33 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/156-60-5.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 6 5 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 3.0903 0.3817 0.0949 Cl 1 UNK -0.1200 10 | 2 C2 2.1076 -1.0361 0.1074 C.2 1 UNK 0.0050 11 | 3 C3 0.7681 -0.9855 0.1021 C.2 1 UNK 0.0050 12 | 4 Cl4 -0.2147 -2.4034 0.1147 Cl 1 UNK -0.1200 13 | 5 H5 2.6492 -1.9706 0.1199 H 1 UNK 0.1150 14 | 6 H6 0.2264 -0.0511 0.0897 H 1 UNK 0.1150 15 | @BOND 16 | 1 1 2 1 17 | 2 2 3 2 18 | 3 2 5 1 19 | 4 3 4 1 20 | 5 3 6 1 21 | @SUBSTRUCTURE 22 | 1 UNK 1 GROUP 0 **** 0 ROOT 23 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/503-87-7.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 11 11 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 2.8910 1.7413 0.0738 C.2 1 UNK 0.6225 10 | 2 O2 3.8353 2.5272 0.0491 O.2 1 UNK -0.5000 11 | 3 N3 1.5952 2.0451 0.0850 N.am 1 UNK -0.3977 12 | 4 C4 3.0233 0.2309 0.0968 C.3 1 UNK 0.0025 13 | 5 C5 0.7891 0.9653 0.1128 C.2 1 UNK 0.4442 14 | 6 N6 1.6100 -0.1077 0.1200 N.pl3 1 UNK -0.3977 15 | 7 S7 -0.8697 0.9541 0.1338 S.2 1 UNK -0.4762 16 | 8 H8 1.2327 2.9871 0.0742 H 1 UNK 0.2912 17 | 9 H9 3.5390 -0.1171 0.9922 H 1 UNK 0.0600 18 | 10 H10 3.5165 -0.1464 -0.7995 H 1 UNK 0.0600 19 | 11 H11 1.2651 -1.0568 0.1398 H 1 UNK 0.2912 20 | @BOND 21 | 1 1 2 2 22 | 2 1 3 am BACKBONE|DICT|INTERRES 23 | 3 1 4 1 24 | 4 3 5 am BACKBONE|DICT|INTERRES 25 | 5 3 8 1 26 | 6 4 6 1 27 | 7 4 9 1 28 | 8 4 10 1 29 | 9 5 6 1 30 | 10 5 7 2 31 | 11 6 11 1 32 | @SUBSTRUCTURE 33 | 1 UNK 1 GROUP 0 **** 0 ROOT 34 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/506-77-4.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 3 2 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 N1 2.7043 0.1463 0.1627 N.1 1 UNK -0.1225 10 | 2 C2 1.5481 0.1476 0.1199 C.1 1 UNK 0.2750 11 | 3 Cl3 -0.1067 0.1707 0.0390 Cl 1 UNK -0.1525 12 | @BOND 13 | 1 1 2 3 14 | 2 2 3 1 15 | @SUBSTRUCTURE 16 | 1 UNK 1 GROUP 0 **** 0 ROOT 17 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/542-75-6.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 9 8 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 2.4571 -0.3431 0.3215 C.2 1 UNK -0.1150 10 | 2 C2 3.6196 0.1632 -0.1165 C.2 1 UNK 0.0050 11 | 3 C3 1.1166 0.3430 0.1767 C.3 1 UNK -0.0060 12 | 4 Cl4 5.1220 -0.6623 0.0763 Cl 1 UNK -0.1200 13 | 5 Cl5 -0.0529 -0.6574 -0.7195 Cl 1 UNK -0.2000 14 | 6 H6 2.4499 -1.3036 0.8160 H 1 UNK 0.1150 15 | 7 H7 3.6832 1.1187 -0.6165 H 1 UNK 0.1150 16 | 8 H8 0.6956 0.5443 1.1619 H 1 UNK 0.1030 17 | 9 H9 1.2160 1.2929 -0.3497 H 1 UNK 0.1030 18 | @BOND 19 | 1 1 2 2 20 | 2 1 3 1 21 | 3 1 6 1 22 | 4 2 4 1 23 | 5 2 7 1 24 | 6 3 5 1 25 | 7 3 8 1 26 | 8 3 9 1 27 | @SUBSTRUCTURE 28 | 1 UNK 1 GROUP 0 **** 0 ROOT 29 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/542-85-8.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 10 9 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 -0.3735 0.2269 0.0501 C.3 1 UNK -0.1800 10 | 2 C2 0.9444 0.9986 0.1728 C.3 1 UNK 0.1002 11 | 3 N3 2.0591 0.0959 0.0731 N.2 1 UNK -0.4565 12 | 4 C4 3.2773 0.0730 0.0902 C.1 1 UNK 0.2438 13 | 5 S5 4.8675 0.1577 0.1277 S.2 1 UNK -0.0075 14 | 6 H6 -1.2260 0.9021 0.1244 H 1 UNK 0.0600 15 | 7 H7 -0.4412 -0.2892 -0.9081 H 1 UNK 0.0600 16 | 8 H8 -0.4701 -0.5180 0.8407 H 1 UNK 0.0600 17 | 9 H9 1.0081 1.7540 -0.6113 H 1 UNK 0.0600 18 | 10 H10 0.9795 1.5267 1.1264 H 1 UNK 0.0600 19 | @BOND 20 | 1 1 2 1 21 | 2 1 6 1 22 | 3 1 7 1 23 | 4 1 8 1 24 | 5 2 3 1 25 | 6 2 9 1 26 | 7 2 10 1 27 | 8 3 4 2 28 | 9 4 5 2 29 | @SUBSTRUCTURE 30 | 1 UNK 1 GROUP 0 **** 0 ROOT 31 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/56-23-5.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 5 4 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 1.3533 -2.6465 -0.8881 Cl 1 UNK -0.2000 10 | 2 C2 1.4197 -1.1755 0.1138 C.3 1 UNK 0.8000 11 | 3 Cl3 1.3802 0.2613 -0.9379 Cl 1 UNK -0.2000 12 | 4 Cl4 0.0204 -1.1437 1.2151 Cl 1 UNK -0.2000 13 | 5 Cl5 2.9248 -1.1731 1.0659 Cl 1 UNK -0.2000 14 | @BOND 15 | 1 1 2 1 16 | 2 2 3 1 17 | 3 2 4 1 18 | 4 2 5 1 19 | @SUBSTRUCTURE 20 | 1 UNK 1 GROUP 0 **** 0 ROOT 21 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/598-52-7.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 11 10 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 N1 2.0298 0.9991 0.0998 N.pl3 1 UNK -0.4272 10 | 2 C2 0.6758 0.9411 0.0909 C.2 1 UNK 0.4157 11 | 3 C3 2.8010 2.2367 0.1057 C.3 1 UNK -0.0280 12 | 4 N4 0.2719 -0.3430 0.0873 N.pl3 1 UNK -0.7839 13 | 5 S5 -0.3948 2.2165 0.0848 S.2 1 UNK -0.4762 14 | 6 H6 2.5481 0.1331 0.1025 H 1 UNK 0.2912 15 | 7 H7 3.8669 2.0091 0.1125 H 1 UNK 0.0600 16 | 8 H8 2.5877 2.8333 -0.7820 H 1 UNK 0.0600 17 | 9 H9 2.5761 2.8320 0.9914 H 1 UNK 0.0600 18 | 10 H10 -0.7181 -0.5423 0.0807 H 1 UNK 0.4142 19 | 11 H11 0.9506 -1.0895 0.0912 H 1 UNK 0.4142 20 | @BOND 21 | 1 1 2 1 22 | 2 1 3 1 23 | 3 1 6 1 24 | 4 2 4 1 25 | 5 2 5 2 26 | 6 3 7 1 27 | 7 3 8 1 28 | 8 3 9 1 29 | 9 4 10 1 30 | 10 4 11 1 31 | @SUBSTRUCTURE 32 | 1 UNK 1 GROUP 0 **** 0 ROOT 33 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/608-93-5.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 3.6292 -0.4437 0.1119 C.ar 1 UNK 0.1800 10 | 2 C2 3.6525 -1.8557 0.0999 C.ar 1 UNK 0.1800 11 | 3 C3 2.3987 0.2391 0.1057 C.ar 1 UNK -0.1150 12 | 4 Cl4 5.0959 0.4695 0.1344 Cl 1 UNK -0.1800 13 | 5 C5 2.4378 -2.5791 0.0815 C.ar 1 UNK 0.1800 14 | 6 Cl6 5.1657 -2.6963 0.1076 Cl 1 UNK -0.1800 15 | 7 C7 1.1877 -0.4773 0.0875 C.ar 1 UNK 0.1800 16 | 8 C8 1.2034 -1.8895 0.0753 C.ar 1 UNK 0.1800 17 | 9 Cl9 2.4617 -4.3101 0.0667 Cl 1 UNK -0.1800 18 | 10 Cl10 -0.3038 0.3952 0.0803 Cl 1 UNK -0.1800 19 | 11 Cl11 -0.2859 -2.7713 0.0529 Cl 1 UNK -0.1800 20 | 12 H12 2.3838 1.3193 0.1150 H 1 UNK 0.1150 21 | @BOND 22 | 1 1 2 ar 23 | 2 1 3 ar 24 | 3 1 4 1 25 | 4 2 5 ar 26 | 5 2 6 1 27 | 6 3 7 ar 28 | 7 3 12 1 29 | 8 5 8 ar 30 | 9 5 9 1 31 | 10 7 8 ar 32 | 11 7 10 1 33 | 12 8 11 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/62-56-6.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 8 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 N1 2.0270 0.2010 0.0925 N.pl3 1 UNK -0.7839 10 | 2 C2 1.4098 -0.9949 0.0807 C.2 1 UNK 0.3872 11 | 3 S3 2.1961 -2.4528 0.0706 S.2 1 UNK -0.4762 12 | 4 N4 0.0715 -0.8537 0.0782 N.pl3 1 UNK -0.7839 13 | 5 H5 3.0367 0.2272 0.0954 H 1 UNK 0.4142 14 | 6 H6 1.4886 1.0541 0.0982 H 1 UNK 0.4142 15 | 7 H7 -0.5052 -1.6829 0.0697 H 1 UNK 0.4142 16 | 8 H8 -0.3457 0.0649 0.0848 H 1 UNK 0.4142 17 | @BOND 18 | 1 1 2 1 19 | 2 1 5 1 20 | 3 1 6 1 21 | 4 2 3 2 22 | 5 2 4 1 23 | 6 4 7 1 24 | 7 4 8 1 25 | @SUBSTRUCTURE 26 | 1 UNK 1 GROUP 0 **** 0 ROOT 27 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/630-20-6.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 8 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 0.7811 0.2435 -0.9189 Cl 1 UNK 0.0120 10 | 2 C2 1.2262 -1.1473 0.1054 C.3 1 UNK -0.0360 11 | 3 C3 2.3905 -0.7644 1.0345 C.3 1 UNK -0.0060 12 | 4 Cl4 1.6949 -2.5284 -0.9215 Cl 1 UNK 0.0120 13 | 5 Cl5 -0.1750 -1.6101 1.1042 Cl 1 UNK 0.0120 14 | 6 Cl6 3.8437 -0.2845 0.1149 Cl 1 UNK -0.2000 15 | 7 H7 2.1191 0.0725 1.6786 H 1 UNK 0.1030 16 | 8 H8 2.6703 -1.5997 1.6770 H 1 UNK 0.1030 17 | @BOND 18 | 1 1 2 1 19 | 2 2 3 1 20 | 3 2 4 1 21 | 4 2 5 1 22 | 5 3 6 1 23 | 6 3 7 1 24 | 7 3 8 1 25 | @SUBSTRUCTURE 26 | 1 UNK 1 GROUP 0 **** 0 ROOT 27 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/634-90-2.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 5.8823 -2.1443 0.1010 Cl 1 UNK -0.1800 10 | 2 C2 4.1517 -2.1574 0.0966 C.ar 1 UNK 0.1800 11 | 3 C3 3.4504 -3.3848 0.0912 C.ar 1 UNK 0.1800 12 | 4 C4 3.4319 -0.9408 0.0985 C.ar 1 UNK 0.1800 13 | 5 Cl5 4.2973 -4.8910 0.0887 Cl 1 UNK -0.1800 14 | 6 C6 2.0416 -3.3918 0.0877 C.ar 1 UNK -0.1150 15 | 7 C7 2.0232 -0.9550 0.0950 C.ar 1 UNK -0.1150 16 | 8 Cl8 4.2559 0.5781 0.1052 Cl 1 UNK -0.1800 17 | 9 C9 1.3278 -2.1788 0.0896 C.ar 1 UNK 0.1800 18 | 10 Cl10 -0.3973 -2.1918 0.0853 Cl 1 UNK -0.1800 19 | 11 H11 1.5074 -4.3308 0.0835 H 1 UNK 0.1150 20 | 12 H12 1.4748 -0.0243 0.0965 H 1 UNK 0.1150 21 | @BOND 22 | 1 1 2 1 23 | 2 2 3 ar 24 | 3 2 4 ar 25 | 4 3 5 1 26 | 5 3 6 ar 27 | 6 4 7 ar 28 | 7 4 8 1 29 | 8 6 9 ar 30 | 9 6 11 1 31 | 10 7 9 ar 32 | 11 7 12 1 33 | 12 9 10 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/67-56-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 6 5 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 0.1087 0.1432 0.0935 C.3 1 UNK 0.1450 10 | 2 O2 1.5182 0.1128 0.1336 O.3 1 UNK -0.6830 11 | 3 H3 -0.2983 0.1395 1.1048 H 1 UNK 0.0400 12 | 4 H4 -0.2369 1.0423 -0.4168 H 1 UNK 0.0400 13 | 5 H5 -0.2743 -0.7279 -0.4382 H 1 UNK 0.0400 14 | 6 H6 1.8452 0.1166 -0.7531 H 1 UNK 0.4180 15 | @BOND 16 | 1 1 2 1 17 | 2 1 3 1 18 | 3 1 4 1 19 | 4 1 5 1 20 | 5 2 6 1 21 | @SUBSTRUCTURE 22 | 1 UNK 1 GROUP 0 **** 0 ROOT 23 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/67-64-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 10 9 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 2.1168 -2.3055 0.0891 C.3 1 UNK -0.1800 10 | 2 C2 1.3385 -0.9963 0.0936 C.2 1 UNK 0.4700 11 | 3 C3 2.1465 0.2948 0.0803 C.3 1 UNK -0.1800 12 | 4 O4 0.1095 -0.9822 0.1073 O.2 1 UNK -0.4700 13 | 5 H5 1.4352 -3.1563 0.1014 H 1 UNK 0.0600 14 | 6 H6 2.7382 -2.3731 -0.8039 H 1 UNK 0.0600 15 | 7 H7 2.7609 -2.3657 0.9663 H 1 UNK 0.0600 16 | 8 H8 1.4844 1.1609 0.0829 H 1 UNK 0.0600 17 | 9 H9 2.7890 0.3480 0.9592 H 1 UNK 0.0600 18 | 10 H10 2.7721 0.3404 -0.8111 H 1 UNK 0.0600 19 | @BOND 20 | 1 1 2 1 21 | 2 1 5 1 22 | 3 1 6 1 23 | 4 1 7 1 24 | 5 2 3 1 25 | 6 2 4 2 26 | 7 3 8 1 27 | 8 3 9 1 28 | 9 3 10 1 29 | @SUBSTRUCTURE 30 | 1 UNK 1 GROUP 0 **** 0 ROOT 31 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/67-66-3.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 5 4 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 -0.2886 -0.9580 0.0485 Cl 1 UNK 0.0120 10 | 2 C2 1.4238 -1.0033 0.5358 C.3 1 UNK -0.3336 11 | 3 Cl3 2.2312 -2.4461 -0.1265 Cl 1 UNK 0.0120 12 | 4 Cl4 2.2653 0.4814 0.0263 Cl 1 UNK 0.0120 13 | 5 H5 1.4656 -1.0606 1.6235 H 1 UNK 0.2976 14 | @BOND 15 | 1 1 2 1 16 | 2 2 3 1 17 | 3 2 4 1 18 | 4 2 5 1 19 | @SUBSTRUCTURE 20 | 1 UNK 1 GROUP 0 **** 0 ROOT 21 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/67-72-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 8 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 1.5307 -3.8483 0.9468 Cl 1 UNK 0.0120 10 | 2 C2 2.0509 -2.2864 0.2544 C.3 1 UNK -0.0360 11 | 3 C3 0.8153 -1.4131 -0.0868 C.3 1 UNK -0.0360 12 | 4 Cl4 3.0086 -2.6037 -1.2194 Cl 1 UNK 0.0120 13 | 5 Cl5 3.0888 -1.4500 1.4430 Cl 1 UNK 0.0120 14 | 6 Cl6 -0.1424 -1.0959 1.3869 Cl 1 UNK 0.0120 15 | 7 Cl7 1.3355 0.1488 -0.7793 Cl 1 UNK 0.0120 16 | 8 Cl8 -0.2226 -2.2495 -1.2755 Cl 1 UNK 0.0120 17 | @BOND 18 | 1 1 2 1 19 | 2 2 3 1 20 | 3 2 4 1 21 | 4 2 5 1 22 | 5 3 6 1 23 | 6 3 7 1 24 | 7 3 8 1 25 | @SUBSTRUCTURE 26 | 1 UNK 1 GROUP 0 **** 0 ROOT 27 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/71-23-8.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 11 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 O1 0.0219 0.1901 0.0894 O.3 1 UNK -0.6830 10 | 2 C2 1.1698 -0.6309 0.0872 C.3 1 UNK 0.1450 11 | 3 C3 2.4316 0.2416 0.0991 C.3 1 UNK -0.1200 12 | 4 C4 3.7198 -0.5889 0.0974 C.3 1 UNK -0.1800 13 | 5 H5 -0.7447 -0.3627 0.0820 H 1 UNK 0.4180 14 | 6 H6 1.1435 -1.2823 0.9614 H 1 UNK 0.0600 15 | 7 H7 1.1503 -1.2682 -0.7975 H 1 UNK 0.0600 16 | 8 H8 2.4289 0.9015 -0.7693 H 1 UNK 0.0600 17 | 9 H9 2.4222 0.8875 0.9779 H 1 UNK 0.0600 18 | 10 H10 4.5981 0.0570 0.1059 H 1 UNK 0.0600 19 | 11 H11 3.7733 -1.2346 0.9743 H 1 UNK 0.0600 20 | 12 H12 3.7801 -1.2205 -0.7893 H 1 UNK 0.0600 21 | @BOND 22 | 1 1 2 1 23 | 2 1 5 1 24 | 3 2 3 1 25 | 4 2 6 1 26 | 5 2 7 1 27 | 6 3 4 1 28 | 7 3 8 1 29 | 8 3 9 1 30 | 9 4 10 1 31 | 10 4 11 1 32 | 11 4 12 1 33 | @SUBSTRUCTURE 34 | 1 UNK 1 GROUP 0 **** 0 ROOT 35 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/71-55-6.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 8 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 1.4352 -2.4245 1.0455 C.3 1 UNK 0.0784 10 | 2 C2 1.4327 -1.2036 0.1188 C.3 1 UNK -0.2944 11 | 3 Cl3 -0.0366 -1.2324 -0.8891 Cl 1 UNK 0.0120 12 | 4 Cl4 1.4555 0.2823 1.1022 Cl 1 UNK 0.0120 13 | 5 Cl5 2.8762 -1.2535 -0.9249 Cl 1 UNK 0.0120 14 | 6 H6 0.5625 -2.4242 1.6992 H 1 UNK 0.0600 15 | 7 H7 1.4215 -3.3527 0.4736 H 1 UNK 0.0600 16 | 8 H8 2.3236 -2.4369 1.6776 H 1 UNK 0.0600 17 | @BOND 18 | 1 1 2 1 19 | 2 1 6 1 20 | 3 1 7 1 21 | 4 1 8 1 22 | 5 2 3 1 23 | 6 2 4 1 24 | 7 2 5 1 25 | @SUBSTRUCTURE 26 | 1 UNK 1 GROUP 0 **** 0 ROOT 27 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/75-05-8.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 6 5 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 2.7883 0.1312 0.1081 C.3 1 UNK -0.0800 10 | 2 C2 1.3187 0.1504 0.0983 C.1 1 UNK 0.4600 11 | 3 N3 0.1620 0.1655 0.0906 N.1 1 UNK -0.5600 12 | 4 H4 3.1641 0.1654 -0.9144 H 1 UNK 0.0600 13 | 5 H5 3.1644 0.9946 0.6569 H 1 UNK 0.0600 14 | 6 H6 3.1417 -0.7807 0.5892 H 1 UNK 0.0600 15 | @BOND 16 | 1 1 2 1 17 | 2 1 4 1 18 | 3 1 5 1 19 | 4 1 6 1 20 | 5 2 3 3 21 | @SUBSTRUCTURE 22 | 1 UNK 1 GROUP 0 **** 0 ROOT 23 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/75-08-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 9 8 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 0.0015 -1.3189 0.1027 C.3 1 UNK 0.0600 10 | 2 C2 1.4061 -1.9286 0.0587 C.3 1 UNK -0.1800 11 | 3 S3 0.1330 0.4879 0.0718 S.3 1 UNK -0.3350 12 | 4 H4 -0.5892 -1.6520 -0.7509 H 1 UNK 0.0600 13 | 5 H5 -0.5231 -1.6267 1.0075 H 1 UNK 0.0600 14 | 6 H6 1.3560 -3.0174 0.0762 H 1 UNK 0.0600 15 | 7 H7 1.9358 -1.6356 -0.8483 H 1 UNK 0.0600 16 | 8 H8 2.0021 -1.6102 0.9145 H 1 UNK 0.0600 17 | 9 H9 -1.1809 0.7260 0.1178 H 1 UNK 0.1550 18 | @BOND 19 | 1 1 2 1 20 | 2 1 3 1 21 | 3 1 4 1 22 | 4 1 5 1 23 | 5 2 6 1 24 | 6 2 7 1 25 | 7 2 8 1 26 | 8 3 9 1 27 | @SUBSTRUCTURE 28 | 1 UNK 1 GROUP 0 **** 0 ROOT 29 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/75-21-8.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 7 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 0.7749 0.2313 0.1003 C.3 1 UNK 0.0562 10 | 2 C2 0.0190 -1.0692 0.0759 C.3 1 UNK 0.0562 11 | 3 O3 1.4511 -1.0327 0.1398 O.3 1 UNK -0.3524 12 | 4 H4 0.8205 0.7988 1.0275 H 1 UNK 0.0600 13 | 5 H5 0.9036 0.7854 -0.8272 H 1 UNK 0.0600 14 | 6 H6 -0.3836 -1.4289 -0.8688 H 1 UNK 0.0600 15 | 7 H7 -0.4667 -1.4155 0.9859 H 1 UNK 0.0600 16 | @BOND 17 | 1 1 2 1 18 | 2 1 3 1 19 | 3 1 4 1 20 | 4 1 5 1 21 | 5 2 3 1 22 | 6 2 6 1 23 | 7 2 7 1 24 | @SUBSTRUCTURE 25 | 1 UNK 1 GROUP 0 **** 0 ROOT 26 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/75-25-2.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 5 4 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 1.4267 -0.9973 -0.3401 C.3 1 UNK -0.2949 10 | 2 Br2 2.3391 -2.6448 0.3028 Br 1 UNK 0.0039 11 | 3 Br3 -0.5008 -0.9915 0.1547 Br 1 UNK 0.0039 12 | 4 Br4 2.3490 0.6446 0.3028 Br 1 UNK 0.0039 13 | 5 H5 1.4833 -0.9975 -1.4287 H 1 UNK 0.2832 14 | @BOND 15 | 1 1 2 1 16 | 2 1 3 1 17 | 3 1 4 1 18 | 4 1 5 1 19 | @SUBSTRUCTURE 20 | 1 UNK 1 GROUP 0 **** 0 ROOT 21 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/78-87-5.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 11 10 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 3.7967 -1.9697 0.0770 C.3 1 UNK -0.1800 10 | 2 C2 2.4716 -1.2880 0.4384 C.3 1 UNK 0.0970 11 | 3 C3 1.2682 -1.9564 -0.2432 C.3 1 UNK -0.0060 12 | 4 Cl4 2.5594 0.4311 -0.0322 Cl 1 UNK -0.2000 13 | 5 Cl5 -0.2643 -1.2327 0.3125 Cl 1 UNK -0.2000 14 | 6 H6 4.6349 -1.4847 0.5779 H 1 UNK 0.0600 15 | 7 H7 3.7940 -3.0178 0.3773 H 1 UNK 0.0600 16 | 8 H8 3.9819 -1.9300 -0.9968 H 1 UNK 0.0600 17 | 9 H9 2.3392 -1.3139 1.5206 H 1 UNK 0.1030 18 | 10 H10 1.3148 -1.8528 -1.3277 H 1 UNK 0.1030 19 | 11 H11 1.2269 -3.0205 -0.0094 H 1 UNK 0.1030 20 | @BOND 21 | 1 1 2 1 22 | 2 1 6 1 23 | 3 1 7 1 24 | 4 1 8 1 25 | 5 2 3 1 26 | 6 2 4 1 27 | 7 2 9 1 28 | 8 3 5 1 29 | 9 3 10 1 30 | 10 3 11 1 31 | @SUBSTRUCTURE 32 | 1 UNK 1 GROUP 0 **** 0 ROOT 33 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/78-99-9.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 11 10 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 0.1826 0.2854 0.4463 C.3 1 UNK -0.0167 10 | 2 C2 -0.8045 1.2824 -0.1809 C.3 1 UNK 0.0086 11 | 3 Cl3 -0.0856 -1.3602 -0.1875 Cl 1 UNK -0.1358 12 | 4 Cl4 1.8555 0.7987 0.1092 Cl 1 UNK -0.1358 13 | 5 C5 -2.2683 1.0092 0.1894 C.3 1 UNK -0.1800 14 | 6 H6 0.0666 0.2464 1.5298 H 1 UNK 0.1597 15 | 7 H7 -0.5481 2.2901 0.1480 H 1 UNK 0.0600 16 | 8 H8 -0.6936 1.2780 -1.2658 H 1 UNK 0.0600 17 | 9 H9 -2.9236 1.7650 -0.2439 H 1 UNK 0.0600 18 | 10 H10 -2.6005 0.0378 -0.1772 H 1 UNK 0.0600 19 | 11 H11 -2.4110 1.0271 1.2702 H 1 UNK 0.0600 20 | @BOND 21 | 1 1 2 1 22 | 2 1 3 1 23 | 3 1 4 1 24 | 4 1 6 1 25 | 5 2 5 1 26 | 6 2 7 1 27 | 7 2 8 1 28 | 8 5 9 1 29 | 9 5 10 1 30 | 10 5 11 1 31 | @SUBSTRUCTURE 32 | 1 UNK 1 GROUP 0 **** 0 ROOT 33 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/79-00-5.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 8 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 2.4939 0.4702 0.2898 Cl 1 UNK -0.1358 10 | 2 C2 2.4178 -1.2206 -0.2724 C.3 1 UNK 0.1119 11 | 3 C3 1.2341 -1.9531 0.3723 C.3 1 UNK -0.0060 12 | 4 Cl4 3.9371 -2.0641 0.1210 Cl 1 UNK -0.1358 13 | 5 Cl5 -0.3150 -1.2365 -0.1444 Cl 1 UNK -0.2000 14 | 6 H6 2.3242 -1.2059 -1.3586 H 1 UNK 0.1597 15 | 7 H7 1.2189 -3.0030 0.0789 H 1 UNK 0.1030 16 | 8 H8 1.2814 -1.9088 1.4607 H 1 UNK 0.1030 17 | @BOND 18 | 1 1 2 1 19 | 2 2 3 1 20 | 3 2 4 1 21 | 4 2 6 1 22 | 5 3 5 1 23 | 6 3 7 1 24 | 7 3 8 1 25 | @SUBSTRUCTURE 26 | 1 UNK 1 GROUP 0 **** 0 ROOT 27 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/79-01-6.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 6 5 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 3.9547 -1.9987 0.1574 Cl 1 UNK -0.0600 10 | 2 C2 2.3984 -1.2548 0.1306 C.2 1 UNK 0.1200 11 | 3 C3 1.2550 -1.9554 0.0716 C.2 1 UNK 0.0050 12 | 4 Cl4 2.4742 0.4696 0.1875 Cl 1 UNK -0.0600 13 | 5 Cl5 -0.3087 -1.2230 0.0442 Cl 1 UNK -0.1200 14 | 6 H6 1.2516 -3.0349 0.0374 H 1 UNK 0.1150 15 | @BOND 16 | 1 1 2 1 17 | 2 2 3 2 18 | 3 2 4 1 19 | 4 3 5 1 20 | 5 3 6 1 21 | @SUBSTRUCTURE 22 | 1 UNK 1 GROUP 0 **** 0 ROOT 23 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/79-06-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 10 9 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 N1 3.5690 -1.8375 0.0793 N.am 1 UNK -0.7600 10 | 2 C2 2.4906 -1.0519 0.0893 C.2 1 UNK 0.5567 11 | 3 O3 2.5805 0.1745 0.1011 O.2 1 UNK -0.5000 12 | 4 C4 1.2596 -1.8225 0.0844 C.2 1 UNK -0.1717 13 | 5 C5 0.0630 -1.2106 0.0930 C.2 1 UNK -0.2300 14 | 6 H6 4.4872 -1.4181 0.0815 H 1 UNK 0.3800 15 | 7 H7 3.4662 -2.8414 0.0698 H 1 UNK 0.3800 16 | 8 H8 1.2934 -2.9029 0.0738 H 1 UNK 0.1150 17 | 9 H9 -0.8492 -1.7887 0.0893 H 1 UNK 0.1150 18 | 10 H10 -0.0314 -0.1337 0.1037 H 1 UNK 0.1150 19 | @BOND 20 | 1 1 2 am BACKBONE|DICT|INTERRES 21 | 2 1 6 1 22 | 3 1 7 1 23 | 4 2 3 2 24 | 5 2 4 1 25 | 6 4 5 2 26 | 7 4 8 1 27 | 8 5 9 1 28 | 9 5 10 1 29 | @SUBSTRUCTURE 30 | 1 UNK 1 GROUP 0 **** 0 ROOT 31 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/79-34-5.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 8 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 3.2944 -0.9444 -0.8818 Cl 1 UNK -0.1358 10 | 2 C2 2.2421 -0.9817 0.5596 C.3 1 UNK 0.1119 11 | 3 C3 1.2889 -2.1895 0.5308 C.3 1 UNK 0.1119 12 | 4 Cl4 1.3191 0.5382 0.6933 Cl 1 UNK -0.1358 13 | 5 Cl5 0.2566 -2.1734 -0.9253 Cl 1 UNK -0.1358 14 | 6 Cl6 2.2103 -3.7135 0.6209 Cl 1 UNK -0.1358 15 | 7 H7 2.8929 -1.0340 1.4328 H 1 UNK 0.1597 16 | 8 H8 0.6261 -2.1693 1.3963 H 1 UNK 0.1597 17 | @BOND 18 | 1 1 2 1 19 | 2 2 3 1 20 | 3 2 4 1 21 | 4 2 7 1 22 | 5 3 5 1 23 | 6 3 6 1 24 | 7 3 8 1 25 | @SUBSTRUCTURE 26 | 1 UNK 1 GROUP 0 **** 0 ROOT 27 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/95-50-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 -0.2933 -2.2236 0.1182 Cl 1 UNK -0.1800 10 | 2 C2 1.4345 -2.2045 0.1042 C.ar 1 UNK 0.1800 11 | 3 C3 2.1472 -0.9844 0.0881 C.ar 1 UNK 0.1800 12 | 4 C4 2.1368 -3.4265 0.1091 C.ar 1 UNK -0.1150 13 | 5 C5 3.5566 -0.9961 0.0769 C.ar 1 UNK -0.1150 14 | 6 Cl6 1.3154 0.5301 0.0818 Cl 1 UNK -0.1800 15 | 7 C7 3.5451 -3.4346 0.0979 C.ar 1 UNK -0.1150 16 | 8 C8 4.2553 -2.2189 0.0818 C.ar 1 UNK -0.1150 17 | 9 H9 1.5946 -4.3606 0.1214 H 1 UNK 0.1150 18 | 10 H10 4.1040 -0.0650 0.0645 H 1 UNK 0.1150 19 | 11 H11 4.0800 -4.3730 0.1016 H 1 UNK 0.1150 20 | 12 H12 5.3354 -2.2241 0.0732 H 1 UNK 0.1150 21 | @BOND 22 | 1 1 2 1 23 | 2 2 3 ar 24 | 3 2 4 ar 25 | 4 3 5 ar 26 | 5 3 6 1 27 | 6 4 7 ar 28 | 7 4 9 1 29 | 8 5 8 ar 30 | 9 5 10 1 31 | 10 7 8 ar 32 | 11 7 11 1 33 | 12 8 12 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_train_x_mol2/96-45-7.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 S1 -0.2156 -0.9302 0.0891 S.2 1 UNK -0.4762 10 | 2 C2 1.4425 -0.9353 0.0914 C.2 1 UNK 0.4442 11 | 3 N3 2.2538 0.1399 0.0755 N.pl3 1 UNK -0.4272 12 | 4 N4 2.2471 -2.0154 0.1095 N.pl3 1 UNK -0.4272 13 | 5 C5 3.6681 -0.1777 0.0824 C.3 1 UNK 0.0320 14 | 6 C6 3.6634 -1.7065 0.1065 C.3 1 UNK 0.0320 15 | 7 H7 1.8989 1.0852 0.0601 H 1 UNK 0.2912 16 | 8 H8 1.8864 -2.9586 0.1239 H 1 UNK 0.2912 17 | 9 H9 4.1519 0.2422 0.9647 H 1 UNK 0.0600 18 | 10 H10 4.1542 0.2142 -0.8115 H 1 UNK 0.0600 19 | 11 H11 4.1469 -2.1294 -0.7746 H 1 UNK 0.0600 20 | 12 H12 4.1446 -2.1014 1.0017 H 1 UNK 0.0600 21 | @BOND 22 | 1 1 2 2 23 | 2 2 3 1 24 | 3 2 4 1 25 | 4 3 5 1 26 | 5 3 7 1 27 | 6 4 6 1 28 | 7 4 8 1 29 | 8 5 6 1 30 | 9 5 9 1 31 | 10 5 10 1 32 | 11 6 11 1 33 | 12 6 12 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_train_y.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/examples/data/example_train_y.npy -------------------------------------------------------------------------------- /examples/data/example_valid.id: -------------------------------------------------------------------------------- 1 | 1013-23-6 2 | 103-23-1 3 | 105-37-3 4 | 106-48-9 5 | 107-02-8 6 | 107-13-1 7 | 109-46-6 8 | 109-52-4 9 | 110-83-8 10 | 111-44-4 11 | 112-27-6 12 | 115-31-1 13 | 119-65-3 14 | 120-82-1 15 | 121-14-2 16 | 123-54-6 17 | 132-64-9 18 | 141-90-2 19 | 1445-75-6 20 | 149-31-5 21 | 1740-19-8 22 | 1912-24-9 23 | 2008-58-4 24 | 2051-60-7 25 | 2489-77-2 26 | 2556-42-5 27 | 260-94-6 28 | 2782-91-4 29 | 28159-98-0 30 | 311-45-5 31 | 3689-24-5 32 | 470-90-6 33 | 50-28-2 34 | 51-03-6 35 | 541-73-1 36 | 55406-53-6 37 | 556-61-6 38 | 59-06-3 39 | 59-50-7 40 | 5964-62-5 41 | 598-16-3 42 | 5989-27-5 43 | 60207-90-1 44 | 609-19-8 45 | 62-55-5 46 | 6317-18-6 47 | 64-17-5 48 | 66-25-1 49 | 67-68-5 50 | 68-12-2 51 | 71-43-2 52 | 74-83-9 53 | 75-09-2 54 | 75-35-4 55 | 76-01-7 56 | 77-47-4 57 | 79-09-4 58 | 79-92-5 59 | 872-50-4 60 | 88-72-2 61 | 88-75-5 62 | 90-02-8 63 | 90-43-7 64 | 91-20-3 65 | 91-64-5 66 | 94-75-7 67 | 944-22-9 68 | 95-76-1 69 | 99-51-4 70 | 99-87-6 71 | -------------------------------------------------------------------------------- /examples/data/example_valid.label: -------------------------------------------------------------------------------- 1 | 4.001 2 | 5.749 3 | 2.837 4 | 4.426 5 | 5.83 6 | 3.784 7 | 3.756 8 | 3.356 9 | 3.941 10 | 2.775 11 | 0.52 12 | 6.449 13 | 3.711 14 | 4.655 15 | 3.716 16 | 1.893 17 | 4.995 18 | 4.221 19 | 2.829 20 | 1.236 21 | 4.56 22 | 4.361 23 | 2.346 24 | 5.424 25 | 2.186 26 | 6.186 27 | 4.892 28 | 2.235 29 | 4.485 30 | 9.161 31 | 9.147 32 | 5.423 33 | 4.962 34 | 5.291 35 | 4.31 36 | 6.847 37 | 5.417 38 | 3.074 39 | 4.853 40 | 5.44 41 | 4.329 42 | 5.271 43 | 4.72 44 | 5.463 45 | 3.635 46 | 6.251 47 | 0.587 48 | 4.039 49 | 0.495 50 | 0.706 51 | 2.467 52 | 4.635 53 | 2.587 54 | 3.506 55 | 4.403 56 | 6.781 57 | 3.171 58 | 3.792 59 | 4.906 60 | 4.144 61 | 4.024 62 | 4.474 63 | 5.38 64 | 4.051 65 | 4.034 66 | 3.499 67 | 7.96 68 | 5.747 69 | 3.975 70 | 4.315 71 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/107-02-8.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 8 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 0.0778 0.1574 0.0726 C.2 1 UNK -0.2300 10 | 2 C2 1.2174 -0.5519 0.0854 C.2 1 UNK -0.1150 11 | 3 C3 2.5193 0.1213 0.0937 C.2 1 UNK 0.4500 12 | 4 O4 3.5890 -0.4838 0.1054 O.2 1 UNK -0.4500 13 | 5 H5 -0.8803 -0.3414 0.0665 H 1 UNK 0.1150 14 | 6 H6 0.0772 1.2383 0.0681 H 1 UNK 0.1150 15 | 7 H7 1.1970 -1.6320 0.0897 H 1 UNK 0.1150 16 | 8 H8 2.4803 1.2111 0.0887 H 1 UNK 0.0000 17 | @BOND 18 | 1 1 2 2 19 | 2 1 5 1 20 | 3 1 6 1 21 | 4 2 3 1 22 | 5 2 7 1 23 | 6 3 4 2 24 | 7 3 8 1 25 | @SUBSTRUCTURE 26 | 1 UNK 1 GROUP 0 **** 0 ROOT 27 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/107-13-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 7 6 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 0.0817 0.1519 0.0838 C.2 1 UNK -0.2300 10 | 2 C2 0.7649 -1.0019 0.0786 C.2 1 UNK 0.0038 11 | 3 C3 2.1881 -1.0338 0.1116 C.1 1 UNK 0.5600 12 | 4 N4 3.3448 -1.0424 0.1387 N.1 1 UNK -0.5600 13 | 5 H5 -0.9981 0.1580 0.0585 H 1 UNK 0.1150 14 | 6 H6 0.5912 1.1041 0.1134 H 1 UNK 0.1150 15 | 7 H7 0.2445 -1.9479 0.0490 H 1 UNK -0.0038 16 | @BOND 17 | 1 1 2 2 18 | 2 1 5 1 19 | 3 1 6 1 20 | 4 2 3 1 21 | 5 2 7 1 22 | 6 3 4 3 23 | @SUBSTRUCTURE 24 | 1 UNK 1 GROUP 0 **** 0 ROOT 25 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/120-82-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 5.0721 0.4451 0.1316 Cl 1 UNK -0.1800 10 | 2 C2 3.5978 -0.4556 0.1104 C.ar 1 UNK 0.1800 11 | 3 C3 3.6101 -1.8684 0.0879 C.ar 1 UNK 0.1800 12 | 4 C4 2.3691 0.2346 0.1158 C.ar 1 UNK -0.1150 13 | 5 Cl5 5.0999 -2.7435 0.0808 Cl 1 UNK -0.1800 14 | 6 C6 2.3937 -2.5800 0.0710 C.ar 1 UNK -0.1150 15 | 7 C7 1.1552 -0.4793 0.0989 C.ar 1 UNK -0.1150 16 | 8 C8 1.1674 -1.8873 0.0765 C.ar 1 UNK 0.1800 17 | 9 Cl9 -0.3188 -2.7633 0.0557 Cl 1 UNK -0.1800 18 | 10 H10 2.3565 1.3146 0.1330 H 1 UNK 0.1150 19 | 11 H11 2.4018 -3.6601 0.0538 H 1 UNK 0.1150 20 | 12 H12 0.2160 0.0542 0.1031 H 1 UNK 0.1150 21 | @BOND 22 | 1 1 2 1 23 | 2 2 3 ar 24 | 3 2 4 ar 25 | 4 3 5 1 26 | 5 3 6 ar 27 | 6 4 7 ar 28 | 7 4 10 1 29 | 8 6 8 ar 30 | 9 6 11 1 31 | 10 7 8 ar 32 | 11 7 12 1 33 | 12 8 9 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/141-90-2.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 O1 4.7077 -2.6081 0.1299 O.2 1 UNK -0.5000 10 | 2 C2 3.6895 -1.9207 0.1140 C.ar 1 UNK 0.6792 11 | 3 N3 2.4570 -2.4898 0.0799 N.pl3 1 UNK -0.3977 12 | 4 C4 3.6921 -0.4595 0.1295 C.ar 1 UNK -0.1717 13 | 5 C5 1.2416 -1.8634 0.0589 C.ar 1 UNK 0.4442 14 | 6 C6 2.5168 0.1960 0.1096 C.ar 1 UNK 0.0075 15 | 7 S7 -0.1968 -2.6879 0.0174 S.2 1 UNK -0.4762 16 | 8 N8 1.3137 -0.5056 0.0748 N.pl3 1 UNK -0.3977 17 | 9 H9 2.4341 -3.4988 0.0687 H 1 UNK 0.2912 18 | 10 H10 4.6253 0.0837 0.1564 H 1 UNK 0.1150 19 | 11 H11 2.4131 1.2711 0.1186 H 1 UNK 0.1150 20 | 12 H12 0.4547 0.0260 0.0609 H 1 UNK 0.2912 21 | @BOND 22 | 1 1 2 2 23 | 2 2 3 ar 24 | 3 2 4 ar 25 | 4 3 5 ar 26 | 5 3 9 1 27 | 6 4 6 ar 28 | 7 4 10 1 29 | 8 5 7 2 30 | 9 5 8 ar 31 | 10 6 8 ar 32 | 11 6 11 1 33 | 12 8 12 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/541-73-1.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 5.1265 -2.7216 0.1361 Cl 1 UNK -0.1800 10 | 2 C2 3.6357 -1.8535 0.1128 C.ar 1 UNK 0.1800 11 | 3 C3 2.4134 -2.5534 0.0777 C.ar 1 UNK -0.1150 12 | 4 C4 3.6403 -0.4445 0.1289 C.ar 1 UNK -0.1150 13 | 5 C5 1.1958 -1.8445 0.0587 C.ar 1 UNK 0.1800 14 | 6 C6 2.4230 0.2643 0.1100 C.ar 1 UNK -0.1150 15 | 7 Cl7 -0.3009 -2.7017 0.0157 Cl 1 UNK -0.1800 16 | 8 C8 1.2009 -0.4356 0.0748 C.ar 1 UNK -0.1150 17 | 9 H9 2.4097 -3.6335 0.0653 H 1 UNK 0.1150 18 | 10 H10 4.5766 0.0934 0.1559 H 1 UNK 0.1150 19 | 11 H11 2.4267 1.3443 0.1223 H 1 UNK 0.1150 20 | 12 H12 0.2682 0.1092 0.0603 H 1 UNK 0.1150 21 | @BOND 22 | 1 1 2 1 23 | 2 2 3 ar 24 | 3 2 4 ar 25 | 4 3 5 ar 26 | 5 3 9 1 27 | 6 4 6 ar 28 | 7 4 10 1 29 | 8 5 7 1 30 | 9 5 8 ar 31 | 10 6 8 ar 32 | 11 6 11 1 33 | 12 8 12 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/556-61-6.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 7 6 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 3.6142 0.2399 0.0744 C.3 1 UNK 0.0402 10 | 2 N2 2.6462 -0.8200 0.1316 N.2 1 UNK -0.4565 11 | 3 C3 1.4441 -1.0193 0.1300 C.1 1 UNK 0.2438 12 | 4 S4 -0.1421 -1.1656 0.1204 S.2 1 UNK -0.0075 13 | 5 H5 4.6261 -0.1635 0.1129 H 1 UNK 0.0600 14 | 6 H6 3.5103 0.8097 -0.8495 H 1 UNK 0.0600 15 | 7 H7 3.4890 0.9244 0.9139 H 1 UNK 0.0600 16 | @BOND 17 | 1 1 2 1 18 | 2 1 5 1 19 | 3 1 6 1 20 | 4 1 7 1 21 | 5 2 3 2 22 | 6 3 4 2 23 | @SUBSTRUCTURE 24 | 1 UNK 1 GROUP 0 **** 0 ROOT 25 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/598-16-3.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 6 5 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 1.9174 1.9020 0.1212 C.2 1 UNK 0.0645 10 | 2 C2 0.7766 1.1939 0.0968 C.2 1 UNK 0.2026 11 | 3 Br3 3.6721 0.9774 0.0925 Br 1 UNK -0.1795 12 | 4 Br4 0.8339 -0.7879 0.0317 Br 1 UNK -0.1013 13 | 5 Br5 -0.9320 2.1921 0.1280 Br 1 UNK -0.1013 14 | 6 H6 1.9883 2.9791 0.1567 H 1 UNK 0.1150 15 | @BOND 16 | 1 1 2 2 17 | 2 1 3 1 18 | 3 1 6 1 19 | 4 2 4 1 20 | 5 2 5 1 21 | @SUBSTRUCTURE 22 | 1 UNK 1 GROUP 0 **** 0 ROOT 23 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/62-55-5.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 9 8 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 2.1030 0.3220 0.0776 C.3 1 UNK -0.1800 10 | 2 C2 1.3926 -1.0083 0.0891 C.2 1 UNK 0.5389 11 | 3 S3 2.1941 -2.4625 0.1046 S.2 1 UNK -0.4762 12 | 4 N4 0.0484 -0.9237 0.0857 N.pl3 1 UNK -0.8227 13 | 5 H5 3.1865 0.1943 0.0811 H 1 UNK 0.0600 14 | 6 H6 1.8285 0.8857 -0.8145 H 1 UNK 0.0600 15 | 7 H7 1.8249 0.9029 0.9577 H 1 UNK 0.0600 16 | 8 H8 -0.4983 -1.7727 0.0928 H 1 UNK 0.3800 17 | 9 H9 -0.3947 -0.0167 0.0762 H 1 UNK 0.3800 18 | @BOND 19 | 1 1 2 1 20 | 2 1 5 1 21 | 3 1 6 1 22 | 4 1 7 1 23 | 5 2 3 2 24 | 6 2 4 1 25 | 7 4 8 1 26 | 8 4 9 1 27 | @SUBSTRUCTURE 28 | 1 UNK 1 GROUP 0 **** 0 ROOT 29 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/6317-18-6.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 9 8 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 3.4023 -2.2341 0.2359 C.3 1 UNK 0.2150 10 | 2 S2 2.5028 -0.8188 0.9202 S.3 1 UNK -0.1750 11 | 3 S3 5.1507 -2.4080 0.6736 S.3 1 UNK -0.1750 12 | 4 C4 0.9699 -1.0884 0.2436 C.1 1 UNK 0.1300 13 | 5 C5 5.7914 -1.0497 -0.1173 C.1 1 UNK 0.1300 14 | 6 N6 -0.0566 -1.3103 -0.2414 N.1 1 UNK -0.1225 15 | 7 N7 6.1824 -0.1095 -0.6666 N.1 1 UNK -0.1225 16 | 8 H8 2.8883 -3.1414 0.5533 H 1 UNK 0.0600 17 | 9 H9 3.3250 -2.1978 -0.8510 H 1 UNK 0.0600 18 | @BOND 19 | 1 1 2 1 20 | 2 1 3 1 21 | 3 1 8 1 22 | 4 1 9 1 23 | 5 2 4 1 24 | 6 3 5 1 25 | 7 4 6 3 26 | 8 5 7 3 27 | @SUBSTRUCTURE 28 | 1 UNK 1 GROUP 0 **** 0 ROOT 29 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/64-17-5.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 9 8 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 2.4787 -0.5941 0.1098 C.3 1 UNK -0.1800 10 | 2 C2 1.2118 0.2654 0.0736 C.3 1 UNK 0.1450 11 | 3 O3 0.0725 -0.5668 0.0441 O.3 1 UNK -0.6830 12 | 4 H4 3.3713 0.0314 0.1330 H 1 UNK 0.0600 13 | 5 H5 2.4968 -1.2325 0.9936 H 1 UNK 0.0600 14 | 6 H6 2.5449 -1.2357 -0.7694 H 1 UNK 0.0600 15 | 7 H7 1.1628 0.9111 0.9509 H 1 UNK 0.0600 16 | 8 H8 1.2108 0.9079 -0.8073 H 1 UNK 0.0600 17 | 9 H9 -0.6993 -0.0217 0.0220 H 1 UNK 0.4180 18 | @BOND 19 | 1 1 2 1 20 | 2 1 4 1 21 | 3 1 5 1 22 | 4 1 6 1 23 | 5 2 3 1 24 | 6 2 7 1 25 | 7 2 8 1 26 | 8 3 9 1 27 | @SUBSTRUCTURE 28 | 1 UNK 1 GROUP 0 **** 0 ROOT 29 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/67-68-5.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 10 9 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 -0.1599 -0.9842 -0.0559 C.3 1 UNK -0.0350 10 | 2 S2 1.5476 -1.1861 0.6369 S.3 1 UNK 0.1700 11 | 3 O3 2.2053 -2.3279 -0.1400 O.2 1 UNK -0.4600 12 | 4 C4 2.2420 0.3917 -0.0447 C.3 1 UNK -0.0350 13 | 5 H5 -0.7881 -1.8224 0.2453 H 1 UNK 0.0600 14 | 6 H6 -0.6137 -0.0627 0.3087 H 1 UNK 0.0600 15 | 7 H7 -0.1268 -0.9507 -1.1449 H 1 UNK 0.0600 16 | 8 H8 3.2807 0.5084 0.2643 H 1 UNK 0.0600 17 | 9 H9 2.2039 0.3845 -1.1340 H 1 UNK 0.0600 18 | 10 H10 1.6740 1.2478 0.3194 H 1 UNK 0.0600 19 | @BOND 20 | 1 1 2 1 21 | 2 1 5 1 22 | 3 1 6 1 23 | 4 1 7 1 24 | 5 2 3 2 25 | 6 2 4 1 26 | 7 4 8 1 27 | 8 4 9 1 28 | 9 4 10 1 29 | @SUBSTRUCTURE 30 | 1 UNK 1 GROUP 0 **** 0 ROOT 31 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/68-12-2.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 11 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 3.5886 -1.9566 0.2037 C.3 1 UNK -0.1100 10 | 2 N2 2.3469 -1.2041 0.0460 N.am 1 UNK -0.1400 11 | 3 C3 1.1851 -1.8155 -0.2473 C.2 1 UNK 0.5000 12 | 4 C4 2.4288 0.2423 0.2372 C.3 1 UNK -0.1100 13 | 5 O5 0.1118 -1.2321 -0.3957 O.2 1 UNK -0.5000 14 | 6 H6 4.4127 -1.4461 -0.2960 H 1 UNK 0.0600 15 | 7 H7 3.8384 -2.0485 1.2612 H 1 UNK 0.0600 16 | 8 H8 3.5277 -2.9617 -0.2171 H 1 UNK 0.0600 17 | 9 H9 1.3105 -2.9060 -0.3359 H 1 UNK 0.0000 18 | 10 H10 1.7025 0.5776 0.9791 H 1 UNK 0.0600 19 | 11 H11 3.4166 0.5493 0.5831 H 1 UNK 0.0600 20 | 12 H12 2.2252 0.7624 -0.6997 H 1 UNK 0.0600 21 | @BOND 22 | 1 1 2 1 23 | 2 1 6 1 24 | 3 1 7 1 25 | 4 1 8 1 26 | 5 2 3 am BACKBONE|DICT|INTERRES 27 | 6 2 4 1 28 | 7 3 5 2 29 | 8 3 9 1 30 | 9 4 10 1 31 | 10 4 11 1 32 | 11 4 12 1 33 | @SUBSTRUCTURE 34 | 1 UNK 1 GROUP 0 **** 0 ROOT 35 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/71-43-2.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 12 12 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 2.4881 -1.8955 0.0695 C.ar 1 UNK -0.1150 10 | 2 C2 1.2705 -2.6039 0.0914 C.ar 1 UNK -0.1150 11 | 3 C3 2.4836 -0.4867 0.0713 C.ar 1 UNK -0.1150 12 | 4 C4 0.0483 -1.9035 0.1151 C.ar 1 UNK -0.1150 13 | 5 C5 1.2614 0.2138 0.0950 C.ar 1 UNK -0.1150 14 | 6 C6 0.0438 -0.4946 0.1169 C.ar 1 UNK -0.1150 15 | 7 H7 3.4251 -2.4325 0.0513 H 1 UNK 0.1150 16 | 8 H8 1.2740 -3.6840 0.0900 H 1 UNK 0.1150 17 | 9 H9 3.4170 0.0564 0.0546 H 1 UNK 0.1150 18 | 10 H10 -0.8852 -2.4465 0.1319 H 1 UNK 0.1150 19 | 11 H11 1.2579 1.2939 0.0965 H 1 UNK 0.1150 20 | 12 H12 -0.8932 0.0424 0.1351 H 1 UNK 0.1150 21 | @BOND 22 | 1 1 2 ar 23 | 2 1 3 ar 24 | 3 1 7 1 25 | 4 2 4 ar 26 | 5 2 8 1 27 | 6 3 5 ar 28 | 7 3 9 1 29 | 8 4 6 ar 30 | 9 4 10 1 31 | 10 5 6 ar 32 | 11 5 11 1 33 | 12 6 12 1 34 | @SUBSTRUCTURE 35 | 1 UNK 1 GROUP 0 **** 0 ROOT 36 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/74-83-9.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 5 4 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 0.0763 0.1614 0.1140 C.3 1 UNK -0.2353 10 | 2 Br2 2.0649 0.0875 0.1111 Br 1 UNK -0.2039 11 | 3 H3 -0.2977 -0.3236 -0.7876 H 1 UNK 0.1464 12 | 4 H4 -0.2964 -0.3572 0.9974 H 1 UNK 0.1464 13 | 5 H5 -0.2396 1.2044 0.1338 H 1 UNK 0.1464 14 | @BOND 15 | 1 1 2 1 16 | 2 1 3 1 17 | 3 1 4 1 18 | 4 1 5 1 19 | @SUBSTRUCTURE 20 | 1 UNK 1 GROUP 0 **** 0 ROOT 21 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/75-09-2.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 5 4 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 2.6805 -0.6636 0.1797 Cl 1 UNK -0.1358 10 | 2 C2 1.2463 0.3902 0.1131 C.3 1 UNK -0.0478 11 | 3 Cl3 -0.2556 -0.5653 0.0557 Cl 1 UNK -0.1358 12 | 4 H4 1.2299 1.0218 1.0012 H 1 UNK 0.1597 13 | 5 H5 1.3048 1.0111 -0.7809 H 1 UNK 0.1597 14 | @BOND 15 | 1 1 2 1 16 | 2 2 3 1 17 | 3 2 4 1 18 | 4 2 5 1 19 | @SUBSTRUCTURE 20 | 1 UNK 1 GROUP 0 **** 0 ROOT 21 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/75-35-4.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 6 5 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 C1 2.1730 0.2424 0.0925 C.2 1 UNK -0.2300 10 | 2 C2 1.4835 -0.9070 0.1131 C.2 1 UNK 0.1200 11 | 3 Cl3 -0.2398 -0.9797 0.0726 Cl 1 UNK -0.0600 12 | 4 Cl4 2.2314 -2.4601 0.1825 Cl 1 UNK -0.0600 13 | 5 H5 3.2528 0.2455 0.1193 H 1 UNK 0.1150 14 | 6 H6 1.6669 1.1956 0.0487 H 1 UNK 0.1150 15 | @BOND 16 | 1 1 2 2 17 | 2 1 5 1 18 | 3 1 6 1 19 | 4 2 3 1 20 | 5 2 4 1 21 | @SUBSTRUCTURE 22 | 1 UNK 1 GROUP 0 **** 0 ROOT 23 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/76-01-7.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 8 7 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 -0.3638 -2.4498 -0.2211 Cl 1 UNK 0.0120 10 | 2 C2 1.3154 -1.9025 0.0306 C.3 1 UNK -0.0360 11 | 3 C3 1.3112 -0.4817 0.6347 C.3 1 UNK 0.1119 12 | 4 Cl4 2.1808 -1.9141 -1.5306 Cl 1 UNK 0.0120 13 | 5 Cl5 2.1169 -3.0289 1.1582 Cl 1 UNK 0.0120 14 | 6 Cl6 2.9706 0.0924 0.9592 Cl 1 UNK -0.1358 15 | 7 Cl7 0.4689 0.6765 -0.4319 Cl 1 UNK -0.1358 16 | 8 H8 0.7820 -0.4780 1.5880 H 1 UNK 0.1597 17 | @BOND 18 | 1 1 2 1 19 | 2 2 3 1 20 | 3 2 4 1 21 | 4 2 5 1 22 | 5 3 6 1 23 | 6 3 7 1 24 | 7 3 8 1 25 | @SUBSTRUCTURE 26 | 1 UNK 1 GROUP 0 **** 0 ROOT 27 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/77-47-4.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 11 11 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 Cl1 4.2998 -0.5403 1.5627 Cl 1 UNK -0.1358 10 | 2 C2 3.5491 -1.2180 0.0938 C.3 1 UNK 0.2716 11 | 3 C3 3.5594 -2.7372 0.0866 C.2 1 UNK 0.1200 12 | 4 C4 2.0373 -1.0668 0.0940 C.2 1 UNK 0.1200 13 | 5 Cl5 4.3008 -0.5265 -1.3681 Cl 1 UNK -0.1358 14 | 6 C6 2.3404 -3.2914 0.0836 C.2 1 UNK 0.1200 15 | 7 Cl7 5.0920 -3.5345 0.0833 Cl 1 UNK -0.1200 16 | 8 C8 1.3725 -2.2293 0.0883 C.2 1 UNK 0.1200 17 | 9 Cl9 1.3854 0.5330 0.1014 Cl 1 UNK -0.1200 18 | 10 Cl10 1.9918 -4.9821 0.0755 Cl 1 UNK -0.1200 19 | 11 Cl11 -0.3432 -2.4196 0.0869 Cl 1 UNK -0.1200 20 | @BOND 21 | 1 1 2 1 22 | 2 2 3 1 23 | 3 2 4 1 24 | 4 2 5 1 25 | 5 3 6 2 26 | 6 3 7 1 27 | 7 4 8 2 28 | 8 4 9 1 29 | 9 6 8 1 30 | 10 6 10 1 31 | 11 8 11 1 32 | @SUBSTRUCTURE 33 | 1 UNK 1 GROUP 0 **** 0 ROOT 34 | -------------------------------------------------------------------------------- /examples/data/example_valid_x_mol2/79-09-4.mol2: -------------------------------------------------------------------------------- 1 | @MOLECULE 2 | title: molecule 1 3 | 11 10 1 4 | SMALL 5 | USER_CHARGES 6 | 7 | 8 | @ATOM 9 | 1 O1 2.5277 0.1613 0.1102 O.2 1 UNK -0.4400 10 | 2 C2 2.5216 -1.0680 0.0870 C.2 1 UNK 0.5200 11 | 3 O3 3.6364 -1.8521 0.0638 O.3 1 UNK -0.5300 12 | 4 C4 1.2496 -1.9193 0.0805 C.3 1 UNK -0.1200 13 | 5 C5 -0.0399 -1.0846 0.1060 C.3 1 UNK -0.1800 14 | 6 H6 4.4310 -1.3413 0.0674 H 1 UNK 0.4500 15 | 7 H7 1.2587 -2.5525 -0.8073 H 1 UNK 0.0600 16 | 8 H8 1.2719 -2.5856 0.9434 H 1 UNK 0.0600 17 | 9 H9 -0.9175 -1.7312 0.1003 H 1 UNK 0.0600 18 | 10 H10 -0.0943 -0.4633 1.0008 H 1 UNK 0.0600 19 | 11 H11 -0.1075 -0.4300 -0.7638 H 1 UNK 0.0600 20 | @BOND 21 | 1 1 2 2 22 | 2 2 3 1 23 | 3 2 4 1 24 | 4 3 6 1 25 | 5 4 5 1 26 | 6 4 7 1 27 | 7 4 8 1 28 | 8 5 9 1 29 | 9 5 10 1 30 | 10 5 11 1 31 | @SUBSTRUCTURE 32 | 1 UNK 1 GROUP 0 **** 0 ROOT 33 | -------------------------------------------------------------------------------- /examples/data/example_valid_y.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/examples/data/example_valid_y.npy -------------------------------------------------------------------------------- /examples/data/input0/dict.txt: -------------------------------------------------------------------------------- 1 | c 23448678 2 | C 19691323 3 | ( 10563644 4 | ) 10563644 5 | O 6702959 6 | 1 5781106 7 | 2 4539428 8 | = 4338302 9 | N 4035699 10 | @ 3091178 11 | [ 2650595 12 | ] 2650595 13 | n 2579655 14 | 3 2342587 15 | H 2095167 16 | F 807014 17 | 4 795803 18 | - 746074 19 | S 535951 20 | Cl 488138 21 | / 452099 22 | s 226056 23 | o 218015 24 | 5 210447 25 | + 162460 26 | # 125574 27 | . 125055 28 | \ 102859 29 | Br 100554 30 | 6 52154 31 | P 48606 32 | I 18135 33 | 7 16129 34 | Na 13130 35 | % 11788 36 | 8 8046 37 | B 4056 38 | 9 3918 39 | Si 3537 40 | 0 2813 41 | Se 1587 42 | K 1494 43 | se 887 44 | Li 533 45 | As 247 46 | Zn 155 47 | Ca 147 48 | Mg 122 49 | Al 111 50 | Te 87 51 | te 65 52 | madeupword0000 0 53 | -------------------------------------------------------------------------------- /model_framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChenDdon/AGBTcode/39d45851eca44937dfccca54f7c96dcfbfe2061e/model_framework.png --------------------------------------------------------------------------------