|
From: Subha K <sub...@gm...> - 2016-10-20 17:48:32
|
Hi Gabriel, Thanks for that suggestion. You are correct, the file is missing, but I don't understand why my previous shutil.copy command is not working. Thanks, Subha On Thu, Oct 20, 2016 at 11:38 AM, Gabriel Marques < gab...@sc...> wrote: > Is there an error output? I could see it not working if File10 is not > located in the present working directory. If you are running the script by > using the load command in pymol you can type pwd or cmd.pwd() on the input > line to see the present working directory. The best bet to fix the problem > is to prefix the absolute path to the directory with the pdb files. Like so: > > cmd.load(‘/home/me/pdbs/‘ + X + ‘.pdb’, x) > > Alternatively you can use the cd (change directory) command to move > pymol’s pwd to the directory containing the pdbs, then you can run the load > myscript.py command. > > Regards, > Gabriel Marques > > > > On Oct 20, 2016, at 1:06 PM, Subha K <sub...@gm...> wrote: > > > > Hi there, > > > > If the base name of my file is stored in a variable, how can I load the > file using the variable? > > > > Eg., My filename is "File10.pdb" > > and I have, X = File10 > > > > I tried loading it using, > > cmd.load ( X+".pdb", X), but it doesn't seem to work. > > > > Sorry for posting a very basic question. > > > > Thanks, > > Subha > > > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot______ > _________________________________________ > > PyMOL-users mailing list (PyM...@li...) > > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > > Archives: http://www.mail-archive.com/pym...@li... > > |