Exemplo n.º 1
0
 def test_w_just_one_fragment_by_user(self):
     with TemporaryDirectory(suffix='_test_mdciao') as tmpdir:
         cli.interface([self.traj, self.traj_reverse],
                       self.geom,
                       output_dir=tmpdir,
                       fragments=["0-5"],
                       flareplot=False,
                       no_disk=self.no_disk
                       )
Exemplo n.º 2
0
 def test_interface_wo_frag_idxs_groups(self):
     with TemporaryDirectory(suffix='_test_mdciao') as tmpdir:
         input_values = (val for val in ["0-1", "2,3"])
         with mock.patch('builtins.input', lambda *x: next(input_values)):
             cli.interface([self.traj, self.traj_reverse],
                           self.geom,
                           output_dir=tmpdir,
                           flareplot=False,
                           no_disk=self.no_disk
                           )
Exemplo n.º 3
0
 def test_no_top(self):
     with TemporaryDirectory(suffix='_test_mdciao') as tmpdir:
         cli.interface([self.traj, self.traj_reverse],
                       frag_idxs_group_1=[0],
                       frag_idxs_group_2=[1],
                       output_dir=tmpdir,
                       flareplot=False,
                       plot_timedep=False,
                       no_disk = self.no_disk
         )
Exemplo n.º 4
0
 def test_w_just_two_fragments_by_user(self):
     with TemporaryDirectory(suffix='_test_mdciao') as tmpdir:
         cli.interface([self.traj, self.traj_reverse],
                       self.geom,
                       frag_idxs_group_1=[0],
                       frag_idxs_group_2=[1],
                       output_dir=tmpdir,
                       fragments=["0-5",
                                  "6-10"],
                       flareplot=False,
                       no_disk=self.no_disk
                       )
Exemplo n.º 5
0
 def test_w_nomenclature_CGN_BW_fragments_are_consensus_and_flareplot(self):
     with TemporaryDirectory(suffix='_test_mdciao') as tmpdir:
         input_values = (val for val in ["TM6", "*H5"])
         shutil.copy(test_filenames.CGN_3SN6, tmpdir)
         shutil.copy(test_filenames.pdb_3SN6, tmpdir)
         shutil.copy(test_filenames.adrb2_human_xlsx, tmpdir)
         with remember_cwd():
             os.chdir(tmpdir)
             with mock.patch('builtins.input', lambda *x: next(input_values)):
                 cli.interface([self.traj, self.traj_reverse],
                               self.geom,
                               output_dir=tmpdir,
                               fragments=["consensus"],
                               CGN_PDB="3SN6",
                               BW_uniprot="adrb2_human",
                               accept_guess=True,
                               #no_disk=self.no_disk
                               )
Exemplo n.º 6
0
 def test_w_nomenclature_CGN_BW(self):
     with TemporaryDirectory(suffix='_test_mdciao') as tmpdir:
         shutil.copy(test_filenames.CGN_3SN6, tmpdir)
         shutil.copy(test_filenames.pdb_3SN6, tmpdir)
         shutil.copy(test_filenames.adrb2_human_xlsx, tmpdir)
         with remember_cwd():
             os.chdir(tmpdir)
             cli.interface([self.traj, self.traj_reverse],
                           self.geom,
                           output_dir=tmpdir,
                           fragments=["967-1001",  # TM6
                                      "328-353"],  # a5
                           CGN_PDB="3SN6",
                           BW_uniprot="adrb2_human",
                           accept_guess=True,
                           flareplot=False,
                           no_disk=self.no_disk
                           )
Exemplo n.º 7
0
#    mdciao is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Lesser General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    mdciao is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Lesser General Public License for more details.
#
#    You should have received a copy of the GNU Lesser General Public License
#    along with mdciao.  If not, see <https://www.gnu.org/licenses/>.
##############################################################################

from mdciao.cli import interface
from mdciao.parsers import parser_for_interface
parser = parser_for_interface()
a  = parser.parse_args()
#from mdciao.command_line_tools import _inform_of_parser
#_inform_of_parser(parser)

if not a.fragmentify:
    a.fragment_names="None"

# Make a dictionary out ot of it and pop the positional keywords
b = {key:getattr(a,key) for key in dir(a) if not key.startswith("_")}
for key in ["trajectories", "fragmentify"]:
    b.pop(key)

neighborhood = interface(a.trajectories,**b)