Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scwrl4 compatability on Macs #20

Open
wdawson14 opened this issue Dec 5, 2022 · 0 comments
Open

scwrl4 compatability on Macs #20

wdawson14 opened this issue Dec 5, 2022 · 0 comments

Comments

@wdawson14
Copy link

Fails to implement Scwrl4 correctly when using ISAMBARD on Mac OS - gives the following error

CalledProcessError                        Traceback (most recent call last)
/var/folders/fp/z81k35zn0tgg05n4p_cm85lm0000gp/T/ipykernel_13690/3544206324.py in <module>
----> 1 x = modelling.pack_side_chains_scwrl(my_pdb, sequences)
 
~/opt/anaconda3/lib/python3.9/site-packages/isambard/modelling/scwrl.py in pack_side_chains_scwrl(assembly, sequences, rigid_rotamer_model, hydrogens)
    168                          'number of Polypeptides ({}).'.format(
    169                              len(sequences), len(protein)))
--> 170     scwrl_std_out, scwrl_pdb = run_scwrl(
    171         assembly.pdb, ''.join(sequences), path=False,
    172         rigid_rotamer_model=rigid_rotamer_model, hydrogens=hydrogens)
 
~/opt/anaconda3/lib/python3.9/site-packages/isambard/modelling/scwrl.py in run_scwrl(pdb, sequence, path, rigid_rotamer_model, hydrogens)
     86             if not hydrogens:
     87                 scwrl_command.append('-h')
---> 88             scwrl_std_out = subprocess.check_output(scwrl_command)
     89             scwrl_out.seek(0)
     90             scwrl_pdb = scwrl_out.read()
 
~/opt/anaconda3/lib/python3.9/subprocess.py in check_output(timeout, *popenargs, **kwargs)
    422         kwargs['input'] = empty
    423 
--> 424     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    425                **kwargs).stdout
    426 
 
~/opt/anaconda3/lib/python3.9/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
    526         retcode = process.poll()
    527         if check and retcode:
--> 528             raise CalledProcessError(retcode, process.args,
    529                                      output=stdout, stderr=stderr)
    530     return CompletedProcess(process.args, retcode, stdout, stderr)
 
CalledProcessError: Command '['Scwrl4', '-i', '/var/folders/fp/z81k35zn0tgg05n4p_cm85lm0000gp/T/tmpd6p1uafm', '-o', '/var/folders/fp/z81k35zn0tgg05n4p_cm85lm0000gp/T/tmpilzc7q65', '-s', '/var/folders/fp/z81k35zn0tgg05n4p_cm85lm0000gp/T/tmpeg5akh6c', '-v', '-h']' returned non-zero exit status 1.

Scwrl4 is installed correctly and on the users PATH.

Issue is solved by editing the scwrl.py file to give the location of the Scwrl4.ini file as well in the code:

scwrl_command = ['Scwrl4',
                             '-i', scwrl_tmp.name,
                             '-o', scwrl_out.name,
                             '-s', scwrl_seq.name,
                             '-p','/Path/to/scwrl4/Scwrl4.ini']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant