semvec/pypi-packages huggingface dataset:
jtnnencoder 0.1
An Easy to install version of the jtnn encoder for generation of latent molecule features.
License: MIT
Keywords: cheminformatics,chemistry

# jtnnencoder
Pip installable version of the Junction Tree Variational Autoencoder https://arxiv.org/abs/1802.04364.
The original, full repository can be found here: https://github.com/wengong-jin/icml18-jtnn

Intended to be used as a simple interface for generating molecular features for molecules based on JTNN latent vectors.

## Install
```
$ pip install jtnnencoder
$ pip install torch
```

You will also need rdkit:
```
$ conda install -c rdkit rdkit
```

## Use

```
from jtnnencoder import JTNNEmbed

smiles = ['CC1(C)[C@H]2C[C@H](C/C=C\CCCC(=O)O)[C@@H](NC(=O)c3csc4ccc(O)cc34)[C@@H]1C2']
jtnn = JTNNEmbed(smiles)
features = jtnn.get_features()

```

`features` is then a numpy ndarray of dimension (n_smiles x n_features).
EngimaEncryptionConcept 0.0.5
Enigma Machine Encryption
License: MIT
Keywords: encryption

This is Project Encryption, which allows you to encrypt any strings using the Enigma Machine concepts.
This module can **only encrypt strings** as of now, encryption for numbers and symbols will come in the future updates.

**Encryption**

*Concept*
In order to Encrypt a string, you would need three rotor layouts.
A rotor layout is a list consisting 26 numbers, ranging from 1-26, with each number representing a letter in the alphabet.
For example, in [1,2,3,4,5,...], 1 would equal A, and 2 would equal B and so on.
You can change the order of the numbers to enhance the description. For example: [1,26,3,9,11,20...]
**If you do not** want to make your own list, there is an **autogenerate** option to generate a random rotor layout and random rotor position (will be explained later).

*Example*
```
from EnigmaEncryption import *

EnigmaMachine = EnigmaAssembly(autogenerate=True)
encryptedText = EnigmaMachine.Encrypt("Example string getting encrypted")
print(encryptedText)
```
**Output (Varies and is different each time you run it)**
An example of the output might be:
```
Padzkfj avugmg rgieasa mimknkrss
```

**Decryption**

*Concept*
In order to Encrypt a string, you would need the three rotor layouts and the initial position for the rotors of the machine.
The starting position of the rotors can affect the encoding even with the same set of rotor layouts.

You can get the rotations and the rotor layouts using:
```
from EnigmaEncryption import *

EnigmaMachine = EnigmaAssembly(autogenerate=True)

Rotations = EnigmaMachine.getRotations() //Gets the rotations of the three rotors in a dictionary. For example, Rotations["Rotor1"] will get the rotation of Rotor 1, Rotations["Rotor2"] will get rotations of Rotor 2.

Keys = EnigmaMachine.getKeys() //Gets the rotor layouts in a dictionary. For example, Rotations["Rotor1"] will get the layout of Rotor 1, Rotations["Rotor2"] will get layout of Rotor 2.

```

To decrypt the message, you have to input the encrypted text,  rotations and the layouts like the following code:

```
from EnigmaEncryption import *

EnigmaMachine = EnigmaAssembly(autogenerate=True)
Rotations = EnigmaMachine.getRotations()
Keys = EnigmaMachine.getKeys()
Rotor1 = Rotations["Rotor1"] //get Rotation of rotor 1
Rotor2 = Rotations["Rotor2"] //get Rotation of rotor 2
Rotor3 = Rotations["Rotor3"] //get Rotation of rotor 3
Key1 = Keys["Rotor1"] //get Layout 1
Key2 = Keys["Rotor2"] //get Layout 2
Key3 = Keys["Rotor3"] //get Layout 3

encryptedText = EnigmaMachine.Encrypt("Example string getting encrypted")
d = EnigmaMachine.Decrypt(encryptedText,rotation1=Rotor1,rotation2=Rotor2,rotation3=Rotor3,code1=Key1,code2=Key2,code3=Key3)

print(f"Encrypted: {encryptedText}")
print(f"Decrypted: {d}")
```
**Output (May vary)**
```
Encrypted: Reotmlc pvdxex mxkwpqp ekxafactt
Decrypted: Example string getting encrypted
```