Comments (7)
@VHchavez has your issue been fully addressed? Can I close now? Just doing some cleanup on old issues :) Thanks!
from qcelemental.
I'm not quite following your code. What is psi4geo
-- str, psi4 Mol, etc.? The below works. I don't see how you're creating the qcel.models.Molecule
object in your snippet.
import qcelemental as qcel
psi4geo = """
He 0 0 0
"""
molplot = qcel.models.Molecule.from_data(psi4geo).show()
print(molplot)
from qcelemental.
Ope, sorry about that. It is a psi4 geometry:
import psi4
# Using the function definition from above.
benzene = psi4.geometry("pubchem:benzene")
molshow(benzene)
from qcelemental.
Ok, at first inspection, I didn't think your molshow
would work at all. Inspecting further, psi4geo
is taking the argument of self
, and since the only operations on self
in the show
fn is to_string
, and psi4.core.Molecule
also has a to_string
, your fn works.
Therefore, I think you could make a psi4molinstance.show()
work by attaching it to the class like these other mol extensions. https://github.com/psi4/psi4/blob/master/psi4/driver/molutil.py#L227 It'd be good to also have a test case in the psi4 tests and a "using" fn for nglview in /tests/pytests/addons.py
from qcelemental.
Oh wow, that's pretty nifty! I've never added functions in this fashion. It works just fine 🐶.
Questions:
- To add the "using" test, do I need to simply add NGLview as a new key here?
- What would be an appropriate test? Assert that an
nglview.widget.NGLWidget
object gets returned?
Thanks.
from qcelemental.
To add the "using" test, do I need to simply add NGLview as a new key here?
Yes, that should work fine.
What would be an appropriate test? Assert that an nglview.widget.NGLWidget object gets returned?
Agreed, just check the type returned.
from qcelemental.
@VHchavez thank you!
from qcelemental.
Related Issues (20)
- Unsuccessful atom mapping attempts HOT 4
- Add a citation file? HOT 3
- Tests don't find py3Dmol HOT 4
- Setup qcel.models.Molecule with non-contiguous fragments HOT 5
- Make basis set optional in WavefunctionProperties
- Molecule declares extras dictionary as Dict[str, Any] but value can be None
- PubChem test fails HOT 1
- BaseSettings has moved to a new package pydantic-settings HOT 5
- qcelemental does not build with Python 3.12 HOT 3
- Include extras in get_hash function of Molecule
- Floating point number allowed for molecular charge but not molecular multiplicity HOT 1
- Links to changelogs in releases don't work HOT 2
- PSA: Pydantic v1/v2 and the QCArchive + Psi4 stack HOT 5
- Floating-point precision error in calculating angles HOT 1
- Molecule representation should include charge and multiplicity HOT 1
- Class inheritance diagram not rendering
- Inconsistent dependency versions for pint and numpy HOT 1
- Change Default Behavior of "fix_com" and "fix_orientation" HOT 6
- PSA: pubchem loose (name_type=word) searches failing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qcelemental.