-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
2,089 additions
and
500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
'entity_id', | ||
'entity_type', | ||
'entity_name', | ||
'chain_type', | ||
'n_entities', | ||
'bond_index', | ||
'bond_type', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
molsysmt/element/group/small_molecule/small_molecule_is_amino_acid.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import numpy as np | ||
from .group_names import group_names | ||
|
||
def small_molecule_is_amino_acid(molecular_system, group_name): | ||
|
||
output = False | ||
|
||
if group_name in group_names: | ||
|
||
from molsysmt import get | ||
|
||
atom_names = get(molecular_system, element='atom', selection=f'group_name=="{group_name}"', atom_name=True) | ||
unique_atom_names = np.unique(atom_names) | ||
|
||
if 'CA' in unique_atom_names: | ||
if 'CB' in unique_atom_names: | ||
if 'C' in unique_atom_names: | ||
if 'O' in unique_atom_names: | ||
if 'N' in unique_atom_names: | ||
output = True | ||
warning_message = f"Warning! The group name {group_name} is reserved in the Protein Data " | ||
warning_message += "Bank for a small molecule, not for an amino acid." | ||
print(warning_message) | ||
|
||
return output | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.