Skip to content
  • Help with introspection

    Simulation
    8
    0 Votes
    8 Posts
    7k Views
    StephaneS
    ok great!
  • Sharing a child between two nodes

    Modeling
    3
    0 Votes
    3 Posts
    4k Views
    E
    Thank you! I will try it with this. Yes, I meant SBStructuralGroup :)
  • Creating our own predicates

    Modeling
    3
    0 Votes
    3 Posts
    4k Views
    E
    Thank you! Using the GetClass and GetElementUUID methods is enough for my purposes :)
  • How to get selenium nano particles in spherical shape?

    Moved SAMSON
    3
    0 Votes
    3 Posts
    5k Views
    StephaneS
    Another possibility could be to start from a selenium crystal and "sculpt it". Get a CIF file for a crystal you like at http://rruff.geo.arizona.edu/AMS/minerals/Selenium. You will need the CIF importer in the Crystal Creator SAMSON Element (https://samson-connect.net/app/main?key=element&uuid=58a75a78-abbc-2c60-6214-e668b5c45a0d). In this example, I'm using this CIF file: http://rruff.geo.arizona.edu/AMS/download.php?id=10390.cif&down=cif. When you import the CIF file, use a big enough number of cells, for example 10 in each direction: [image: 0_1528385266091_08798f27-b8d7-4139-8e87-97f67c07b32f-image.png] This will create 32000 atoms: [image: 0_1528385319471_d2cb857d-3ff4-4d2f-ba1b-9f52e0170c30-image.png] Select one atom around the center of the crystal, with the selection editor [image: 0_1528385357394_dd40b047-a00b-4346-8801-e0193268107e-image.png]: [image: 0_1528385397414_315ea865-a94f-4f62-a4be-8348071ee4e0-image.png] (look around to make sure the selected atom is approximately in the center) Open the Find window (CTRL / CMD + F or Selection / Find...): [image: 0_1528385478242_d43a3244-962b-4bcd-94f1-4ea3c052fe58-image.png] Enter the following search string: n.t a w 20A of n.s in the box named "Selection string" and press the OK button. This is the short form of "node.type atom within 20 Angstrom of node.selected", i.e. all atoms within 20A of the current selection. This selects atoms in a 20A radius sphere: [image: 0_1528385607949_e9280e37-b54c-4560-9e6a-133282b1f0bc-image.png] Open the Find window again, to invert the selection with the following NSL expression: n.t a and !n.s (in the box named "Selection string", then press OK). This means "all nodes that are atoms and that are not selected". This selects everything outside the nanoparticle: [image: 0_1528385806987_1.png] Press the "delete" key to erase the selected atoms, or click on the "Current selection" widget and select "Erase selection": [image: 0_1528385902405_a3c8d30d-c47e-41ed-a5da-5d9a307eb47c-image.png] This leaves the particle alone: [image: 0_1528385954376_7e5484ab-1bb4-44b0-8d96-f6534eb60b9d-image.png] In the Document view, select the Property model called "Selenium crystal" and delete it, i.e. go from [image: 0_1528386023100_d66cd933-e574-4c80-bbc9-35c1820851ee-image.png] to [image: 0_1528386038473_4a83e287-d616-4cbb-ad50-695cc3fd846d-image.png] You now have a spherical selenium nanoparticle with a 20A radius. Save it to a SAMSON file format or export it to a PDB file. Here is the SAMSON version: 0_1528386144295_Selenium nanoparticle.sam Hope this helps, Stephane
  • hemispherical capping of nano tube

    Share SAMSON documents
    2
    0 Votes
    2 Posts
    5k Views
    AdminA
    Hello, here is a capped nanotube for SAMSON 0.7.0. Hope this helps. Stephane [image: 0_1528279139422_Capped nanotube.png] 0_1528279059922_Capped nanotube.sam
  • Custom projection matrix for the SBDDocumentCamera

    Apps
    3
    0 Votes
    3 Posts
    4k Views
    K
    First of all I have to thank you for the quick response. Funnily, I thought of using const_cast on the matrix pointer beforehand but considered it as too "hacky". There should be several possibilites how one could introduce this into the API: Each camera gets a state that determines whether it implements a symmetric or asymmetric projection including two methods that query and set the state. Then, an additonal method (possibly like SetPlanesAsymmetric(float left, float right, float top, float bottom)) could be used to transfer the wanted plane values to SAMSON. This approach would leave the old API intact, if the symmetric projection is the standard state. Derive a class like SBDAsymmetricDocumentCamera from the currently available SBDDocumentCamera, overriding all methods concerning the projection matrix. This is probably the least favourable alternative, although the old API would still be valid. The camera gets two additional methods SetValuesSymmetric(float aspect, float fovy, float zNear, float zFar) and SetValuesAsymmetric(float left, float right, float top, float bottom, float zNear, float zFar). Then, the GetProjectionMatrix() and GetProjectionMatrixTranspose() methods would have to be changed to take an additional boolean input parameter determining which kind of matrix is wanted. This would break the old API and I am not sure how this would propagate to the convenience display methods like SAMSON::displayCylinders(...). Unfortunately I do not know which of these possibilities (and I probably missed some additional ones) would fit best into your way of writing SAMSON. Best, Karsten
  • Facing problem in using AutoDock Vina

    SAMSON Extensions
    3
    0 Votes
    3 Posts
    6k Views
    P
    Thank you so much sir....It really helped.
  • Get Children of Node

    Apps
    3
    0 Votes
    3 Posts
    4k Views
    M
    yes you are right both ways work fine. I had a bug I was unaware of in a different position. thx!
  • Add new items in context menu when right-clicking on a selection

    GUI
    3
    0 Votes
    3 Posts
    4k Views
    K
    @stephane-redon I think it can be nice for the developers to be able to register more actions in the context menu. But it can also make the context menu too crowded. Perhaps, you can make something in the Preferences so that the users can select to add which actions to show in the context menu. Actually, I am developing an app to convert a list of conformations to a path and vice versa for my work. So I was thinking it can be useful to add an action in the context menu so that after selecting a list of conformations in the Document View, I would right-click and choose "Convert to Path". Do you have any suggestion to do it for this case?
  • ElementGenerator not working

    Getting started
    5
    0 Votes
    5 Posts
    5k Views
    E
    In case someone else is in the same situation. I just finished porting our plugin to 0.7.0 and the only changes I had to make were in SAMSON::getProxy (the arguments have changed), and the call functions of the proxies (arguments of SBValue type used to be pointers, now they are passed by reference). We have still to test it to make sure all functionality is working, but so far it seems that was it. Regards, Elisa
  • SBGWindow raising

    GUI
    3
    0 Votes
    3 Posts
    4k Views
    YassineY
    Actually I didn't explain well the case where the raise didn't worked for me as I expected. When you have two windows, with the first one locked and the second unlocked. If the raise function is called for the second unlocked window, it doesn't go on top of the first locked window. For those who might interest, I found a simple solution. You need to temporarily lock the window, call the raise function then unlock the window. Thank you Stephane for your quick answer ! Yassine
  • In-code camera duplication

    Apps
    2
    0 Votes
    2 Posts
    3k Views
    DmitriyMarinD
    Hi @Karsten , For every node, you create you need to invoke create function, and then if you want it to appear in the DataGraph this node needs to be added to a parent node: auto camcopy = SAMSON::getActiveCamera()->clone(); // clone the camera camcopy->create(); // create the node document->addChild(camcopy); // add the created camera into the active document /* ... some modifications of the camcopy */ SAMSON::getActiveDocument()->setActiveCamera(camcopy); // set the active camera
  • Conversion from radian to degree does not work

    Apps
    4
    0 Votes
    4 Posts
    4k Views
    K
    Thanks. It helps. SBQuantity::radian radianValue(1.5); SBQuantity::degree degreeValue = radianValue * SBConstant::RadToDeg;
  • return boolean value for getPosition and setPosition

    Feature requests
    2
    0 Votes
    2 Posts
    3k Views
    StephaneS
    Good idea, it will be in 0.8.
  • Logging

    Getting started
    3
    0 Votes
    3 Posts
    4k Views
    M
    Yes thanks. That's what I was looking for.