Re: [Avogadro-devel] [Avogadro-Discuss] XTALOPT hangs if server connection lost

2015-08-21 Thread Cohen, Ronald
Unfortunately the CLI is not correct! I get:

Warning:  Optimizer::Update: Error loading structure at
/home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/

and when I look at that directory I find on the client:

ls /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/
3x00051  job.sh  structure.state  xtal.in
ucfbcoh@tomcat:~/src/xtalopt2/build$ ls
/home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/3x00051/
job.sh  pwscf.save  xtal.in  xtal.out

I had fixed this also long ago, but it is back again. It is storing
one directory down.

Ron

---
Ronald Cohen
Geophysical Laboratory
Carnegie Institution
5251 Broad Branch Rd., N.W.
Washington, D.C. 20015
rco...@carnegiescience.edu
office: 202-478-8937
skype: ronaldcohen
https://twitter.com/recohen3
https://www.linkedin.com/profile/view?id=163327727


On Fri, Aug 21, 2015 at 1:48 AM, Ronald Cohen
rco...@carnegiescience.edu wrote:
 I switched to the CLI ssh and so far no problems! I guess it is a problem
 with sshlib.
 Ron
 Sent from my iPad

 On Aug 17, 2015, at 9:41 AM, David Lonie david.lo...@kitware.com wrote:

 On Fri, Aug 14, 2015 at 4:35 PM, Cohen, Ronald rco...@carnegiescience.edu
 wrote:

 I had fixed this in an earlier version but don't remember how.
 Sometimes the connection to the server or nameserver goes down (about
 once a day) and I see an error like:

 SSHConnectionLibSSH::isConnected(): server timeout.
 SSH error:  Failed to resolve hostname legion.rc.ucl.ac.uk (Name or
 service not known)
 Cannot connect to ssh server ucfb...@legion.rc.ucl.ac.uk:22
 Warning:  Cannot connect to ssh server


 If you're having issues resolving hosts, there's not much that can be done
 about that from the XtalOpt side of things. Might be VPN related?

 Dave

 --

 ___
 Avogadro-Discuss mailing list
 avogadro-disc...@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/avogadro-discuss

--
___
Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-devel


Re: [Avogadro-devel] [Avogadro-Discuss] XTALOPT hangs if server connection lost

2015-08-21 Thread Cohen, Ronald
I think the attached code I edited fixes this problem.

Ron
---
Ronald Cohen
Geophysical Laboratory
Carnegie Institution
5251 Broad Branch Rd., N.W.
Washington, D.C. 20015
rco...@carnegiescience.edu
office: 202-478-8937
skype: ronaldcohen
https://twitter.com/recohen3
https://www.linkedin.com/profile/view?id=163327727


On Fri, Aug 21, 2015 at 12:08 PM, Cohen, Ronald
rco...@carnegiescience.edu wrote:
 Unfortunately the CLI is not correct! I get:

 Warning:  Optimizer::Update: Error loading structure at
 /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/

 and when I look at that directory I find on the client:

 ls /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/
 3x00051  job.sh  structure.state  xtal.in
 ucfbcoh@tomcat:~/src/xtalopt2/build$ ls
 /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/3x00051/
 job.sh  pwscf.save  xtal.in  xtal.out

 I had fixed this also long ago, but it is back again. It is storing
 one directory down.

 Ron

 ---
 Ronald Cohen
 Geophysical Laboratory
 Carnegie Institution
 5251 Broad Branch Rd., N.W.
 Washington, D.C. 20015
 rco...@carnegiescience.edu
 office: 202-478-8937
 skype: ronaldcohen
 https://twitter.com/recohen3
 https://www.linkedin.com/profile/view?id=163327727


 On Fri, Aug 21, 2015 at 1:48 AM, Ronald Cohen
 rco...@carnegiescience.edu wrote:
 I switched to the CLI ssh and so far no problems! I guess it is a problem
 with sshlib.
 Ron
 Sent from my iPad

 On Aug 17, 2015, at 9:41 AM, David Lonie david.lo...@kitware.com wrote:

 On Fri, Aug 14, 2015 at 4:35 PM, Cohen, Ronald rco...@carnegiescience.edu
 wrote:

 I had fixed this in an earlier version but don't remember how.
 Sometimes the connection to the server or nameserver goes down (about
 once a day) and I see an error like:

 SSHConnectionLibSSH::isConnected(): server timeout.
 SSH error:  Failed to resolve hostname legion.rc.ucl.ac.uk (Name or
 service not known)
 Cannot connect to ssh server ucfb...@legion.rc.ucl.ac.uk:22
 Warning:  Cannot connect to ssh server


 If you're having issues resolving hosts, there's not much that can be done
 about that from the XtalOpt side of things. Might be VPN related?

 Dave

 --

 ___
 Avogadro-Discuss mailing list
 avogadro-disc...@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/avogadro-discuss
/**
  SSHConnection - Connection to an ssh server for execution, sftp, etc.

  Copyright (C) 2010-2012 by David C. Lonie

  This source code is released under the New BSD License, (the License).

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
 ***/

#ifdef ENABLE_SSH

#include globalsearch/sshconnection_cli.h

#include globalsearch/sshmanager_cli.h

#include QtCore/QDebug
#include QtCore/QProcess

namespace GlobalSearch {

  SSHConnectionCLI::SSHConnectionCLI(SSHManagerCLI *parent)
: SSHConnection(parent)
  {
  }

  SSHConnectionCLI::~SSHConnectionCLI()
  {
  }

  bool SSHConnectionCLI::execute(const QString command,
 QString stdout_str,
 QString stderr_str,
 int exitcode)
  {
return this-executeSSH(command, QStringList(),
stdout_str, stderr_str, exitcode);
  }

  bool SSHConnectionCLI::copyFileToServer(const QString localpath,
  const QString remotepath)
  {
return this-executeSCPTo(localpath, remotepath);
  }

  bool SSHConnectionCLI::copyFileFromServer(const QString remotepath,
const QString localpath)
  {
return this-executeSCPFrom(remotepath, localpath);
  }

  bool SSHConnectionCLI::readRemoteFile(const QString filename,
QString contents)
  {
return this-executeSSH(cat, QStringList(filename), contents);
  }

  bool SSHConnectionCLI::removeRemoteFile(const QString filename)
  {
return this-executeSSH(rm, QStringList(filename));
  }

  bool SSHConnectionCLI::copyDirectoryToServer(const QString localpath,
   const QString remotepath)
  {
QStringList args (-p );
args  remotepath;
this-executeSSH(mkdir, args);
QString arg1;
arg1 = remotepath + /.. ;
return this-executeSCPTo(localpath, arg1, QStringList(-r));
  }

  bool SSHConnectionCLI::copyDirectoryFromServer(const QString remotepath,
 const QString localpath)
  { 
QStringList args (-p );
args  

Re: [Avogadro-devel] Symmetry element rendering

2015-08-21 Thread Marcus D. Hanwell
On Wed, Aug 19, 2015 at 11:26 AM, Marcus Johansson mcode...@gmail.com wrote:

 Hi

 Was wondering if anyone has some input on rendering symmetry elements in 
 Avogadro v2. There is a need for “disc” (mirror plane) and “vector” (rotation 
 axis) geometries as well as alpha in order to make things look good. Im 
 currently using the “cylinder” and “sphere” geometries, but as you can see 
 they are not well suited for the job.

For some of the other display types we added factories to create
triangle geometry. Many things can be represented by triangle meshes,
we made the special cases for spheres because we were using impostors
and cylinders because there are lots of them and might want to use
impostors in the future.

It would be great to consider what primitives might be missing, and
either add factories that simply create meshes, or boost them to new
primitive types if that makes more sense. I also need to dig into an
issue with text rendering on Windows where it appears to be causing
crashes in the latest release.

It would be great to get symmetry elements in Avogadro 2, thanks for
working on this!

Thanks,

Marcus

--
___
Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-devel


Re: [Avogadro-devel] Symmetry element rendering

2015-08-21 Thread Marcus Johansson
Any chance someone could apply this patch to the avogadro v1 master symmetry 
extension /libmsym?

https://github.com/mcodev31/libmsym/commit/b2945fa8a5d7027f6afd8297af465f61981b9ba3.patch

I don’t have a fork and pressed for time.
It won’t build with g++ only with clang (requires VLA).

Might need to set_target_properties (msym PROPERTIES POSITION_INDEPENDENT_CODE 
TRUE”) as well in symmetry/CMakeLists.txt. (not working on the arch linux 
package manager) since libmsym uses the BUILD_SHARED_LIBS flag.

On 21 Aug 2015, at 15:47, Marcus D. Hanwell marcus.hanw...@kitware.com wrote:

 It would be great to consider what primitives might be missing, and
 either add factories that simply create meshes, or boost them to new
 primitive types if that makes more sense. I also need to dig into an
 issue with text rendering on Windows where it appears to be causing
 crashes in the latest release.

Avogadro v1 has a nice transparent partial disc rendering for angles that would 
be nice for cubic groups, a rectangle would probably be better for the other 
ones since they have orientation.

 It would be great to get symmetry elements in Avogadro 2, thanks for
 working on this!

No problem it’s fun. There are some more features coming when I get the time:
Selection of symmetrically equivalent atoms (requires selection of atoms).
Symmetry locking when moving atoms (requires some way to restrict coordinate 
changes in plugins)
Generation of SALCs from basis functions (requires surface rendering)
Determination of irreducible representations and symmetrisation of basis 
functions from other calculations (proper symmetrisation requires code updates 
in libmsym).
Character table gui.


--
___
Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-devel