CombineMols3D
Combine 2 molecules in 3D by sample.
How it works?
In short, it could be summarized into 2 steps:
- Translation:
- The new bond length is determined by the summation of the covalent radii of the two atoms.
- Set one atom as the central of a sphere, sample positions on this sphere and calculate the repulsion between the new addon to the whole molecule. (The repulsion is measured by the summation of the inverse distance.)
- Choose the minimum repulsion position and translate the whole addon molecule as a rigid body.
- Rotation:
- Set the bonded site as center and the nearest neighbor as rotation axes. Rotate the addon molecule as a rigid body
- Sample rotation angles to minimize the repulsion between the addon molecule to the main molecule. (Again, the repulsion is measured by the summation of the inverse distance.)
- Choose the minimum repulsion image and this is the final combination state.
Install
pip install combinemols3d
Usage
- Prepare your to-be-bonded molecules as
ase.Atomsobject. (Readasedocumentation for format manipulation.) - Determine which sites to be bonded together. (dummy sites)
- Combine them by eliminate the dummy sites.
from ase.visualize import view
from ase.build.molecule import molecule
from combinemols3d.CombineMols3D import combine_2_mols_with_dummy, combine_2_mols
main_mol = molecule('C7NH5')
sub_mol = molecule('BDA')
view(main_mol)
view(sub_mol)
final_mol = combine_2_mols_with_dummy(molecule_1=main_mol.copy(), molecule_2=sub_mol.copy(),
dummy_atom_index_1=11, dummy_atom_index_2=6)
view(final_mol)
If you don't want to eliminate the dummy sites, use the combine_2_mols instead:
final_mol = combine_2_mols(molecule_1=main_mol, molecule_2=sub_mol,
tgt_atom_1_index=11, tgt_atom_2_index=6)
view(final_mol)
Other parameters are same for the two functions:
-
Conformation related:
-
skin: to get a proper bond length for the new bond. Here we adopt the covalent radii method. A skin parameter is added to finetune the bond length, though it is 0 by default.$R(\mathrm{AB})=r(\mathrm{A})+r(\mathrm{B})+skin$
-
cutoff_mult: there are several places to detect neighbors for a specific atom. By default, it isnatural cutoffas follow equation:$DetectRange(\mathrm{AB})=r(\mathrm{A})+r(\mathrm{B})+0.3$
We can enlarge our search scope to multiply the
natural cutoffas follow equation:$DetectRange(\mathrm{AB})=cutoff mult*(r(\mathrm{A})+r(\mathrm{B})+0.3)$
-
-
Performance related:
sample_times: how many times to sample addon positions in translation and angles in rotation.rotation_times: In the rotation stage, we will rotate the whole addon molecule as a rigid body. The orientations of the addon site to its neighbors are taken as fixed rotation axes. How many neighbors to be considered could be performance critical.
Note
Contact me: 1660810667@qq.com
Metadata
Release files for combinemols3d 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| combinemols3d-1.1.0.tar.gz | 505.9 kB | Without provenance | Details for combinemols3d-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| combinemols3d-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for combinemols3d-1.1.0-py3-none-any.whl |
Total release size: 512.3 kB
Release files / combinemols3d-1.1.0.tar.gz
| Download URL | combinemols3d-1.1.0.tar.gz |
|---|---|
| Size | 505.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
247cb149b41bae1b154ffcbeadfb7d5c101a1748eb90e7bd34973815bf44ef2d
|
|
BLAKE2b-256 checksum How to use checksums |
0e1073d6f6e111878e996de08d6b1f54f17b98aa7c0ddfd9422db9edc7eb2143
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / combinemols3d-1.1.0-py3-none-any.whl
| Download URL | combinemols3d-1.1.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7eb584bd1d61525baf6ed2cce77d1682130cb5f71e8dd306ee0b84eb42a6c435
|
|
BLAKE2b-256 checksum How to use checksums |
aba9667727c1575c10761075f3170e30b82b722e4c8d532fb47b02dd949bf09e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for combinemols3d 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.