-
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
14 changed files
with
274 additions
and
207 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from molsysmt._private.exceptions import ArgumentError | ||
|
||
def digest_copy_if_None(copy_if_None, caller=None): | ||
|
||
if isinstance(copy_if_None, bool): | ||
return copy_if_None | ||
|
||
raise ArgumentError('copy_if_None', value=copy_if_None, caller=caller, message=None) | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import numpy as np | ||
|
||
def get_bonded_atom_pairs(group_name, atom_names, atom_indices=None, sorted=True): | ||
|
||
from .get_group_type import get_group_type_from_group_name | ||
from amino_acid import get_bonded_atom_pairs as get_bonded_atom_pairs_from_amino_acid | ||
from ion import get_bonded_atom_pairs as get_bonded_atom_pairs_from_ion | ||
from small_molecule import get_bonded_atom_pairs as get_bonded_atom_pairs_from_small_molecule | ||
from terminal_capping import get_bonded_atom_pairs as get_bonded_atom_pairs_from_terminal_capping | ||
from water import get_bonded_atom_pairs as get_bonded_atom_pairs_from_water | ||
|
||
group_type = get_group_type_from_group_name(group_name) | ||
|
||
bonds = None | ||
|
||
match group_type: | ||
|
||
case 'amino acid': | ||
bonds = get_bonded_atom_pairs_from_amino_acid(group_name, atom_names, atom_indices=atom_indices, | ||
sorted=sorted) | ||
|
||
case 'ion': | ||
bonds = get_bonded_atom_pairs_from_ion(group_name, atom_names, atom_indices=atom_indices, sorted=sorted) | ||
|
||
case 'lipid': | ||
pass | ||
|
||
case 'nucleotide': | ||
pass | ||
|
||
case 'oligosaccharide': | ||
pass | ||
|
||
case 'saccharide': | ||
pass | ||
|
||
case 'small molecule': | ||
bonds = get_bonded_atom_pairs_from_small_molecule(group_name, atom_names, atom_indices=atom_indices, | ||
sorted=sorted) | ||
|
||
case 'terminal capping': | ||
bonds = get_bonded_atom_pairs_from_terminal_capping(group_name, atom_names, atom_indices=atom_indices, | ||
sorted=sorted) | ||
|
||
case 'water': | ||
bonds = get_bonded_atom_pairs_from_water(atom_names, atom_indices=atom_indices, sorted=sorted) | ||
|
||
|
||
if bonds is None: | ||
print(f'Warning! The amino acid {group_name} has no template.') | ||
raise ValueError | ||
|
||
return bonds | ||
|
Oops, something went wrong.